CC: | xenoterracide [...] gmail.com |
Subject: | interesting output from simple code |
I find this behavior peculiar seems that re.pl behaves differently from
regular perl...
re.pl
$ print "Test one: ", 6 > 3 && 3 > 4, "\n";
Test one:
1
$ print "Test two: ", 6 > 3 and 3 > 4, "\n";
$ARRAY1 = [
'',
"\n"
];
$ print ("Test two: ", 6 > 3) and 3 > 4, "\n";
$ARRAY1 = [
'',
"\n"
];
$ exit
Test two: 1Test two: 1%
same code in a script
./test.pl
Useless use of a constant (
) in void context at ./test.pl line 5.
Useless use of a constant (
) in void context at ./test.pl line 6.
Test one:
Test two: 1Test two: 1%
in both cases use 5.012; use warnings; should be enabled.
I don't understand why the output for the second 2 isn't printed right
away, and why the warnings are never printed in re.pl the $ARRAY is just
of course a dump.