weird thing with say|print ++

0 views
Skip to first unread message

lam fayland

unread,
Apr 19, 2005, 7:55:59 AM4/19/05
to
In perl v5.8.6 built for MSWin32-x86-multi-thread:

my $i = 1;
print $i++, ++$i; # 1 3
my $i = 1;
print ++$i, $i++; # 3 2

in pugs:

my $i = 1;
say $i++, ++$i; # 1 3

my $i = 1;
say ++$i, $i++; # 2 2

which is right? or it's different between Perl5 and Perl6?

thanks.

/Fayland Lam/
--------------
http://www.fayland.org

Reply all
Reply to author
Forward
0 new messages