[Israel.pm] abs of string

Mikhael Goikhman migo at homemail.com
Sun Mar 20 14:37:43 PST 2005

On 20 Mar 2005 17:14:06 -0500, Offer Kaye wrote:
> Does anyone know why the following one-liner:
> $ perl -le'print abs 5r'
> gives a compilation error, while:

"5r" is neither a bareword nor a correct number. See


for the definition of "bareword".

> $ perl -le'print abs r5'
> doesn't?

It is the same reason why my sig does not produce an error. :-)
The bareword "r5" is taken as a string. Use "use strict" or "use warning"
to get an error or a warning respectively.


perl -le 'print+chr(64+hex)for+split//,d9b815c07f9b8d1e'

More information about the Perl mailing list