For what I understand from those helpers, I think I've made it clear, and of cause, thank you very much =)
As a summary, I generate this ideas . -> is using in OO like functions, passing object proterties into a OO function. => is using in a hash, and it is also implies a comma. just like %foo = ("NAME", "CONNIE", "SURNAME", "CHAN") is equal to %foo = ("NAME" => "CONNIE", "SURNAME" => "CHAN") However, the second one is more readiable, as this is much *looks like a pair*. For "automatically quote the LHS if it is only a single word word - provided it doesn't contain certain characters (lke +-/*$%& etc)" : First, LHS is "left hand side", and it is the *key* also. the meaning of this is %foo = (mine name=> Connie) is also a valid declaration, becuase there is no meningful(for perl) bare chars. inside "mine name", and "Connie" is a single string without space. So we can skip those quote punc. BUT, this cannot be done if we use a comma like %foo = (mine name, Connie) Anyway, I still like to quote it =) Am I right ? If not, please give me some corrections , and thanks to all helpers. have a nice day Connie ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 28, 2002 12:09 PM 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), > > >>> > Almost, the following is valid: > > my $couple = join " & " => qw(Husband Wife); > > however, you'll note swapping the big arrow for a comma > doesn't quite work for a hash: > > my %hash = ( big city, 'New York', > Little City, 'Mayberru' > ); > > >>The special property of the => is to automatically quote > >>the LHS if it is only a single word word - provided it > >>doesn't contain certain characters (lke +-/*$%& etc) that > >>make it look like an EXPR (expression). Then it *may* > >>be evaluted rather than simply being quoted. > >>>>> > > > Please explain what you meant in the above paragraph :) > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]