Re: parsing multi-line records

2002-01-28 Thread Briac Pilpré
On Mon, 28 Jan 2002 15:02:31 -0800, David Palomino wrote: > I am trying to parse lpstat -s output from HPUX. There are two lines > per "record". It looks like this: Playing with the $/ might help you a bit here #!/usr/bin/perl -w use strict; $/ = 'device for'; my $header = ; while (){

parsing multi-line records

2002-01-28 Thread Palomino, David
Hello, I am trying to parse lpstat -s output from HPUX. There are two lines per "record". It looks like this: -- begin sample raw data - no system default destination device for ms331x_lzr: /dev/null remote to: ms331x-lzr on spooler1 device for df447x_lzr: /dev/null remote