in reply to Help me understand what qq// means
Read perldoc perlop (or perlop), specifically the section about qq. It is the "double quote" operator, that is, it allows you to specify the delimiters for a double-quoted string.
Often, it also helps to let Perl tell you how it sees some code:
perl -MO=Deparse -e " $key=substr ($input,0, index($input,qq/ /,-1));"
gives me
C:\>perl -MO=Deparse -e " $key=substr ($input,0, index($input,qq/ /,-1 +));" $key = substr($input, 0, index($input, ' ', -1)); -e syntax OK
The qq/ / is seen by Perl as a simple string, just that it was delimited by slashes.
|
|---|