develooper Front page | perl.beginners | Postings from April 2002

Re: assigning array to hash

Thread Previous
richard noel fell
April 26, 2002 07:15
Re: assigning array to hash
Message ID:
Jeff -
	Thanks for your reply. Now, on to solve the remaining problems.
Dick Fell

Jeff 'Japhy' Pinyan wrote:
> On Apr 26, richard noel fell said:
> >Below is part of some code that reads from a file to an array and then
> >attempts to assign the array to a hash.  I get no compiling errors, but
> >%label_hash is empty. No doubt I am being stupid. Has anyone a
> >suggestion how to fill the hash variable?
> The hash is not empty -- printing "%foo" does nothing special.  To dump a
> hash, do something like:
>   for (keys %hash) {
>     print "$_ => $hash{$_}\n";
>   }
> --
> Jeff "japhy" Pinyan
> RPI Acacia brother #734
> ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
> <stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
> [  I'm looking for programming work.  If you like my work, let me know.  ]

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About