http://www.perlmonks.org?node_id=930226


in reply to Reaped: print format

Your code an output are kind of a mess, which really makes trying to understand what output you're looking for... try using code/blockquotes to clean it up. Also, that's not enough of your code to really understand your current format string. What are all those vars for? What does each one represent?

Shooting in the dark, I think you're looking for something more like this:

printf( "%-${name_length}s %-10s %-10d\n", "Name", "DOB", "AGE" ); printf( "%-${name_length}s %-10s %-10d\n", $std_name, $dob, $age );

--Dave