in reply to whats wrong with my sub-routine ??
Can anyone spot anything?You need to dereference your array references e.g
See. tye's References quick reference for info references and be sure to use strict to catch these sort of errors.my @ar = qw/ foo bar baz /; func(\@ar); sub func { my $ar = shift; ## note the dereference via -> print $ar->[0]; } __output__ foo
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: whats wrong with my sub-routine ??
by Coplan (Pilgrim) on Apr 23, 2003 at 16:39 UTC | |
by Ovid (Cardinal) on Apr 23, 2003 at 16:48 UTC | |
by dragonchild (Archbishop) on Apr 23, 2003 at 17:17 UTC | |
by Ovid (Cardinal) on Apr 23, 2003 at 17:19 UTC |