Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Putting text file into a hash

by remluvr (Sexton)
on Oct 17, 2008 at 08:55 UTC ( [id://717696]=note: print w/replies, xml ) Need Help??


in reply to Putting text file into a hash

Thanks everyone, I'm working on it and I hope I can make it work.
Every suggestion was very helpful, even the one unrelated to my question. As I said I'm pretty new to Perl, so I need to learn almost everything.
Thanks again.

Replies are listed 'Best First'.
Re^2: Putting text file into a hash
by lamp (Chaplain) on Oct 17, 2008 at 09:01 UTC
    Always use strict and warnings which will make your life easier and also speed up your
    learning and development process. Use of warnings would have alert you about the chomping of
    wrong variable in your code.
Re^2: Putting text file into a hash
by blazar (Canon) on Oct 21, 2008 at 11:01 UTC

    I personally believe that you're still failing to specify how is it failing to "work." Because by all means it should! That is, it should if the input file you're running your code is actually as regular as you suggested. If it isn't, then you may run into troubles. Incidentally I've just answered a question which is virtually the same as yours except that the code of the person asking it is some orders of magnitude worse than yours! (Which is a way to say: compliments for your programming skills after only a week of Perl programming!) Actually, in the linked post I suggest another technique to achieve the same, which is even more "sensible" to the format of the input file, for a broken record may mess up all of the following keys and values...

    --
    If you can't understand the incipit, then please check the IPB Campaign.

Log In?
Username:
Password:

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

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

    No recent polls found