SPUG: Bizarre copy of an ARRAY
Richard Anderson
Richard.Anderson at raycosoft.com
Thu Jun 28 00:47:46 CDT 2001
I believe the code that throws the error is using something incorrectly in a
list context. Here's an example from the perl5-porters at perl.org list:
****************************************************
> for (1..4) {
> push @a, $_, last if $_ == 3;
> }
> print "@a\n";
> __END__
> Bizarre copy of ARRAY in last at - line 1.
>
> The behavior is the same in Perl 5.005_04, 5.005_03, and 5.6.0. Of course
> the user is wrong but why miss an opportunity to tell them so in more
> florid terms? :-)
It fails back to at least 5.002. But it works in Perl4 if you add
brackets to the push. :-)
And it's not clear in what sense that's "wrong". It certainly shouldn't
attract a fatal error, tho' it would be a candidate for the proposed
new warning "next/last/return/ ... used where value wanted".
******************************************************
What is the code at Heavy.pm line 79?
Cheers,
Richard
----- Original Message -----
From: <ced at carios2.ca.boeing.com>
To: <gardner at cardomain.com>; <spug-list at pm.org>
Sent: Wednesday, June 27, 2001 9:45 PM
Subject: Re: SPUG: Bizarre copy of an ARRAY
> > Bizarre copy of ARRAY in aassign at /usr/lib/perl5/5.6.0/Carp/Heavy.pm
line
> 79.
>
> > What? This is a bizarre error message. Any ideas on what this could mean
> (or why it is showing up?)
>
> > Running in mod_perl, using (as you can see) 5.6.0.
>
> I seem to recall some seeing a discussion somewhere. You might
> want to try a search of Googol or p5p archives.
>
> hope this may help,
> --
> Charles DeRykus
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
> Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
> For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
> Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
>
>
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list