3 ms·
So there is choice of course. match returns match data, and sets the $~ variable === returns true or false, setting the $~ variable =~ returns integer (posit
by Olap84 10y ago
So there is choice of course.
match returns match data, and sets the $~ variable
=== returns true or false, setting the $~ variable
=~ returns integer (position) or nil, setting $~
The newest one
match? returns a boolean, not setting $~
- thelibrarian 10y agoAlso, === is the method used in case statement matching.