in reply to Variable behaving as a function call
c:\@Work\Perl\monks>perl -wMstrict -le "sub hiya { print 'hello there ', $_[0]; } hiya('sailor'); ;; my $coderef = *hiya{CODE}; $coderef->('everybody'); " hello there sailor hello there everybody
Update: Please see -> operator discussion The Arrow Operator in perlop; *foo{THING} discussion in Typeglobs and Filehandles in perldata.
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Variable behaving as a function call
by ikegami (Patriarch) on May 11, 2016 at 19:31 UTC | |
by AnomalousMonk (Archbishop) on May 11, 2016 at 19:35 UTC | |
|
Re^2: Variable behaving as a function call
by dirtdog (Monk) on May 11, 2016 at 19:23 UTC |