Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl Array Question

by Enlil (Parson)
on May 15, 2004 at 08:50 UTC ( [id://353609]=note: print w/replies, xml ) Need Help??


in reply to Perl Array Question

$hash{1} is a reference to an array to get the values back dereference it:
#!/usr/bin/perl -w use strict; use warnings; my %hash ; $hash{1} = ["me","you"]; foreach my $item ( @{$hash{1}} ) { print "$item\n"; } exit;

update:Meant to point out tye's References quick reference for further reference.

-enlil

Replies are listed 'Best First'.
Re: Re: Perl Array Question
by rsiedl (Friar) on May 15, 2004 at 08:57 UTC
    Cool. Thanks for your help.

Log In?
Username:
Password:

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

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

    No recent polls found