Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: printing 20 characters in a line.

by ikegami (Patriarch)
on Nov 14, 2008 at 06:11 UTC ( [id://723570]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for (0..$#array){
        if ($_ % 20 == 19){
    ...
            print OUT "$array[$_] ";
        }    
    }
    
  2. or download this
    for (@array){
        if (++$cnt % 20 == 0){
    ...
            print OUT "$_ ";
        }    
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found