my @lines=foo('bar'); foreach my $line (@lines) { $a.=chomp $line ; $b*= getVa($line);# a parsing function }