SPUG: Something to loose sleep over
Colin Meyer
cmeyer at helvella.org
Fri Apr 28 12:43:45 CDT 2000
David,
I tried your code, and got the following results, which is what I expected:
ARRAY(0x8102b84) B C,
ARRAY(0x8102bd8) E F,
ARRAY(0x8102c2c) Y Z,
How about posting some more code that produces the confusing results? I suspect that you excerpted a little too tightly and cut out the bit that was actually causing the problem.
I tried your code under both perl5.00503 and perl5.6.0 and got the same results.
-C.
p.s. I added a double quote mark in your print line:
print "@_,\n";
On Fri, Apr 28, 2000 at 12:19:50AM -0800, David Waring wrote:
> Warning this is a demonstration of a bug that only appears in certain
> installations of Perl. It is a weird bug and I am really pointing it
> out as a topic of conversation. Ignore this if you are not interested
> in really yucky stuff.
>
> .....
> # call a subroutine several times with different parameters
>
> asubroutine(\@A,"B","C");
> asubroutine(\@D,"E","F");
> asubroutine(\@X,"Y","Z");
>
>
> sub asubroutine{
> print @_,\n";
> $x= shift @_;
> $y= shift @_;
> $z= shift @_;
> }
>
> RESULTS
> ABC
> ABC
> ABC
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe
Email to majordomo at pm.org: "action" spug-list your_address
More information about the spug-list
mailing list