[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: perlrun.pod lies :)



On Mon, 10 Jan 2000 14:53:18 EST, Ilya Zakharevich wrote:
>Gurusamy Sarathy writes:
>> >That's not entirely true.  It stops when it reaches an argument BEGINNING
>> >with '--':
>> >
>> >  % perl -s prog -foo -bar -this-works --this-stops processing
>> 
>> Try this.
>
>>  		break;
>> -	    if (argv[0][1] == '-') {
>> +	    if (argv[0][1] == '-' && !argv[0][2]) {
>>  		argc--,argv++;
>
>Why not add 
>    || isSPACE(argv[0][2])
>?  This way it may continue to work as before on the #! line.

The shebang line continues to work the way it did.

    % cat stest5005
    #!/usr/bin/perl5.005 -ls -- glarch
    print ${"-foo"};
    % ./stest5005 --foo=bar
    
    % cat stestnew
    #!./perl -ls -- glarch
    print ${"-foo"};
    % ./stestnew --foo=bar
    bar

What's the problem?


Sarathy
gsar@ActiveState.com


Follow-Ups from:
Ilya Zakharevich <ilya@math.ohio-state.edu>
Jeff Pinyan <jeffp@crusoe.net>
References to:
Ilya Zakharevich <ilya@math.ohio-state.edu>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]