Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: undefining one slot of a typeglob

by broquaint (Abbot)
on Feb 24, 2004 at 00:45 UTC ( [id://331272]=note: print w/replies, xml ) Need Help??


in reply to undefining one slot of a typeglob

Just use undef e.g
sub foo { print "yep\n"; } @foo = $foo = 'a string'; my $f = 'foo'; foo() if defined &foo; undef &$f; print "nope\n" unless defined &foo; print "\$foo: $foo\n"; print "\@foo: @foo\n"; __output__ yep nope $foo: a string @foo: a string
HTH

_________
broquaint

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-25 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found