sub procLegn
{
        my $array_ref = shift; # or $_[0] if you prefer
        my @legn = @$array_ref; # dereference the pointer
}


Brad

>  -----Original Message-----
> From:         [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, January 16, 2002 4:51 PM
> To:   Perl
> Subject:      Passing array to subroutine
> 
> Hi All,
> 
> I have something similar to the following:
> 
> @legn = procLegn(\@legn);
> 
> sub procLegn
> {
>     my @legn = ?????;
> 
>     code.....
> }
> 
> I'm trying to dereference the pointer (\@legn) which was passed to the
> sub-routine.
> How do I do that?
> 
> Thanks in advance,
> Mohammed

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to