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


in reply to Re^2: Problem when comparing strings as opposed to numerical values
in thread Problem when comparing strings as opposed to numerical values

You don't need eval for that.

my $re = qr{^(\d+):}; my $data = '123: 45'; if ($data =~ $re) { print "Matched!"; }
  • Comment on Re^3: Problem when comparing strings as opposed to numerical values
  • Download Code