'key' is better . because it is explicit
the bareword  in {key}
is translated into the string 'key'

unless you are using "strict"
which would disallow barewords.


-- vish



On 3 February 2011 09:28, Chanan Berler <[email protected]> wrote:
> Hello All
>
> I wonder what is best usage: using 'key' or key (no quotes).
> will using 'key' means Perl creates a string, before retrieving the
> hash pointer value ? or Perl parser is parsing out the ' characters
>
> my $value = $obj->{'key'};
>
> or
>
> my $value = $obj->{key};
>
> thanks
> Chanan
>
> --
> ===================
> ----     Chanan Berler    ----
> ===================
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to