[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] From the Perl Conference 3.0 Perl quiz (3)



>What does this print?  and why?
>
>
>         print +(8/2).".".0.0.0

**SPOILER (I think)**
 |
 |
V























I think Perl evaluates decimal numbers first, so it sees it like so:

print +(8/2) . "." . "0.0" . "0"
== print 4 . "." . "0" . "0"
== 4.00



==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe