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!"; }
|
---|
In Section
Seekers of Perl Wisdom