CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [rpaskudniak] wantarray returns 1 when function called in void context: Edit Log



FishMonger
Veteran / Moderator

Jul 29, 2013, 7:57 AM


Views: 6894
Re: [rpaskudniak] wantarray returns 1 when function called in void context


Quote
In this situation, I do *NOT* want to execute a return(something); I just want to fall back to the caller with no returned value.

That contradicts your opening problem description and code.

Quote
It can return a scalar if called in a scalar context, or a transform of the original array


So what do you really want it to do?

Even without an explicit return statement, the sub will return the result of the last statement it executed.


(This post was edited by FishMonger on Jul 29, 2013, 7:58 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Jul 29, 2013, 7:58 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives