in reply to Functions (Return V Print)

I'm wondering how you could get these symptoms, and a particular phrase you use "in the perl script I called the function". So, forgive me if I am wrong, but I wonder if you are doing this:
$var = `function.pl`;
or maybe using qx.

The effect would be exactly the symptoms you describe. A return would do nothing, but a print to stdout would be captured.

Can you confirm/deny?

Replies are listed 'Best First'.
Re^2: Functions (Return V Print)
by packetstormer (Monk) on Feb 04, 2011 at 14:17 UTC
    I can't say I fully understand but I think you mean how am I referencing the function file? I do this:
    require "functions.pm";
    Is that what you mean? Sorry, still new this all this.
      OK, you are not running the function in a different process, which would have explained your symptoms, you are loading the function from a module at run-time. We certainly need to see your code.