sub :: {return lc pop} sub jonadab { my $lex = shift; @ARGV=qw(http://); return sub{ my ($ical) = @_; my $closure = :: $lex.".".$ical."/".$/; }} my $foo = jonadab("PerlMonks"); $\=$foo->("Org"); print shift;
Note: if you turn in code like that for homework, don't expect a good grade.
In reply to Re: To call a sub from another sub
by jonadab
in thread To call a sub from another sub
by tamaguchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |