Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Constants lists in array slices

by LanX (Sage)
on Jul 20, 2018 at 12:25 UTC ( #1218894=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    X:\>perl -MO=Deparse -e"use constant L=>1,2,3; print @a[L]"
    use constant ('L', 1, 2, 3);
    print @a[1..3];
    -e syntax OK
    
  2. or download this
    D:\>perl -MO=Deparse -e"use constant L=>1,2,3; print @a[L]"
    use constant ('L', 1, 2, 3);
    print @a[L()];
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2022-10-07 18:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (30 votes). Check out past polls.

    Notices?