Thanks Rob, Much appreciated
Sj
On 6/24/08, Rob Dixon <[EMAIL PROTECTED]> wrote:
>
> Dermot wrote:
> > Welcome,
> >
> >
> > 2008/6/24 jet speed <[EMAIL PROTECTED]>:
> >> Hi,
> >>
> >> I am beginner to perl,
> >>
> >> I have a file name cxout and i want to capture just the LUN 415, LUN 815
> >> int
Dermot schreef:
> #!/bin/perl
>
> use strict;
> use warnings;
>
> my @luns;
> while () {
> chomp;
Why chomp?
> next unless $_ =~ /LUN/;
> $_ =~ /\[(LUN\s+\d+)\]/;
There is no need to mention $_ in those lines.
(I don't think it is bad that you do, but I wouldn't.)
$1 can rema
Dermot wrote:
> Welcome,
>
>
> 2008/6/24 jet speed <[EMAIL PROTECTED]>:
>> Hi,
>>
>> I am beginner to perl,
>>
>> I have a file name cxout and i want to capture just the LUN 415, LUN 815
>> into arrray & then print from the array. my idea is to capture different
>> element form this file and the
Thanks Dermot, it gives me the required output. Much appreciated.
On 6/24/08, Dermot <[EMAIL PROTECTED]> wrote:
>
> Welcome,
>
>
> 2008/6/24 jet speed <[EMAIL PROTECTED]>:
> > Hi,
> >
> > I am beginner to perl,
> >
> > I have a file name cxout and i want to capture just the LUN 415, LUN 815
> >
Welcome,
2008/6/24 jet speed <[EMAIL PROTECTED]>:
> Hi,
>
> I am beginner to perl,
>
> I have a file name cxout and i want to capture just the LUN 415, LUN 815
> into arrray & then print from the array. my idea is to capture different
> element form this file and the print form the array. Any hel