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

Re^2: retrieve list values...

by danidin (Novice)
on Jul 18, 2005 at 13:58 UTC ( [id://475763]=note: print w/replies, xml ) Need Help??


in reply to Re: retrieve list values...
in thread retrieve list values...

the variable that I'm printing is defined like this : my @tss = $tool->{param}->{'TARGET_SERVICES_SINGLE'}; when I print it I get array reference. the code that you suggested didn't work :-( what am I doing wrong !?

Replies are listed 'Best First'.
Re^3: retrieve list values...
by jdporter (Paladin) on Jul 18, 2005 at 14:14 UTC

    If you did anything wrong, it was to neglect to say that you've got a plain array that you're printing out the variable using Data::Dumper. :-)

    To account for this, simply take the code I posted before and replace @$VAR1 with @tss: :

    for my $rec_hr ( @tss ) { my @rec = @{$rec_hr}{'ID','TEXT','VALUE'}; push @array_records, \@rec; print "(@rec)\n"; }
    I might also suggest that you read up on references, e.g. in perlreftut.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-19 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found