Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Split ( ) is Giving Me a Splitting Headacheby bpphillips (Friar) |
on May 24, 2006 at 12:32 UTC ( [id://551342]=note: print w/replies, xml ) | Need Help?? |
From the manual you evidentally didn't find (perldoc) :-)
In your case, you're only passing in a single argument to split. Perl interprets this as /PATTERN/ and implicitly uses $_ as the EXPR. Since $_ hasn't been initialzed yet (hence the warning) nothing really happens (it's trying to split an undefined value on occurences of "Hello World"). What you need to do (besides taking a look at the perldoc entry for split) is use the two-argument usage of split:
-- Brian
In Section
Seekers of Perl Wisdom
|
|