Hacker News new | ask | show | jobs
by Olap84 3620 days 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 $~

1 comments

Also, === is the method used in case statement matching.