in reply to Re: ttchop()/tt and list assignments
in thread chop() and list assignments
I should have been more specific about how we arrived at the problem. I wanted the function to work if it was passed a literal (remember that the elements of @_ are aliases, and that an assignment to @_ "de-aliases" @_'s elements). sub foo {chop @_}; would trip a Modification of a read-only value attempted error if passed 'string' or 10 + 100.
At any rate, this was just in fun, and I noticed this "problem" and wanted to find out why Perl was behaving this way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: chop() and list assignments
by japhy (Canon) on Mar 06, 2001 at 08:49 UTC | |
by tye (Sage) on Mar 06, 2001 at 10:52 UTC |