Even your supposedly working version doesn't work. The match needs to be in list context (as created by the parens below) for the the match operator returns a list of the captured values.
=~ is used to specify what value the match operator operates on. It doesn't affect the returned value.
($value) = $value =~ /(\d+)/;
In reply to Re: it seems i don't understand =~
by ikegami
in thread it seems i don't understand =~
by partymeeple
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |