p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   Perl (http://p2p.wrox.com/perl-196/)
-   -   Beginning Perl book: NaN vs 0 (http://p2p.wrox.com/perl/95425-beginning-perl-book-nan-vs-0-a.html)

jhad January 14th, 2016 10:14 AM

Beginning Perl book: NaN vs 0
 
In chapter 2, code string4.plx the output given for the code

Code:

#!/usr/bin/perl
#string4.plx
use warnings;
print "Ba". "na"x4*3, "\n";
print "Ba". "na"x(4*3), "\n";

is

Ba0
Banananananananananananana

but running this on Strawberry Perl 5.22.2 for Windows 10 gives

BaNaN
Banananananananananananana

What's changed from the Perl point of view?


All times are GMT -4. The time now is 11:30 PM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.