in reply to How do I specify Maximum Field Widths

If you have lots and lots of output you might want to use an output format. You declare the format once, and then use it repeatedly (with <kbd>write</kbd>) In the example I use a format for STDOUT, you can also do it with file-handles.
format STDOUT = just 5 digits: @>>>> $n, . $n = 123456789; write; $n = 987654321; write; $n = 333; write;
There is a man-page just about formats: perlman:perlform
--
Brigitte    'I never met a chocolate I didnt like'    Jellinek
http://www.horus.com/~bjelli/         http://perlwelt.horus.at