Re: Format interger printing, MORE INFO

2001-10-12 Thread Brett W. McCoy
On Fri, 12 Oct 2001, Chuck wrote: > It is now printing the number as a negative: > print "\n"; > printf "%15d bytes free in $phost:/var/tmp\n", $freespace; > > Result: > -48288 bytes free in smh4:/var/tmp Your integer is too big to be handled as an integer. :-) Use %15.f for your format

Re: Format interger printing, MORE INFO

2001-10-12 Thread Brett W. McCoy
On Fri, 12 Oct 2001, Chuck wrote: > Oh my god. *BONK*' > > You are correct, this is no doubt the dumbest mistake I have ever made. Bah, we've all been there. It's one of the best ways to learn: "That which does not kill us makes us stronger." :-) -- Brett

Re: Format interger printing, MORE INFO

2001-10-12 Thread Chuck
;[EMAIL PROTECTED]> To: "'Brett W. McCoy'" <[EMAIL PROTECTED]>; "Chuck" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, October 12, 2001 9:54 AM Subject: RE: Format interger printing, MORE INFO > > -Original Message- >

Re: Format interger printing, MORE INFO

2001-10-12 Thread Chuck
PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, October 12, 2001 9:54 AM Subject: RE: Format interger printing, MORE INFO > > -Original Message- > > From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] > > Sent: Friday, October 12, 2001 12:17 AM > > To: Chu

Re: Format interger printing

2001-10-12 Thread Chuck
I get the formatting correct) Any ideas?? thankx., CC - Original Message - From: "Vinicius Jose Latorre" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, October 11, 2001 5:42 PM Subject: Re: Format interger printing >

RE: Format interger printing, MORE INFO

2001-10-12 Thread Bob Showalter
> -Original Message- > From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 12, 2001 12:17 AM > To: Chuck > Cc: Vinicius Jose Latorre; [EMAIL PROTECTED] > Subject: Re: Format interger printing, MORE INFO > > > On Thu, 11 Oct 2001, Chuck wrot

Re: Format interger printing, MORE INFO

2001-10-11 Thread Brett W. McCoy
On Thu, 11 Oct 2001, Chuck wrote: > Here is a snippet: > printf "%20d bytes free in $phost:/var/tmp\n", $freespace; > printf "$shipsize bytes being shipped.\n"; > > Here is the output: > -1012379648 bytes free in smh4:/var/tmp > 359731200 bytes being shipped. It's because 3282567168, apparently,

Re: Format interger printing

2001-10-11 Thread Brett W. McCoy
On Thu, 11 Oct 2001, Chuck wrote: > Nothing is working, I have tried every permutation. I tried this right on the command line: $ perl -e 'printf "%10d\n", 25' 25 -- Brett http://www.chapelperilous.net/ -

Re: Format interger printing

2001-10-11 Thread Brett W. McCoy
On Thu, 11 Oct 2001, Chuck wrote: > Arg, I am going crazy. Ok, it has been a long time since I was kneee deep in > perl, but why does this not work: > > printf "%-10d bytes", $x; Remove the - printf "%10d", $x; Works for me. -- Brett http://www.chapel

Re: Format interger printing, MORE INFO

2001-10-11 Thread Vinicius Jose Latorre
ot;, $freespace; > printf "$shipsize bytes being shipped.\n"; > > Here is the output: > -1012379648 bytes free in smh4:/var/tmp > 359731200 bytes being shipped. > > ??? > > CC > > > - Original Message - > From: "Vinicius Jose Lat

Re: Format interger printing

2001-10-11 Thread Vinicius Jose Latorre
ot;Vinicius Jose Latorre" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, October 11, 2001 4:08 PM > Subject: Re: Format interger printing > > > > > > Try: > > > >printf "%10d byt

Re: Format interger printing, MORE INFO

2001-10-11 Thread Chuck
ot;$shipsize bytes being shipped.\n"; Here is the output: -1012379648 bytes free in smh4:/var/tmp 359731200 bytes being shipped. ??? CC - Original Message - From: "Vinicius Jose Latorre" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> S

Re: Format interger printing

2001-10-11 Thread Chuck
Cc: <[EMAIL PROTECTED]> Sent: Thursday, October 11, 2001 4:08 PM Subject: Re: Format interger printing > > Try: > >printf "%10d bytes", $x; > > > Vinicius > > -- Chuck <[EMAIL PROTECTED]> wrote: > > Arg, I am going crazy. Ok, it has be

Re: Format interger printing

2001-10-11 Thread Vinicius Jose Latorre
Try: printf "%10d bytes", $x; Vinicius -- Chuck <[EMAIL PROTECTED]> wrote: > Arg, I am going crazy. Ok, it has been a long time since I was kneee deep in > perl, but why does this not work: > > > printf "%-10d bytes", $x; > > It does not pad the output with spaces or anything. > >

Format interger printing

2001-10-11 Thread Chuck
Arg, I am going crazy. Ok, it has been a long time since I was kneee deep in perl, but why does this not work: printf "%-10d bytes", $x; It does not pad the output with spaces or anything. if x = 25 this is the result: 25 bytes I want it tobe: 25 bytes Anyone have any ideas. I jus