in reply to File open problem with "GLOB"
unlink ($input);
What's that suppose to do? It doesn't look like $input holds a file name. Perhaps you meant
undef ($input);
but that's totally useless since the variable is destroyed when the scope ends at the end of the script, the next line.
Another consideration is that split(',', ...) is misleading since the first argument must be a regexp. I prefer always specifying a regexp: split(/,/, ...).
Finally,
my $ts;
foreach $ts (...) { ... }
can be written as simply
foreach my $ts (...) { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File open problem with "GLOB"
by mcoblentz (Scribe) on Mar 16, 2008 at 06:33 UTC | |
by ikegami (Patriarch) on Mar 16, 2008 at 06:56 UTC |