Hi, grow($part) returns an array, I don't know how to create a ref  to array
in one step.
@$part = grow($part) doesn't work here.To my knowledge, it is used for
changing the array $part refers to, but $part is not a ref , it‘s a string,
it can't refer anything until it's changed to a ref.
 $part = \(grow($part)) doesn't work either, it creates refs to elements in
the array.

2011/4/29 Uri Guttman <u...@stemsystems.com>

> >>>>> "zs" == z sway <zzway...@gmail.com> writes:
>
>  zs> foreach $part (@part) {
>  zs> $part =~ s/^\(|\)$//g;
>  zs> my @temp = grow($part); #递归调用
>  zs> $part = \@temp;
>
> no need for the @temp array. in fact if you name something temp, you
> likely don't need it at all.
>
>        $part = [ grow($part) ] ;
>
>  zs> my $a = $_[0];
>
> don't use $a (or $b) for your own variables. they are reserved for use
> by the sort function. also they are bad names in general as they don't
> tell the reader what they are for.
>
> uri
>
> --
> Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com--
> -----  Perl Code Review , Architecture, Development, Training, Support
> ------
> ---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com---------
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>

Reply via email to