in reply to Re: Modified Date, file renaming
in thread Modified Date, file renaming
Look out! If you're going to use the "|| die" syntax instead of "or die", you need to put parentheses around the arguments to opendir.
andopendir (FOO, $bar) || die "No dice";
are equivalent: they try to open the dirhandle FOO to the directory listed in $bar, and if opendir fails, they die. Butopendir FOO, $bar or die "No dice";
is equivalent toopendir FOO, $bar || die "No dice";
which means that die is only called if $bar is empty, not if opendir fails. Which is unlikely to be what you intended.opendir FOO, ($bar || die "No dice");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Modified Date, file renaming
by Mungbeans (Pilgrim) on May 16, 2001 at 19:59 UTC |