in reply to File Stricture Help
foreach my $file (@files) { $count++; }
This is usually simpler as:
my $count = @files;And this:
unlink <$file>;... reads from the filehandle $file (which isn't a filehandle, and is the source of your problems. The <> operator is the same as readline; it doesn't signify a file at all. I think that's what's confused you here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File Stricture Help
by ysth (Canon) on May 14, 2008 at 05:46 UTC | |
by chromatic (Archbishop) on May 14, 2008 at 17:15 UTC |