Wilson, Douglas on Thu, 14 Aug 2003 14:05:49 -0400 |
And there's no point in that s///; Edited again. Sorry for the online thinking out loud. ----------------- 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; $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** - **Majordomo list services provided by PANIX <URL:http://www.panix.com>** **To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
|
|