The stupid question is the question not asked | |
PerlMonks |
Deparse isn't as reliable as I thoughtby harleypig (Monk) |
on Mar 03, 2006 at 21:47 UTC ( [id://534376]=perlmeditation: print w/replies, xml ) | Need Help?? |
I don't know how usefull this will be to anyone. It's rather obscure. Perldoc -f split says: As a special case, specifying a PATTERN of space (’ ’) will split on white space just as "split" with no arguments does. Thus, "split(’ ’)" can be used to emulate awk’s default behavior, whereas "split(/ /)" will give you as many null initial fields as there are leading spaces. A "split" on "/\s+/" is like a "split(’ ’)" except that any leading whitespace produces a null first field. A "split" with no arguments really does a "split(’ ’, $_)" internally.That reads like stereo instructions. I think I understand it but it appears that B::Deparse is having problems with it:
Run it through deparse and you get:
Run this script and you get the following output:
This caused me to not trust Deparse quite so much. I'm going to be a little more careful about trusting what Deparse spits out.
Harley J Pig
Back to
Meditations
|
|