in reply to Re^5: Strange modification of @_
in thread Strange modification of @_

Ikegami, I'm not sure what you're talking about. If you look at my original post, I did use my ($str) = @_;. I'm not avoiding the standard calling convention.

What would like from us?

Nothing. You answered my original question. (Thanks!) There doesn't seem to be any way around one of the two fixes I mentioned above and I don't like either of them (because they feel unnatural). I think the underlying problem is that $1 is a global and that interferes with the use of pass-by-reference.

Replies are listed 'Best First'.
Re^7: Strange modification of @_
by ikegami (Patriarch) on Apr 24, 2009 at 21:58 UTC

    I'm not avoiding the standard calling convention.

    You may assign $_[0] to $str, but you also continue to use $_[0]. This continued use of @_ is the nonstandard element.