Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: find the element position of $scalar

by    (Sexton)
on Feb 08, 2002 at 08:50 UTC ( #144066=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $i=0;
    foreach $scalar(@array) {
       print("$scalar is $i element\n");
       $i++;
       }
    
  2. or download this
    my $i=0;
    for(@array) {
       print("$_ is $i element\n");
       $i++;
       }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-05-25 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?