Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

RE: RE: Re: Scoped Variables in a Recursive Function.

by japhy (Canon)
on Sep 28, 2000 at 21:12 UTC ( #34431=note: print w/replies, xml ) Need Help??


in reply to RE: Re: Scoped Variables in a Recursive Function.
in thread Scoped Variables in a Recursive Function.

That ought to work, but it's silly, since it creates a code reference EVERY TIME you run Merge(). There's no reason to use a code reference. Define Merge() and MergeSort() in the same block, and have @array be shared between them.

$_="goto+F.print+chop;\n=yhpaj";F1:eval
  • Comment on RE: RE: Re: Scoped Variables in a Recursive Function.

Replies are listed 'Best First'.
RE: RE: RE: Re: Scoped Variables in a Recursive Function.
by Adam (Vicar) on Sep 28, 2000 at 23:59 UTC
    Yeah, I was thinking about that... I think you are right.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://34431]
help
Chatterbox?
[stevieb]: I'm working on hiding the fact the software needs MetaCPAN::Client, as I often have a hell of a time installing it. I'm going to change it to let the user know if they do revdep that it needs to be installed, and remove that distribution ..
[stevieb]: ...from being a prereq

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2017-06-25 23:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (572 votes). Check out past polls.