in reply to Re: Return value from positive look behind
in thread Return value from positive look behind

Thank you! Posting the solution that worked (returns 5) for me.

my $body_text="there are 5 minutes left in the program"; if ($body_text=~m/(\d{1,2})(?=\smins|\sminutes)/g) { print "here: " . $1 . "\n"; }