> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Saturday, 21 February 2004 2:20 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: question plz > > They're different operators. => is the same thing as the > comma. It's sole > difference is readability. For example > > %hash = ( key => "value", > key2 => "value2", > ); > #is the same as > %hash = ( key, "value", > key2,"value2", > );
No its not. key => "value" is the same as "key" , "value" in most circumstances, depending on the rules of engagement at the time. Use strict can also affect the use of 'barewords' which may prevent key => "value" from working the same as "key","value" > #is the same as > %hash = ( key, "value" => > key2,"value2" => > ); Again, what is 'key2'?? It it a word which needs quoting? a function call? key1=>"value",key2=>"value2" is different than key1,"value" => key2, "value2" because in the first instance, 'key2' is effectively quoted, in the second it is not and may result in a function call, or a constant being expanded, etc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>