in reply to Re: using splitin thread using split
perl -MO=Deparse -e "split('|', 'ab|c');"
split(/|/, 'ab|c', 0);
-e syntax OK
There is one subtle difference between using '...' and /.../ as regex delimiters. The latter interpolates where the former does not. That does not affect the examples in this thread though.
And the difference between "..." and /.../ is that "..." unescapes too much.
"\d" is the same as /d/.
If you want /\d/, the equivalent would be "\\d".
I always use /.../ or qr/.../ to avoid confusion.
Yes. I never use "...", preferring m[...] instead. Using '...' for a regex is simply shorthand for m'...' which gives the same, non-interpolating behaviour.
A bad habit? Maybe...
Give me a lever long enough ...
Eppur si muove
Mr. Watson – Come here – I want you
Mary had a little lamb
That's one small step for a man ...
SCE to AUX
I think I'll stop here
Results (262 votes). Check out past polls.