NEED HELP!

Matthew J Long matt.long at matthew-long.com
Mon May 14 17:49:33 CDT 2001


Thanks to everyone for you help. It is much appreciated. I was trying to use
sprintf with a C like syntax where you pass a char * as the first parameter
and receive an int back, forgetting that sprintf in perl returns the value
that you want, and takes your format string as the first parameter. Too many
stinkin languages to keep track of, I guess. Thanks for clearing things up
on a Monday. I hope to regain competence by tomorrow.

-Matt


----- Original Message -----
From: <barry_hanenburg at agilent.com>
To: <matt.long at matthew-long.com>; <pikes-peak-pm-list at happyfunball.pm.org>
Sent: Monday, May 14, 2001 2:38 PM
Subject: RE: NEED HELP!


> Matt:
>
> Try this:
>
> ....
>
> $test = 714;
> printf "%5.2f", $test;
>
> ....
>
> It should give you the desired result...
>
> Barry
>
> -----Original Message-----
> From: Matthew J Long [mailto:matt.long at matthew-long.com]
> Sent: Monday, May 14, 2001 3:14 PM
> To: Pikes Peak Perl Mongers
> Subject: NEED HELP!
>
>
> All,
>
> Can you guys give me a hand here? Given a scalar that contans the integer
> 714, how can I make it print out 714.00? I've tried several different
> variations with printf and sprintf, but to no avail. Any help would be
> appreciated.
>
> -Matt
>




More information about the Pikes-peak-pm mailing list