|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re^6: Regex question - identify which pattern comes firstby harangzsolt33 (Curate) |
| on May 05, 2026 at 13:56 UTC ( [id://11167698]=note: print w/replies, xml ) | Need Help?? |
|
Hmm... Yes, it does work! I just had to put another closing parentheses in the regex.
And I did a test. This second version runs almost twice as fast as the first one. Very interesting... :-) Edit: Sorry, I don't want to change the subject but can't help it. lol I did another test on isNumber() which looks like this:
and it turns out that a simple regex test on a string to see if it's a number runs orders of magnitude faster than using the above method of trying to catch a warning...
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||