Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Formatting Into Columns

by PhiRatE (Monk)
on Jul 23, 2002 at 22:10 UTC ( #184625=note: print w/replies, xml ) Need Help??


in reply to Formatting Into Columns

perldoc perlform

# Define the format, left align first, right align remainder format Schema = @<<<<<<<< @>>>>> @>>>>> @>>>>> $key, $s[0], $s[1], $s[2] . $~ = "Schema"; # Set the format we're going to use for $key (sort keys %hash) { @s = split(' ',$hash{$key}); write; }

Enjoy. (Consider in your next post specifying the exact format of $hash{$key}, in this case I've assumed it was a space-seperated string of numbers, but maybe it was an array-ref instead and you just didn't mention the join..)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2023-05-31 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?