Re: [Perl-unix-users] silly question...

2002-01-21 Thread Edward G. Orton
- Original Message - From: "Geoff Ellis" <[EMAIL PROTECTED]> To: "Unix (E-mail)" <[EMAIL PROTECTED]> Sent: Monday, January 21, 2002 9:59 AM Subject: [Perl-unix-users] silly question... > could someone tell me how to pad right to left with spaces in a srintf > function.. > ie. how to con

Re: [Perl-unix-users] silly question...

2002-01-21 Thread Jason Purdy
Hrmmm ... need some more details - are you always expecting to put 4 0's at the end? If so, it would be a simple: $data = '001023'; sprintf ( "%s", $data ); Don't use %d in the printf() - that will strip away the leading 0's. Jason If memory serves me right, on Monday 21 January 2002 09:

Re: [Perl-unix-users] silly question...

2002-01-21 Thread Kuhnibert
this helps? TK im /u2/dbs> perl -e 'printf "%-10sblabla","001023";' 001023blabla same with sprintf with regard to the format till > could someone tell me how to pad right to left with spaces in a srintf > function.. > ie. how to convert "001023" into "001023" where s is a space.. > > t