my %dont_want = map {$_=>undef} @columns; while (<$file>){ my @arr = split; print @arr[map {!exists $dont_want{$_}}0..$#arr],"\n"; }
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
In reply to Re: cut columns with an array slice
by NetWallah
in thread cut columns with an array slice
by coldy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |