Why? Because it's friggin' immoral. while( scalar @ListOfOldAceFiles ) { $OldAceFile = shift @ListOfOldAceFiles; if ( CheckIfThisIsAnAceFile( $OldAceFile )) { $TransferTags = 1; last; } } I'd have shifted the filename directly into the function call, but I thought it might be needed later ... -----Original Message----- From: Vicki Brown To: Fun With Perl Sent: 7/2/99 4:33 PM Subject: [FWP] do... while? You can tell from the prefixes where this code comes from :-) my $bContinueLooking = 1; do { if ( $#aListOfOldAceFiles == -1 ) { $bTransferTags = 0; $bContinueLooking = 0; } else { $szOldAceFile = shift @aListOfOldAceFiles; $bIsAnAceFile = &bCheckIfThisIsAnAceFile( $szOldAceFile ); if ( $bIsAnAceFile ) { $bTransferTags = 1; $bContinueLooking = 0; } } } while( $bContinueLooking ); } } Once again, operating under the Principle of Making the Goal Clear to the Reader... I share an example of what (IMHO :) not to do. Anybody with me on _why_? ;) -- -- |\ _,,,---,,_ Vicki Brown <vlb@cfcl.com> ZZZzz /,`.-'`' -. ;-;;,_ Journeyman Sourceror: Scripts & Philtres |,4- ) )-,_. ,\ ( `'-' P.O. Box 1269 San Bruno CA 94066 '---''(_/--' `-'\_) http://www.cfcl.com/~vlb http://www.macperl.com ==== Want to unsubscribe from Fun With Perl? ==== Well, if you insist... Send mail with body "unsubscribe" to ==== fwp-request@technofile.org ==== Want to unsubscribe from Fun With Perl? ==== Well, if you insist... Send mail with body "unsubscribe" to ==== fwp-request@technofile.org