On Tue, Feb 3, 2009 at 18:32, Dr.Ruud <rvtol+use...@isolution.nl> wrote:
> 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

Yep, the Perl interpreter in my head is buggy again.


-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
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