Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: A Love/Hate Relationship - A Long Time Newbie's Current Block

by flounder99 (Friar)
on Nov 05, 2003 at 19:21 UTC ( [id://304833]=note: print w/replies, xml ) Need Help??


in reply to Re: A Love/Hate Relationship - A Long Time Newbie's Current Block
in thread A Love/Hate Relationship - A Long Time Newbie's Current Block

Cool idea but if you read the question carefully:
# print $fn, $ln and $id to OUTPUT_A if $id = @a[0,1,2...n] # elsif print $fn, $ln and $id to OUTPUT_B if $id = @b[0,1,2...n] # elsif print $fn, $ln and $id to OUTPUT_C if $id = @c[0,1,2...n]
The way you are doing it both Homer and Clark end up in "b.txt". The way the question was written Homer should wind up in "a.txt" and Clark in "b.txt". All you have to do is reverse the order you fill your %data hash.
@data {@c} = ($fh_c) x @c; @data {@b} = ($fh_b) x @b; @data {@a} = ($fh_a) x @a;
Now the code works as the question was asked.

--

flounder

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-25 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found