Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: typeglob/symbolic reference question

by bduggan (Pilgrim)
on Nov 04, 2010 at 16:58 UTC ( #869508=note: print w/replies, xml ) Need Help??


in reply to Re^3: typeglob/symbolic reference question
in thread typeglob/symbolic reference question

And also
*{$x}{CODE}->() hi again
Interesting that assigning to *{$x}{CODE} is not allowed.
*{$x}{CODE} = sub { print "hi" }; Can't modify glob elem in scalar assignment...

Replies are listed 'Best First'.
Re^5: typeglob/symbolic reference question
by BrowserUk (Pope) on Nov 04, 2010 at 17:46 UTC
    Interesting that assigning to *{$x}{CODE} is not allowed.

    If I recall correctly--which i quite possibly don't--there is a proper syntax for doing that.

    But, like many people I suspect, I went through the process of playing with globs many moons ago, trying all the different forms and syntaxes, and then promptly forgot most of them because the are so few occasions when they are useful.

    It's one of those dark corners of Perl that's good to know it exists for the rare occasions that a use for it pops up. But when (if) it does, I have to go off and look up the syntax.


    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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2020-10-24 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (242 votes). Check out past polls.

    Notices?