Re: Simple file to arrayby waxmop (Beadle)
|on Jul 08, 2002 at 20:30 UTC||Need Help??|
write the file with addresses like so:
then to load this into 2 arrays ( 1 for names, 1 for email addresses) do something like this:
and now you've got 2 arrays: @names has the names, and @addresses has the addresses. They are indexed by the same number, so joey's name is stored at
and his address is stored at
another exciting way to do this would be to use a hash.
Now, to get joey's address, just do this: