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$/ ){
        }
        # if this isn't a directory name...
        if( $f !~ /\\$/ ){ delete( $fil{$f} ); }
}

The complete program is:
------------------------------------------------
#!/usr/local/bin/perl -w
# first example...

use strict;

# declarations...
my @files = `ls -F`;
my %fil;
foreach my $f ( @files ){
        if( $f =~ /private/ ){ next; }
        chomp $f;
        $fil{$f} = 0;
        # if we match the extension...
        if( $f =~ /\.$extension$/ ){
        }
        # if this isn't a directory name...
        if( $f !~ /\\$/ ){ delete( $fil{$f} ); }
}

Would some luv some assistance.

The struggling part is after having read current dir file into an array, I now want to 
rename these files into current dir to 
1.fill, 2.fill, ...

PLEASE HELP!!!

THANK!
Bruce






--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to