Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Subroutine Produces Output but Fails to Return to Parent

by imp (Priest)
on Jan 18, 2007 at 23:04 UTC ( [id://595371]=note: print w/replies, xml ) Need Help??


in reply to Subroutine Produces Output but Fails to Return to Parent

The code you provided works for me after I add a line to print the result, so your problem is elsewhere.

You should always use both strict and warnings, as they will catch many common errors. In your example code you used mixed case in your variable names, which would be an easy place to introduce a typo.

After adding strict and warnings you should reduce the code to the simplest form that still behaves incorrectly. Chances are you will find the error by doing this, and if not we will be happy to assist you further. But please confirm that the reduced version still demonstrates the error (and that it runs of course).

  • Comment on Re: Subroutine Produces Output but Fails to Return to Parent

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://595371]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 21:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found