Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: printing 20 characters in a line.

by luckypower (Beadle)
on Nov 14, 2008 at 05:21 UTC ( [id://723565]=note: print w/replies, xml ) Need Help??


in reply to printing 20 characters in a line.

hellow ....

your code needs some modifications ..

in your code if ($count/$align==1){print "\n"; $flag=1;}
it will print new line on terminal not in file.so change it with print OUT "\n";

if($flag==1){$count=0;}

after this line the value of $flag variable is always 1 so change it .....

One more thing define $flag & $count outside the for loop.

no need of $align. you can direct compare the $count == 20 .

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found