Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 chilling in the Monastery: (6)
As of 2014-11-23 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (130 votes), past polls