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

Or, you could just use the split parameters:
my ($one, $two) = split (/exp/, $line, 2);

This will break for cases of "=0==one=two" since you'll return an empty and a zero.

For those suggesting a simple $_ test for the grep, you will not return the 0. Best to go with the length() function.

Update: I'd have to go with Ovid that "length > 0" is clearer than just length, but might there be a performance hit? (And would this code really be hurt by the performance hit?)