The parens around $ext turn the left-hand-side into a list context, and the parens within the regex will capture any of the three alternative strings and return the capture as a list (which then gets assigned to $ext).my ( $ext ) = ( $systempath =~ m{[\\/][a-z0-9]+\.(cgi|pl|asp)$} );
In reply to Re: Quick REGEXP question
by graff
in thread Quick REGEXP question
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |