Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 examining the Monastery: (7)
As of 2015-07-06 05:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls