http://www.perlmonks.org?node_id=997829


in reply to How to call a function on each item after a split?

Use an array for the items:
my @items = split(/\|/, $str); foreach my $item(@items){ ...#whatever }


I'm too lazy to be proud of being impatient.