----- Original Message ----- From: "Shawn" <[EMAIL PROTECTED]> To: "Connie Chan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, January 27, 2002 3:00 AM Subject: Re: What's the different between -> and => ?
> The big arrow is used in place of a ',' (comma). Now, I just read in the latest >Learning Perl that > this is global (i.e..: you can replace ANY comma with it, but I may have >misunderstood, have to > re-read that again)... [snip] Well, after re-reading the text in Learning Perl, it does in fact say that you can replace ANY comma with =>. I find this quite interesting, so I did a quick test: @A=('Big City'=>'Little City'=>'New York'=>'Mayberry'); print @A; produced: Big CityLittle CityNew YorkMayberry So, I do another test: I did a search and replace on a currently working program, replacing all commas with =>'s. The script still works from the command line and browser, but crawls via the browser ( a quick estimate of 60 times slower). The only change was the comma replacements. So, once again, Randal (and Tom) is correct and I learned something new. I can't see that this would be a good way to declare your arrays (or most anything for that matter unless you are in an obfuscated contest). My question is, since the left hand side is implicitly quoted, could this cause any problems? Shawn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]