Re: File output - help

2008-06-25 Thread jet speed
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

Re: File output - help

2008-06-25 Thread Dr.Ruud
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

Re: File output - help

2008-06-24 Thread Rob Dixon
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

Re: File output - help

2008-06-24 Thread jet speed
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 > >

Re: File output - help

2008-06-24 Thread Dermot
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