[Omaha.pm] Fwd: "3 apples" + "2 oranges"

Sean Baker pbaker at omnihotels.com
Tue Jul 18 11:21:46 PDT 2006


Perl seems to be tossing the apples and oranges out because of the +
operator.  I guessed 2 also.

Just thought it was interesting.

Sean

-----Original Message-----
From: omaha-pm-bounces+pbaker=omnihotels.com at pm.org
[mailto:omaha-pm-bounces+pbaker=omnihotels.com at pm.org] On Behalf Of Jay
Hannah
Sent: Tuesday, July 18, 2006 1:18 PM
To: Perl Mongers of Omaha, Nebraska USA
Subject: [Omaha.pm] Fwd: "3 apples" + "2 oranges"

I guessed wrong. :)

j

-----------------
>> What do you think this displays, without running it?
>> my $n = "3 apples";
>> my $m = "2 oranges";
>> print $n + $m;
>>
> 2?

5
 
_______________________________________________
Omaha-pm mailing list
Omaha-pm at pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm



More information about the Omaha-pm mailing list