CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Add to Reference

 



melco
Novice

Feb 28, 2007, 12:30 PM

Post #1 of 3 (585 views)
Add to Reference Can't Post

Hi.
I have a reference like this:

Code
my $ref = { 
simple => {
test => "value"
}
};

How can I add other refs to $ref?
I want $ref looks like this after adding:

Code
my $ref = { 
simple => {
test => "value"
},
hard => {
another => "one"
}
};


Thnx! Wink


ProBulletin
Novice

Feb 28, 2007, 2:38 PM

Post #2 of 3 (581 views)
Re: [melco] Add to Reference [In reply to] Can't Post


Code
$ref->{hard} = { another => "one" };



Regards,
Paul Wilson
ProBulletin Board: http://www.probulletin.com/


KevinR
Veteran


Feb 28, 2007, 3:40 PM

Post #3 of 3 (578 views)
Re: [melco] Add to Reference [In reply to] Can't Post

Does the same as ProBulletins suggestion:



Code
$ref->{hard}{another}= 'one';

-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives