You can create it yourself:
... if ( my @captures = $string =~ m/$pattern/ ) { return @captures; } else { return; }
(The else { return } is required here to match the behavior of your original code. Without it, the "last evaluated expression" returned in case the regex does not match would be zero (unlike in your code). This is because the then empty @captures array evaluates to zero in the scalar context of the if.)
In reply to Re: Is there a default array for reg exp memory variables?
by Eliya
in thread Is there a default array for reg exp memory variables?
by korpenkraxar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |