in reply to
using a subroutine
Your call to remove will only ever remove the files from the last directory you read.
@tmps = readdir(DIRS);
should probably be
push @tmps, readdir(DIRS);
.
I second everyone else's comments about globals, etc..
Comment on
Re: using a subroutine
Select
or
Download
Code
Replies are listed 'Best First'.
Re^2: using a subroutine
by
xjlittle
(Beadle)
on Aug 10, 2004 at 00:05 UTC
Oops you're correct. Using
push @tmps,readdirs(DIRS)
didn't delete the tmp files either.
Back to the drawing board...
[reply]
[d/l]
In Section
Seekers of Perl Wisdom