(Thanks to everyone for their comments, and especially to Damian for
 pointing me at the right bit of the manual.)

Damian quoted the perlop manpage:
>     If the operand is an identifier, a string consisting of a minus
>     sign concatenated with the identifier is returned.

Nick wrote:
>>> But barewords are not allowed under strict. So why is -bareword
>>> being allowed?

Damian wrote:
>> Because it's not a bareword. ;-)

Nick wrote:
> I think it's bad documentation - that last sentence should not use the
> identifier 'bareword' as its example identifier.

I think that's the point of using that identifier - that something
which would otherwise be a bareword is magically de-bareworded by the '-'.

Kake
-- 
http://www.earth.li/~kake/cookery/ - vegan recipes, now with new search feature
http://grault.net/grubstreet/ - the open-source guide to London
http://www.penseroso.com/ - websites for the fine art and antique trade

Reply via email to