Chas. Owens wrote:

> [fat comma]
it treats the thing on its left
like a string if the thing on the left matches this pattern
/^[-_a-zA-Z][-\w]*$/

I don't believe that pattern. So lets test:


perl -wle '
  $,=" => ";
  my %h = ( -- => "x");
  print %h;
'
syntax error at -e line 3, near "-- =>"
Execution of -e aborted due to compilation errors.

Probably you meant the second character class to be just \w?
Even then the pattern is not right:


perl -wle '
  $,=" => ";
  my %h = ( 1.23 => "x");
  print %h;
'
1.23 => x

--
Ruud

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to