On Saturday 06 October 2001 03:47 pm, Erik Lechak wrote: > Thank you for the info. I am more engineer than computer scientist, > so please excuse the ignorance behind these questions.
No problem. > > > Except that the operator truly is simply an underscore. But it's also a > > valid identifier character, so where it may be confused with that, you > > are simply required to make it less ambiguous to the parser. > > > > $a _= $b _ $c; # $a _= $b _$c; > > ${a}_=${b}_$c; > > %h{$s}_="Hello, "_"world!\n"; > > > > As Larry said, no different that the other operators that also consist > > of valid character identifiers. > > I understand that the operator is just the underscore. However, in the > third edition of the camel book on page 49, the second paragraph, it > states that "An identifier is a token that starts with a letter or > underscore and contains only letters, digits, and underscores." Since > there are no singel letter operators, no single digit operators, but now > we see the advent of the underscore operator, it follows that the > underscore will be the only operator that could be confused as part of the > variable name. 'x' is a single letter operator. > > 1) My question is what other operator could be confused with an > identifier? Not including the list operators or control flow keywords: eq, ne, gt, lt, ge, le, cmp, x, and, or, not, xor $a = $bx4; # $a = "$b"x4; $a = $b x 4; if ($one foo || $o nefoo) # if ("$o"ne foo); if ($o ne foo) ; if (${o}ne&foo) etc... > > 2) Where did Larry say "no different that the other operators that also > consist of valid character identifiers." ? Hmm. It looks like he didn't. That must have been a point someone had made in a subsequent posting. I apologize. > > > IIRC, '^' was considered earlier. (And it's shifted, BTW.) > > 3) What do you mean by shifted? A caret on a standard US qwerty keyboard is "shift-6'. (In reponse to your complaint (a), about the underscore requiring the shift key.) -- Bryan C. Warnock [EMAIL PROTECTED]