> > #!/usr/bin/perl -w
> >
> > $num =1.12345;
> >
> > my $tax_formated = sprintf("%.2f", $num); # <--- THIS LINE
### $tax_formated is used in a few places....
> The important thing is, does it do what youo are expecting it to do?
Well yes, I think so. I wanted to cut down on the times I was calling sprintf("%.2f",
$num);
This is new function to me :)
One more quick question here has to with filling a HASH
my (%bags_ordered,$bag);
# is it ok to mix match the type of variables inside a
# my vars declaration?
@bags = param('handbag'); #CGI.pm
####
foreach my $bag (@bags){
$bags_ordered{$bag} = {} unless exists $bags_ordered{$bag};
}
####
### Is the code below -- more better and or correct?
foreach my $bag (@bags){
$bags_ordered{$bag} = $bag unless exists $bags_ordered{$bag}
}
Thanks!
Dave
==============================================
Cora Connection: Your West African Music Source
Resources, Recordings, Instruments & More!
<http://www.coraconnection.com/>
==============================================
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]