Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Array problems.....

by 7stud (Deacon)
on Mar 19, 2013 at 04:59 UTC ( #1024206=note: print w/ replies, xml ) Need Help??


in reply to Array problems.....

I'm guessing that hashes, references, and autovivification are beyond the op's skills at this point. I suggest that you:

  1. Create two arrays: @names224, @names225.
  2. Read each line and chomp() it.
  3. split() the line.
  4. If the second element in the array returned by split() is == to 224, then push() the first element of the array returned by split() onto @names224.
  5. If the second element in the array returned by split() is == to 225, then push() the first element of the array returned by split() onto @names225.
  6. The number of items in an array can be found by assigning the array to a scalar variable.

Good luck.


Comment on Re: Array problems.....

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-09-01 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (9 votes), past polls