in reply to Perl's POD's description of the use of capturing special variables.

i think it is probably useful to add a short code example. i don't know but code examples in the pods are likely to be taken as they are, aren't they?
that code examples can last very long (and even longer than wanted) is shown by the cgi parsing code snippet that has been hanging around the net forever...
so one should provide a good example, something like:
my $value; if ( m/regex (with parens) .../) { # do something with $1 $value = $1; } else { # don't use $1; exception, or provide a default value $value = 'default'; } or maybe: my $value = m/...(..).../ ? $1 : 'default';
  • Comment on Re: Perl's POD's description of the use of capturing special variables.
  • Download Code