in reply to Quick REGEXP question
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)$} );
|
|---|