Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Possible pitfall with Slices

by fundflow (Chaplain)
on Nov 07, 2000 at 00:56 UTC ( [id://40239]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        @a[1,2,3] = @b[100,200,300];
    
  2. or download this
        @a{a,b,c}=@b[100,200,300];
    
  3. or download this
        @a{a,b,c}=1;
    
  4. or download this
        for (a,b,c,d) { print "$_\n" if $a{$_} }
    OUTPUT:
        a
    
  5. or download this
        @a{a,b,c}=(1,1,1);
    or
        @a{a,b,c}=(1)x3;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-19 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found