in reply to Changing filename extentions

A couple of things here:

  1. $file is not the current item in the @files array.
  2. The function call will not work inside the quotes.

This is untested, but I'd go with something more like this:

my $file = '.' ; opendir( DIR, $file ) ; @files = readdir( DIR ) ; close( DIR ) ; for ( @files ) { if ( /\.HTM[L]?/ ) { system("rename", $_, lc( $_ ) ); } }

Or, even better (if it's supported on NT), just use Perl's rename command.

rename $_, lc( $_ ) ;

_______________
D a m n D i r t y A p e
Home Node | Email