You are slightly wrong: <code$qr = qr/./; $qr =~ m/$qr/; $qr =~ $qr;</code> is exactly identical. Again, some opcode info to illuminate. It also yields the slightly interesting form $text = 'abcd'; $text =~ qr/./ but then... maybe that's not quite normal ;-)
i <@> leave[t1] vKP/REFC ->(end)
1 <0> enter ->2
2 <;> nextstate(main 5 qr.pl:1) v ->3
5 <2> sassign vKS/2 ->6
3 </> qr(/./) s ->4
- <1> ex-rv2sv sKRM*/1 ->5
4 <> gvsv s ->5
6 <;> nextstate(main 5 qr.pl:2) v ->7
>> Here you see the $qr =~ m/$qr/ form
b </> match() vKS ->c
- <1> ex-rv2sv sK/1 ->8
7 <> gvsv s ->8
a <|> regcomp(other->b) sK/1 ->b
8 <1> regcreset sK/1 ->9
- <1> ex-rv2sv sK/1 ->a
9 <> gvsv s ->a
>> And here you see the $qr =~ $qr form
c <;> nextstate(main 5 qr.pl:3) v ->d
h </> match() vKS ->i
- <1> ex-rv2sv sK/1 ->e
d <> gvsv s ->e
g <|> regcomp(other->h) sK/1 ->h
e <1> regcreset sK/1 ->f
- <1> ex-rv2sv sK/1 ->g
f <> gvsv s ->g
printf "You are here %08x\n", unpack "L!", unpack "P4", pack
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||