Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
We don't bite newbies here... much
 
PerlMonks  

Re: Generating standard length strings

by RazorbladeBidet (Friar)
on Apr 14, 2005 at 15:00 UTC ( [id://447914]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Generating standard length strings

You want string multiplication a la:
sub standard_fill { my $string = $_[0]; my $length = $_[1]; my $orig_string_length = length($string); $string .= " " x ($length - $orig_string_length); return $string }
(code untested)

I'll leave the golfing to the PGA tour ;)
--------------
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://447914]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.