in reply to Re: Re: Whoops! I deleted everything!
in thread Whoops! I deleted everything!
Well, when you declare it twice, the first declaration overides the second and it is like the first one didn't exist at all. You could comment out the my $days = 31; and your program will behave exactly the same.
It would have worked if $days was global but I don't think that's the best solution. I think the best solution is simply to remove the 'my' on the line where you set my $days = 7;. So just change that line to $days = 7; and that should do the trick.
Of course, I still recommend testing thoroughly before actually allowing it to unlink files. ;-)
-sauoq "My two cents aren't worth a dime.";
|
|---|