Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Using an array element as a loop iterator

by GotToBTru (Prior)
on Nov 07, 2013 at 19:59 UTC ( [id://1061616]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    my ($a);
    my @b=(2,4,6,7);
    foreach $a (@b) { print $a}
    
  2. or download this
    use strict;
    use warnings;
    my @a=(1,2,3);
    my @b=(2,4,6,7);
    foreach $a[1] (@b) { print $a[1] }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found