Mahurshi Akilla wrote:
> 
> is there a way to get the "nth" column of a string in perl, similar to
> awk '{print $col_no}' in awk ?

AWK does not have a 'col_no' variable so what is it that you are trying
to do?

I assume that you meant:

awk '{print $2}'

which would print the second field of the current record for each record
in the file/stream?

The Perl equivalent to that is:

perl -lane'print $F[1]'



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to