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 <[email protected]>wrote:

> On Fri, 11 Jan 2013 10:33:02 +0700
> budi pearl <[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]
> http://learn.perl.org/
>
>
>

Reply via email to