ubergoonz wrote:
Hi,

Hello,

I am trying to read a file which is delimited with : .

I only require some information in the first field, and fifth field,

i can easily do it in shell script using HN=`awk -F: '{print $1}'`
SN=`awk -F: '{print $5}'`


I wonder how can i achieve it using perl?

HN=`perl -F: -lane'print $F[0]'` SN=`perl -F: -lane'print $F[4]'`



John
--
use Perl;
program
fulfillment

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




Reply via email to