Hi Shawn, When trying to accessed inside subroutine , i got:
Type of arg 1 to each must be hash (not hash element) at ./print_path.plline 41, near "}) " Execution of ./print_path.pl aborted due to compilation errors. this is work: while (my ($start, $end) = each %{$routes{$label}}) { but this not: while (my ($start, $end) = each %{$edges{$label}}) { Thanks. --budhi On Fri, Jan 11, 2013 at 10:47 AM, Shawn H Corey <shawnhco...@gmail.com>wrote: > On Fri, 11 Jan 2013 10:33:02 +0700 > budi pearl <budipe...@gmail.com> wrote: > > > my $id = "ROUTE-252"; > > print Dumper $routes{$id}; > > > > print_path($id, \%{$routes{$id}}); > > I think you want: > > print_path( $id, $routes{$id} ); > > > -- > Don't stop where the ink does. > Shawn > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > >