in reply to How to return a two dimensional array from a function in Perl?
(But I would be inclined to add some checks, and Carp if the input list is empty or includes anything that isn't an array ref.)sub add_edge { my @graph; for ( @_ ) { push @graph, [ @$_ ]; } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to return a two dimensional array from a function in Perl?
by gunners.newark (Initiate) on Nov 03, 2008 at 16:47 UTC |