[Israel.pm] abs of string

Mikhael Goikhman migo at homemail.com
Mon Mar 21 02:04:44 PST 2005


On 21 Mar 2005 10:09:56 +0200, Offer Kaye wrote:
> 
> Putting aside for a moment the issue of using strict and warnings
> (which is of course the correct thing to do), I still don't understand
> why "r5" is a bareword, while "5r" isn't. The ref you gave doesn't
> help.

That url hints: isolated word like test_value that might be sub and
might be string depending on context, is bareword.

"r5" is a valid sub identifier. "5r" is on the other hand two tokens,
number "5" and bareword "r". It would be ok to write "5+r", but there is
an operator missing in "5r" between "5" and "r"; and the perl compiler
reports this syntax error.  perl -e '5r'

Regards,
Mikhael.

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



More information about the Perl mailing list