Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: not able to get the output using split function

by GrandFather (Sage)
on Sep 03, 2012 at 05:09 UTC ( #991352=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $i;
    for ($i = 0; $i < scalar(@words); $i++) {
        print "$i: " . $words[$i] . "\n";
    }
    
  2. or download this
    for my $i (0 .. $#words) {
        print "$i: $words[$i]\n";
    }
    
  3. or download this
    print "$_: $words[$_]\n" for 0 .. $#words;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991352]
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 2016-02-08 04:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (266 votes), past polls