Past-pm printing the return value of the main routine
by Allison Randal other posts by this author
Dec 12 2006 3:45PM messages near this date
[perl #41082] [PATCH] Cygwin: conflicting types for _LIB_VERSION
|
Re: Past-pm printing the return value of the main routine
In Punie or Perl 6, when I execute a simple statement:
print "2";
It prints "21". This is because a) the return value of a successful
print is "1", b) the main routine is returning the value of the last
statement (note this is correct for Perl, but isn't correct for all
languages), and c) HLLCompiler is printing out the return value of the
eval'd code here:
376 save_output_1:
377 print ofh, result
378 close ofh
Commenting out line 377 gives the correct behavior of just printing "2".
My question is, why is HLL compiler printing out the return value of the
main routine?
Allison
|