in reply to Calling package function returns 1, not data from function
to:print "$late\n";
From the return doc:return $late;
(Note that in the absence of an explicit return, a subroutine, eval, or do FILE will automatically return the value of the last expression evaluated.)And from the print doc:
Returns true if successful.So, your 'latest' sub is returning the value of the last expression, which is the return value of print, which is 1 (it must have successfully printed).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling package function returns 1, not data from function
by Anonymous Monk on Dec 23, 2009 at 18:08 UTC | |
by ikegami (Patriarch) on Dec 23, 2009 at 18:49 UTC | |
by kapoor (Novice) on Dec 28, 2009 at 23:00 UTC |