in reply to Perl array delete
delete works on is intended for a hash, not an array.
If you just want to filter out certain elements of an array, use grep or splice:
my $file = "test_html"; my @file_lkp = ("file1", "file2"); @file_lkp = grep {$_ ne $file} @file_lkp;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl array delete
by BrowserUk (Patriarch) on Apr 06, 2011 at 07:11 UTC |