fixed | width | format ------+-------+------- foo | bar | baz #### my $tmpfile = 'c:/tmp/tmp.txt'; $str = 'widget'; $cost = 10; format Something = Item: @<<<<<<<<@>>>>> $str, '$' . sprintf("%.2f",$cost) . # format is a pain in the ass and won't write to an IO::Handle so we # need to go through these contortions open TMP, "+>$tmpfile" or die $!; select(TMP); # need to select our file as the output handle for write $~ = 'Something'; # now select our format write TMP; # now write it seek TMP, 0, 0; # up to the top of the file to read it select(STDOUT); # reinstate STDOUT as our ouput handle @data = ; # read in our formatted data close TMP; # clean up unlink $tmpfile; print @data; # wohoo