Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Attempt to free unreferenced scalar

by jweed (Chaplain)
on Feb 22, 2004 at 06:19 UTC ( [id://330895]=note: print w/replies, xml ) Need Help??


in reply to Attempt to free unreferenced scalar

Well, the only problem I can see is your last line. Return is for subroutines, for modules you need only an expression that evaluates to one. Usually, we use just the number one. By itself.

Once I deleted the return it worked fine on my machine.

Update: seems I was wrong. see Mr. Muskrat's reply, below.



Code is (almost) always untested.
http://www.justicepoetic.net/

Replies are listed 'Best First'.
Re: Re: Attempt to free unreferenced scalar
by John M. Dlugosz (Monsignor) on Feb 23, 2004 at 04:26 UTC
    I tried without the return keyword before posting, and the results were the same.

    A while back, someone pointed out that this return is allowed and more readable than a 1 hanging on the end of the file.

        When you use VM_list; that does not happen only when you try to run his module as a script.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-29 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found