[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Omaha.pm] Fwd: "3 apples" + "2 oranges"
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@pm.org
[mailto:omaha-pm-bounces+pbaker=omnihotels.com@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@pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm