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

Re: Mystery state (possibly about whether an argument is numeric?) being maintained across calls to a sub

by BrowserUk (Patriarch)
on Jun 15, 2013 at 14:35 UTC ( [id://1039128]=note: print w/replies, xml ) Need Help??


in reply to Mystery state (possibly about whether an argument is numeric?) being maintained across calls to a sub

Can anyone shed some light on why this is happening?

Yes. You :) Use Devel::Peek on $arg in the subroutine before and after you assign to it. Eg:

sub xx { my $arg; Dump( $arg ); $arg = shift; Dump( $arg ); print "(" . ($arg & "") . ")\n"; }

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Mystery state (possibly about whether an argument is numeric?) being maintained across calls to a sub
by cheesestraws (Novice) on Jun 16, 2013 at 09:47 UTC
    Thankyou! Apparently I have managed to miss this tool entirely in my perl-ing to date.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 16:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found