Rob Dixon schreef:
> Kelly Jones:

>> Consider:
>> 
>> perl -le '$hash{"foo-bar"} = 1; print $hash{foo-bar}'
>> [no result]
>> 
>> perl -le '$hash{"foobar"} = 1; print $hash{foobar}'
>> 1
>> 
>> I sort of understand this: in the first script, Perl treats foo-bar
>> as a subtraction, and sets $hash{0} to 1. In the second one it
>> assumes you just left off some quotes.
>> 
>> My question: since Perl doesn't have constants, what exactly IS
>> foo-bar? Why is it 0?
>> 
>> The behavior above seems inconsistent to me. Is it considered a bug?
> 
> I have said that I have no time for command-line perl. What you have
> published doesn't work on my platform, nor on many others.
> 
> Of course I could rewrite the question in my head to a proper Perl
> program, but then I shall be looking for a bug either in my mental
> rewrite or in your original code.
> 
> So since you can't be bothered to publish a proper Perl program,
> neither can I be bothered to interpret your question. What is more,
> nor will all the other people who could have answered your question
> wisely. 

Rob, start sparing us this. Perl isn't what you (and I) limit it to. 

-- 
Affijn, Ruud

"Gewoon is een tijger."

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to