http://www.perlmonks.org?node_id=525318


in reply to Re: reading values from file
in thread reading values from file

Hmmm...tried your version below:
while (<INFILE>) { # assuming you want what is between the '' after version chomp($old_version) && last if ($old_version) = /ver = '(.*?)'/; } close INFILE;
and it didn't retrieve the string and put it in $old_version...or at least it didn't show it on a subsequent print statement.