Re: Perl regular expresions HELP!

2002-02-13 Thread John W. Krahn
Bruce Ambraal wrote: > > Please explain to me what this code does, here I'm tying to rename files > in current directory to 1.fil, 2.fil, ... > > [snip code] > > The complete program is: > > #!/usr/local/bin/perl -w > # first example... > > use

RE: Perl regular expresions HELP!

2002-02-13 Thread John Edwards
foreach my $f ( @files ){ # Iterate through the @files array, foreach iteration set the value of $f to the next element of @files if( $f =~ /private/ ){ next; } # If the scalar $f contains the text "private", then stop this iteration and move onto the next one chomp $f; #