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

Re: Query Parameters

Zefram via perl5-porters
December 2, 2019 14:09
Re: Query Parameters
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About