develooper Front page | perl.perl5.porters | Postings from August 2013

Re: [perl #115158] a2p wrongly considers string literal "0" isalways false

Thread Previous | Thread Next
From:
Zefram
Date:
August 28, 2013 15:03
Subject:
Re: [perl #115158] a2p wrongly considers string literal "0" isalways false
Message ID:
20130828150328.GF31643@fysh.org
Ralph Corderoy wrote:
>                                              If the string is a
>constant in the source then it's true, not false.  Perl's a2p(1) doesn't
>handle this subtlety.

a2p isn't meant to be an implementation of awk, but an approximate
translator.  It deliberately compromises on awk semantics in order
to produce idiomatic Perl.  So this problem, arising from a low-level
difference in language semantics, is unfortunate but not a bug.

-zefram

Thread Previous | Thread Next


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