in reply to pattern matching between two specific strings

You can break up the input file into records by setting the record seperator,

#!/usr/local/bin/perl my ($in_filename, @records) = 'graph_set.out'; { local $/ = ' PLUTO4 finished'; my $start = ' Final graph set matrix'; open IN, '<' $in_filename or die "Can't open $in_filename: ", $!; @records = map { substr $_, index( $_, $start) + length( $start} } <IN>; chomp @records; close (IN); }
Without seeing your data, I can't say much about your regex or how it parses.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: pattern matching between two specific strings
by harry34 (Sexton) on Jul 08, 2003 at 12:52 UTC
    I'm geting some errors with this code ?
    Is it possible for me to have your email and I can send you the file I'm working from