Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Force access a Hash ref as Array ref

by perlfan (Vicar)
on Jul 20, 2021 at 22:17 UTC ( [id://11135239]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Foo;
    
    ...
    }
    
    1;
    
  2. or download this
    use Data::Dumper ();
    
    my $foo = Foo->new(a => 1, b => 2, c => [qw/apple banana grape/]);
    
    print Data::Dumper::Dumper(\$foo)
    
  3. or download this
    $VAR1 = \bless( {
                       'b' => 2,
    ...
                       'a' => 1
                     }, 'Foo' );
    
  4. or download this
    package Foo;
    
    ...
    }
    
    1;
    
  5. or download this
    $VAR1 = \bless( [
                       'a',
    ...
                         'grape'
                       ]
                     ], 'Foo' );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 02:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found