i think you can get this done if you use printf
not sure about the dynamically determining the length, but you can always
use an IF block for that
perldoc printf is your friend here =)
hth,
Jos
----- Original Message -----
From: "Javier Bellido" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 19, 2001 4:40 PM
Subject: formating numbers
>
> Hi friends!
>
> I need to print a data file in this way:
>
>
> 0001 kakkallsas........
> 0101 ksakslakskaks.....
> 0201 kkkaskaskkasa.....
>
> How I get the numbers of the first column have the same lenght (4
> numbers)?
>
> And, It's possible assign the length of the numbers dinamically?
> (if length of data < 999 then three numbers, if < 9999 four ...)
>
> Thanks for your help
>
> I'll hope you understand the question (english is not my mother
> language)
>
> Er_pelle
>
>
> _____________________________________________________________________
> Correo gratis con POP3, IMAP, en 18 idiomas...: http://www.mundomail.net
> 100 MB para tu web y mucho m�s: http://www.vermail.net
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]