good chemistry is complicated,and a little bit messy -LW PerlMonks

RE: Operators: arithmetic and otherwise

 on Apr 24, 2000 at 22:31 UTC ( #8759=note: print w/replies, xml ) Need Help??

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;
• Comment on RE: Operators: arithmetic and otherwise

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

Create A New User
Node Status?
node history
Node Type: note [id://8759]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-05-24 22:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
World peace can best be achieved by:

Results (181 votes). Check out past polls.

Notices?