Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Count and List Items in a List

by ikegami (Patriarch)
on Nov 01, 2005 at 16:09 UTC ( [id://504625]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (<FILE>) {
        @zapschool = split (/\t/);
    ...
            print NEWFILE "$zapschool[4]\n";        
        }
    }
    
  2. or download this
    while (<FILE>) {
        if (m/zaps/i) {
    ...
            print NEWFILE "$zapschool[4]\n";        
        }
    }
    
  3. or download this
    while (<FILE>) {
        if (m/zaps/i) {
    ...
            print NEWFILE "$zapschool\n";        
        }
    }
    
  4. or download this
    my %count;
    
    ...
    foreach (keys(%count)) {
       print NEWFILE "$_: $count{$_}\n";        
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://504625]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-16 20:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found