in reply to Re: ignoring empty returns from split
in thread ignoring empty returns from split

That fails on the case where $line starts with a =:
$line = "==one==two==three"; ($one,$two,$three,$four)=split (/=+/,$line); print "$one\n$two\n$three\n$four";
gives me an undef, 'one', and 'two'.

As a side note, '$line' != '$a' :-)

Afterthought: This would work:
$line = "==one==two==three=four"; ($one,$two,$three,$four)=split (/=+/,($line=~/^=*(.*?)$/,$1)[1]); print "$one\n$two\n$three\n$four";