Wilson, Douglas on Thu, 14 Aug 2003 14:01:46 -0400 |
Oops '=' s/b 'eq' fixed. I think I've gone overkill on modifying this, but in case you want, say, field 1 and 2 and the last field, you can say: f 1 2 -1 filename(s) BEGIN { usage() unless @ARGV; while ($ARGV[0] =~ /^(\+|-)?\d+/) { (my $field = shift) =~ s/^+//; $field-- if $field > 0; push @fields, $field; } shift if $ARGV[0] eq '--'; } print "@F[@fields]"; - **Majordomo list services provided by PANIX <URL:http://www.panix.com>** **To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
|
|