Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

RE: Operators: arithmetic and otherwise

by Anonymous Monk
on Apr 24, 2000 at 18:31 UTC ( [id://8759]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Operators: arithmetic and otherwise

$a=3; $b="x"; $c=4; $a*=3; #$a=$a*3; $a now equal to 9; $a/=3; #$a=$a/3; $a (9) divided by three which equals 3; $a+=2; #$a=$a+2; $a is now equal to 5; $a-=2; #$a=$a/2; $a is now equal to 3; $b x=3; #$b=$b x $3 $b is now equal to "xxx"; $b .="33"; #b=$b."33" $b is now equal to "xxx33";
Typo in 7th line? Perhaps ought to be #$a=$a-2;

Replies are listed 'Best First'.
Re^2: Operators: arithmetic and otherwise
by tjshankar (Initiate) on Apr 19, 2005 at 20:55 UTC
    Typo in 8th line. #$b=$b x 3 $b is now equal to "xxx";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://8759]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.