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

Re^2: Multidimensional arrays within arrays

by muba (Priest)
on Jan 23, 2013 at 11:25 UTC ( #1014884=note: print w/ replies, xml ) Need Help??


in reply to Re: Multidimensional arrays within arrays
in thread Multidimensional arrays within arrays

Why can't you pass the coordinates to sub C?

And do you call sub B, or does sub C call sub B? I think I'm distilling the notion that you want C to call B, am I right? Let's roll with that.

Why would this not work for you?

sub subA { # ... # generate array; # here be dragons, an' arrays an' pushes an' references # an' lots of dereferencing happens here, me lad. # ... return \@array; } sub subB { my $chart_widget = shift; my $data_aref = shift; $chart_widget->chart( $data_aref ) # or however Tk::Chart be used, + matey } sub subC { my $chart_widget = shift; my $data_aref = shift; # ... # I don't have a clue what be happenin' here, me hearty. # ... subB($chart_widget, $data_aref); }

And from your main code:

my $chart = $mw->Chart( ... ); my $data_aref = subA; subC($chart, $data_aref);


Comment on Re^2: Multidimensional arrays within arrays
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2015-07-03 11:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (51 votes), past polls