BenBart wrote:
Hi all,
Can anyone suggest what is the best way to convert the lines of text
between the ========= into a delimited file?
[...]
I suggest setting the input-record-separator to "" since your tablespace
records are separated by empty lines. Then you'd read in each record and
use the m// operator to extract the data into a list like so:
#!/usr/bin/perl
use strict;
use warnings;
use English;
local $INPUT_RECORD_SEPARATOR = '';
while (<DATA>) {
next unless m/^Tablespace/;
my @items = m/= (.*)$/gm;
print join ("\t",@items),"\n";
}
__DATA__
... your tablespace data would follow...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>