[Israel.pm] Quote Operators

Shmuel Fomberg semuelf at 012.net.il
Mon Mar 16 13:42:33 PDT 2009


Hi.

Some interesting behavior:

print q{abc{def}ghi};
will print the equivalent to
print 'abc{def}ghi';
Using unbalanced brackes will be a syntax error, unless slashed:
print q{prq{abc{de\{f}ghi}};
will print: 'prq{abc{de{f}ghi}'

this code:
print qq#text here#;
/something/;
Is not quite like this code:
print qq #text here#;
/something/;
But it is equal to this code:
print qq !text here!;
/something/;

How am I going to make my tokenizer identify all these? <facepalm>

Shmuel.




More information about the Perl mailing list