in reply to Optimize file renaming.
Replace:
opendir(THISDIR,"e:\\perl\\comics\\"); my @comics=readdir(THISDIR); close(THISDIR);
With:
my @comics = glob('e:/perl/comics/*');
Many people work in the current directory, and specify specific wildcard masks. The "angle brackets" operator calls glob() for you (if it's not a bareword), so this might be even more readable.
Oh, and there are a few cases where Windows still really requires backslashes, but most of the time, it accepts forward slashes, Unix-style. (This has been true since MS-DOS 2.0 when it introduced subdirectories.) I find them easier to type and read.my @comics = <*.png>;
--
[ e d @ h a l l e y . c c ]
|
|---|