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
riginal Message- From: Bruce Ambraal [mailto:[EMAIL PROTECTED]] Sent: 13 February 2002 13:36 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Perl regular expresions HELP! Please explain to me what this code does, here I'm tying to rename files in current directory to 1.fil, 2.fil, ... fo

Perl regular expresions HELP!

2002-02-13 Thread Bruce Ambraal
Please explain to me what this code does, here I'm tying to rename files in current directory to 1.fil, 2.fil, ... foreach my $f ( @files ){ if( $f =~ /private/ ){ next; } chomp $f; $fil{$f} = 0; # if we match the extension... if( $f =~ /\.$extension$/ ){