Re: question plz

2004-02-21 Thread R. Joseph Newton
Jacob Chapa wrote: > what is the difference between > > -> That is the Perl dereferencing operator. You use it to access hash or array elements, or package [class] methods, from a reference. my $keywords_ref = {}; $keywords_ref->{Animal} = 'Movement'; $keywords_ref->{Vegetable} = 'Photosynthe

Re: question plz

2004-02-21 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > They're different operators. => is the same thing as the comma. It's sole > difference is readability. For example I agree, I guess, but I'm not sure that amount of detail is helpful at the level of distinction sought in the OP. It might be better to stick to common u

Re: question plz

2004-02-21 Thread Jan Eden
[EMAIL PROTECTED] wrote: >$hash_ref = {key => "value", key2 => "value2"}; >print $hash_ref->{key}; > >It will go and get the 'key' key from the hash that $hash_ref points >to. The print function will actually print "value" here, since you requested the value identified by key. - Jan -- The da

RE: question plz

2004-02-21 Thread David le Blanc
> 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 > di

RE: question plz

2004-02-21 Thread David le Blanc
> To: Perl Beginners > Subject: question plz > > what is the difference between > > -> > > and > > => 0b01 ! man perlobj for '->' and man perldata for '=>'. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: question plz

2004-02-20 Thread James Edward Gray II
On Feb 20, 2004, at 9:20 PM, [EMAIL PROTECTED] wrote: They're different operators. => is the same thing as the comma. It's sole difference is readability. That's the reason we use it, but it's not the only difference. See below. For example %hash = ( key => "value", key2 => "v

Re: question plz

2004-02-20 Thread WilliamGunther
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", ); #is the same as

Re: question plz

2004-02-20 Thread Andrew Gaffney
Jacob Chapa wrote: what is the difference between -> This is used to access hash values through a hash reference and to call module/class functions. and => Its only use is to separate keys and values in a hash definition. Its not even required, though. You can just as easily use a comma. It ju