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

Re: read the file and assign each line to a hash????

by swampyankee (Parson)
on Sep 08, 2006 at 18:23 UTC ( [id://572051]=note: print w/replies, xml ) Need Help??


in reply to read the file and assign each line to a hash????

One major flaw in your concept will be exposed by files which contain "To:" more than once: Perl hash keys must be unique, which means that the hash's value will be overwritten each time "To:" shows up.

Unless this is a rather bizarre (and poorly specified) homework assignment (it isn't, is it?), you should:

  1. Do a supersearch here, and search on CPAN for ways to parse email. You've had several pointers; follow them and pay attention.
  2. Be more forthcoming with the context of what you're trying to do. There are monks with expertise in just about all programming-related disciplines; there is a very good chance one has solved a remarkably similar problem.

emc

At that time [1909] the chief engineer was almost always the chief test pilot as well. That had the fortunate result of eliminating poor engineering early in aviation.

—Igor Sikorsky, reported in AOPA Pilot magazine February 2003.
  • Comment on Re: read the file and assign each line to a hash????

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-25 15:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found