Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
here subroutine h has to print the number of contents of each array........but this program doesnt work.....sub h { my ($x,$y)=@_; print "the val of x is $#$x and y is $#$y\n"; } sub j ($i, $j, $k){ print "\ni am in the function j\n\n"; &$k($i,$j); } @ar = qw/1 2 3 4/; @vr = qw/56 7 8 9/; &j (\@ar, \@vr, \h);
janitored by ybiC: Balanced <code> tags around codeblock, as per Monastery convention
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using callback function
by antirice (Priest) on Aug 24, 2004 at 04:06 UTC | |
|
Re: using callback function
by BrowserUk (Patriarch) on Aug 24, 2004 at 04:08 UTC | |
|
Re: using callback function
by murugu (Curate) on Aug 24, 2004 at 04:17 UTC | |
|
Re: using callback function
by ihb (Deacon) on Aug 24, 2004 at 10:32 UTC |