Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Newbie: query about array assignment

by sundialsvc4 (Abbot)
on Sep 13, 2012 at 15:19 UTC ( #993509=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -e 'my @stuff="This","That","Other"; use Data::Dumper; 
    print Dumper(\@stuff);'
    $VAR1 = [
              'This'
            ];
    
  2. or download this
    perl -e 'my @stuff=("This","That","Other"); use Data::Dumper; 
    print Dumper(\@stuff);'
    ...
              'That',
              'Other'
            ];
    
  3. or download this
    perl -e 'use strict; use warnings; 
    my @stuff="This","That","Other"; 
    ...
    $VAR1 = [
              'This'
            ];
    
  4. or download this
    perl -e 'my @stuff=("This","That","Other"); use Data::Dumper; 
    print Dumper(@stuff);'
    $VAR1 = 'This';
    $VAR2 = 'That';
    $VAR3 = 'Other';
    
  5. or download this
    Undefined subroutine &main::Dumper called at -e line 1.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2015-07-06 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls