naseeam
asked on
Meaning of "(.*)\" in a pattern.
What do "(.*)\" do in the pattern below?
elsif ( $line =~ m/^\|\s+AT\_name\s+\"(.*)\ "/ )
{
}
elsif ( $line =~ m/^\|\s+AT\_name\s+\"(.*)\
{
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$1 is a perl variable
perldoc perlvar
$<digits>
Contains the subpattern from the corresponding set of capturing
parentheses from the last pattern match, not counting patterns
matched in nested blocks that have been exited already.
(Mnemonic: like \digits.) These variables are all read-only
and dynamically scoped to the current BLOCK.
perldoc perlvar
$<digits>
Contains the subpattern from the corresponding set of capturing
parentheses from the last pattern match, not counting patterns
matched in nested blocks that have been exited already.
(Mnemonic: like \digits.) These variables are all read-only
and dynamically scoped to the current BLOCK.
ASKER
Nice details. Quick responses.
ASKER