Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Passing a reference from a subroutine.

by roboticus (Chancellor)
on Dec 07, 2012 at 16:23 UTC ( #1007778=note: print w/replies, xml ) Need Help??


in reply to Passing a reference from a subroutine.

Try changing:

return @\@AoA;

to

return \@AoA;

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: Passing a reference from a subroutine.
by Anonymous Monk on Dec 07, 2012 at 16:34 UTC
    Sorry, that was a typo, and even with "return \@AoA;" it still doesnít work.

      The syntax is clearly correct (as shown in the example below). So if you're getting the proper data with Dumper in your for loop, then you're likely damaging the data between the Dumper call and your return statement.

      $ cat t.pl #!/usr/bin/perl use strict; use warnings; sub get_data { my $data = shift; my @AoA = (1 .. $data); return \@AoA; } my $aref = get_data(5); print join(", ", @$aref), "\n"; marco@Boink:/Work/Perl/Sudoku $ perl t.pl 1, 2, 3, 4, 5

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

        Maybe how I am formatting the data is not conventional right?
        push @{ $AoA[$c] },$$one_num, $$account_num, $name, $new_name, $plano +, $passdate, $todays_date, $descont, $firm, $value, $thetotal, $commi +ted;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007778]
help
Chatterbox?
[Corion]: Discipulus: If you want to rewrite the SVG, then yes, something like XML::Twig should be enough. I would try to not modify the SVG but only modify the display, but so far I haven't convinced IE to change the style...
Corion gives up
[Discipulus]: ah! so you mean if i need a static image i can use Twig, if on the fly better css selector and mody attrs (jquery?), rigth?
[LanX]: not sure what you guys are taking about, but a DOM manipulation in JS shouldn't be difficult
[Corion]: Discipulus: Yeah, that's what I would try (but so far, I can't even change the colors manually in the SVG, which is why I gave up ;) )
Discipulus bad sign..
[Discipulus]: italian doc says to modify somehow the initial SVG before using it with D3.js

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (13)
As of 2017-03-23 09:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (285 votes). Check out past polls.