Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Unusual Closure Behaviour

by Anonymous Monk
on Sep 12, 2015 at 23:24 UTC ( [id://1141792]=note: print w/replies, xml ) Need Help??


in reply to Re: Unusual Closure Behaviour
in thread Unusual Closure Behaviour

Have you tried this?
#!/usr/bin/perl use strict; sub foo; sub foo { return unless $_ [0]; my $x if undef; print ++ $x, " "; foo $_ [0] - 1; } foo 29; print "\n";
It prints:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Hum...

Replies are listed 'Best First'.
Re^3: Unusual Closure Behaviour
by Anonymous Monk on Sep 13, 2015 at 05:27 UTC
     Deprecated use of my() in false conditional at - line 6.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2025-07-13 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.