On Wed, 23 Mar 2005 00:21:47 +0800, ubergoonz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> 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?
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
my ($hn, $sn) = (split /:/, $your_data)[0,4];
--jay
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>