in reply to Record Separator affecting Regex
The problem is that comments and statements are terminated by two different things, and you can expect to see the two types of elements intermingled.
What I would do, if the file isn't grotesquely huge, is read it all into $_, remove the comments, and then split.
$_ = <DATA>; s/^#.*//gm; # <b>updated</b> my @lines = split /;\n+/;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Record Separator affecting Regex
by Kozz (Friar) on Nov 07, 2002 at 19:30 UTC |
In Section
Seekers of Perl Wisdom