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

Re: Referencing in advanced data structures

by fullermd (Priest)
on Oct 16, 2009 at 08:32 UTC ( #801519=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $struct = {
        hashRef => { fruit => 'apple', veggie => 'corn' },
        arrayRef => [ qw(1 2 3 4 5) ],
    };
    
  2. or download this
    #!/usr/bin/env perl5
    use strict;
    ...
    # And for the coup de grace, we'll deref $struct via ${} instead of ->
    # too.
    print ${${$struct}{hashRef}}{fruit}, "\n";
    
  3. or download this
    % ./tst.pl 
    apple
    apple
    apple
    apple
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2022-01-22 05:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (61 votes). Check out past polls.

    Notices?