in reply to Re: Re: how to match and assign?
in thread how to match and assign?

/me assumes that $/=undef is being applied, to allow all the file to be sucked into the variable $var.

Er... no. The original poster mentioned line at a time processing. Assume the following code around my previous snippet:

while (defined($var = <FILE>)) { # code here }
/me also assumes that $var is subsequently being reused to store the matching criteria?

Wasn't very clear exactly what the original poster wanted to do with the results, so I left it deliberately vague :)

--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me