costas has asked for the wisdom of the Perl Monks concerning the following question:
the files have been chmod at 777 and the print statement prints out the filenames fine. Can anyone see the mistake?#!/usr/bin/perl -w BEGIN { $|=1; print "Content-type: text/html\n\n"; use CGI::Carp('fatalsToBrowser'); } use strict; my $file; opendir (DIR, "/home/costas/test") or die "cannot opendir dir"; foreach $file (readdir(DIR)) { rename($file, lc($file)); print "$file<br>"; } closedir (DIR);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: file case change
by Juerd (Abbot) on Mar 15, 2002 at 12:12 UTC | |
Re: file case change
by ChOas (Curate) on Mar 15, 2002 at 12:12 UTC | |
Re: file case change
by tachyon (Chancellor) on Mar 15, 2002 at 14:04 UTC | |
Re: file case change
by costas (Scribe) on Mar 15, 2002 at 12:22 UTC | |
by ChOas (Curate) on Mar 15, 2002 at 12:26 UTC | |
by tachyon (Chancellor) on Mar 15, 2002 at 20:34 UTC | |
by Caillte (Friar) on Mar 15, 2002 at 15:07 UTC |