CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Aligning text

 



the goat boy
New User

May 28, 2008, 10:51 AM

Post #1 of 2 (322 views)
Aligning text Can't Post

Hi there

I am kinda new to all this, so please bear with me!

I am working on a database project for collage and i need a little help.

i am printing out some text into a file, for instance:

number name quantity price
45 Pies 4 0.99
99 chocolate 8 1.99

now my problem is the formatting. i would like to have all the data in neat rows. i have tried using \t, but this doesnt work as the entries are not fixed length.

is there some way i can fix the length of the strings, so i can format it better?

i hope this is the right place to be posting.

i am not using HTML, as i am writing to a text file.

any help will be greatly appriciated!


KevinR
Veteran


May 29, 2008, 12:23 AM

Post #2 of 2 (309 views)
Re: [the goat boy] Aligning text [In reply to] Can't Post

http://perldoc.perl.org/perlform.html
-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives