On Thu, 14 Apr 2005, Rajarshi Das wrote:
> Barewords acccording to perldata.pod are "words that donot have any
> other meaning in grammar".
>
> 1) So, does this mean that any word which is not reserved is a
> bareword ?
Off the top of my head, every "token" of text in Perl is either:
* an operator: +, *, =~, s///, ..
* a built-in function: chomp(), map(), grep()
* an imported function or method from a module: $cgi->param()
* a user defined subroutine or method: do_stuff_with()
* a string: "including" qw{ things like }, qq[ this ], 'or', "this"
* a bareword: FILEHANDLE, etc
I may have missed a class or two, but that's most of them.
> 2) What exactly would be a utf8 bareword ? Is it any utf8 encoded
> character ?
A non- operator / function / method / subroutine / string that includes
one or more UTF8 characters.
> Any examples ?
> Would "\x69\x22" qualify as a utf8 bareword ?
Well, if used exactly as you have it there, it's a string, because it's
wrapped in double quotes. If you just had
\x69\x22
by itself, then yes, it would be a bareword.
--
Chris Devers
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>