in reply to remove multiple indexes from an array
sub splice_entry_2 { my @kills = sort { $a <=> $b } @_; local *ARGV; @ARGV = "shows.data"; while (<>) { if (@kills and $. >= $kills[0]) { shift @kills while @kills and $. >= $kills[0]; next; } print; } }
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Default sort behavior.
by thunders (Priest) on Dec 18, 2001 at 20:51 UTC |