Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^4: typeglob/symbolic reference question

by ikegami (Pope)
on Nov 04, 2010 at 06:16 UTC ( #869403=note: print w/replies, xml ) Need Help??

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

Maybe it's not the most useful concept (in my mindset) to bring across from C to perl with me...

Definitely, cause Perl's "&" never does anything similar to C's "&". Perl's "\" would be the closest to C's "&".

anyhow you can dereference a code reference in perl without the ampersand

$ref->(), although I don't see how the question relevant.

so any argument about what ampersand actually does in perl is debatable

Not really. It can be used to bypass prototypes (&func(...)), to call a func with parent's args (&func;), to dereference a code ref (&$ref) and surely more. None of them return an address (like C's "&") or anything similar (like Perl's "\").

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (1)
As of 2021-10-25 03:50 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (89 votes). Check out past polls.