CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I Need a Programmer for Freelance Work:
Reply to: Re: [FishMonger] Multi line file pipe delimiter parsing
 
Subject:
Guest Username:
E-mail address:
Post Style:      Get Markup Help
Icon:
none









Post:




Replying to: Re: [FishMonger] Multi line file pipe delimiter parsing by iammankani
Post:  
Got the 1st part of the question.
Trying the 2nd part with the below
2.listing their spending in each category

while(<FILE>) {
chomp;
my ($name, $item, $price) = split /[|]/;
$price =~ s/^\$//;
foreach $name ($item){
$sum_for{$item} +=$price
}

print "$_: \$$sum_for{$_}\n" for sort keys %sum_for;
}

not able to get the output


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives