develooper Front page | perl.perl5.porters | Postings from December 2019

Re: Query Parameters

From:
Zefram via perl5-porters
Date:
December 2, 2019 14:09
Subject:
Re: Query Parameters
Message ID:
20191202140859.ffuyd3qqju3yy343@fysh.org
Dave Mitchell wrote:
>    ?$x       peek ahead to the next arg
>    ??$x      peek ahead and see if there is a next arg

Poor Huffman coding: the latter will be used more often.  I think the
peek-ahead cases should (all, consistently) have a second character after
the "?" and before the sigil, and the predicate case should only have one
"?".

>They cannot be a placeholder: i.e. these aren't legal: ??$, ?$, ?@, ?%.

Seems to me that those should be legal no-ops.  Except for the hash one,
which isn't even a no-op, because it would enforce even parity of the
remaining argument list.

-zefram



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About