induced() returns a list flattened from an array. my $qw=induced(@{ $subgraphs[$d-1] }); evaluates that return value in scalar context. If you want to return a scalar, you should join the elements of the array. If you want to return a list, you need to capture it as an array or something which provides list context.
Improve your skills with Modern Perl: the free book.
In reply to Re: Problem printing return value from a subroutine
by chromatic
in thread Problem printing return value from a subroutine
by zing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |