Untested, but you get the idea:
my $lastreport = ''; foreach $line (@sorted_data) { chomp $line; $line =~ /(.*?)\,(.*?)\,(.*)/; $first = $1; $second = $2; $last = $3; if ($last eq $second) { if($second eq $first) { print "$second really = $first\n"; } else { $lastreport .= "$last only = $first\n"; } } } print $lastreport;
In reply to Re: Printing Array Output Outisde foreach
by hippo
in thread Printing Array Output Outisde foreach
by ahjohnson2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |