![]() |
|
No such thing as a small change | |
PerlMonks |
split giving me a splitting headacheby Anonymous Monk |
on Apr 24, 2013 at 18:25 UTC ( #1030473=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I'm trying to split x.y into (x,y), but if I see something like x.z.y, I want (x.z,y), not (x,z,y). Basically, I always want the string broken up into 2 substrings - everything up to the last period and everything after. I thought that the following would get the job done:
but perl has fooled me again! Why is this only returning x.z in $first and nothing in $second? Best Regards, Michael
Back to
Seekers of Perl Wisdom
|
|