Mr. Shawn H. Corey wrote:
> On Tue, 2008-09-30 at 22:55 +0200, Paul Johnson wrote:
>>>
>>> Inside a sub, shift without a parameter will shift @_.  Outside a sub,
>>> it will shift @ARGV.  Since it does two different things in different
>>> context, always give it a parameter.  Things that do different things
>>> should look different.
>>
>> No.
>>
>> Or, more charitably, your first two sentences are (mostly) correct but I
>> think you might find yourself fighting a losing battle with the last
>> two, both philosophically and with your specific suggestion.
> 
> "Real Perl Programmers prefer things to be visually distinct."
>   Larry Wall
> 
> I wasn't the first to have the idea.

I can't find anywhere where that is quoted in context. Considering the amount of
effort that has gone into making Perl do what is meant when the code is
ambiguous I very much doubt if he meant what you mean. If he had thought it was
a bad idea to call shift with an implicit parameter then I don't think he would
have designed the language so that you could.

Rob

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to