in reply to No. files in folder
That's fine. But it will only work your pwd is $dir. Otherwise you will have either to move there or prepend it to the filenames. Personally I think that while opendir is great and necessary in some circumstances, it is quite often abused where a simple glob (which does an opendir, and a readdir, and all the dirty jobs for you behind the scenes) would suffice.
Update: incidentally -0 == 0. Probably the code originally had the sort the other way round and [-1,-2] as subscript.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: No. files in folder
by gellyfish (Monsignor) on Jun 23, 2005 at 10:33 UTC | |
by blazar (Canon) on Jun 23, 2005 at 10:38 UTC | |
by kaif (Friar) on Jun 23, 2005 at 15:03 UTC |
In Section
Seekers of Perl Wisdom