Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Formatting Into Columns

by PhiRatE (Monk)
on Jul 23, 2002 at 22:10 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found