Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: General Purpose String Padding

by saintmike (Vicar)
on Feb 01, 2006 at 20:48 UTC ( [id://527165]=note: print w/replies, xml ) Need Help??


in reply to General Purpose String Padding

Have you looked at Perl6::Form?

Replies are listed 'Best First'.
Re^2: General Purpose String Padding
by GrandFather (Saint) on Feb 01, 2006 at 21:00 UTC

    In particular look for the section "Field filling".


    DWIM is Perl's answer to Gödel
Re^2: General Purpose String Padding
by thedoe (Monk) on Feb 01, 2006 at 21:01 UTC

    Perl6::Form does not seem to be a solution to a simpler form of this.

    I would still need to create the template by using something like:

    my $template = $dir eq 'R' ? '<' x $max_length : '>' x $max_length;
    Also, I do not see anything about padding with a specific character. It seems Perl6::Form only pads with spaces.
    See this portion now, thanks Grandfather.

    Still quite a nice module though, I will have to remember it for general formatting in the future.

      The idea would be to discard $max_length entirely. Whatever is providing the value stored in $max_length would now provide a form/template. Of course, this is not necessarily possible in your case.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-24 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found