1:23am
>
> Unless otherwise directed, fill in the blank.
>
> ==
>| Sigils and data types |
> ==
>
> Sigil Variable type
> = ==
> my $a = $a;#refrences whatever was the scoped $a before
in the following paragraph I said global var, meant lexical. my bad =/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Stuart Clark wrote:
> Hi,
> I am trying to move the decimal point 2 places to the the left.
>
> Eg : To make 4536233 into 45362.33
>
> I tried this
> $total = "4536233";
> $total = sprintf("%0.2f",$total);
> print "$total";
> But I get this
> 4536233.00
>
> Can anyone help please
>
> Reg
There is no way to re-define the variable in perl. The $, @, and % all
have thier own seperate namespaces, and thus the definition
my $in;
my @in;#creates *both* a scalar and array
the best way is to
use warnings;#start of every program!
and it will give you a bit of ugly output to S
To join strings there are several options
for printing your best bet is to send a comma seperated list, as that
will have fewer syscalls (as per llama book advice).
EX:
print "Hello", " World", $scalar_that_will_be_attached_to_end,
@array_that_will_be_flattened;