csharp2a has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks, I have encountered a use of scaler context that has me a bit confused. I would expect the following snippet to actually be a hash however the coder has used the scaler context. If this is correct, would someone be able to help me understand why it would not be a hash? Sorry for the elementary question, but it has caused confusion.
my $headers = { 'Accept' => 'application/json', 'Content-Type' => 'application/json', 'charset' => 'UTF-8' };
Thank you.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Confused on Scalar/Hash
by toolic (Bishop) on Apr 02, 2018 at 15:33 UTC | |
Re: Confused on Scalar/Hash
by stevieb (Canon) on Apr 02, 2018 at 15:34 UTC | |
Re: Confused on Scalar/Hash
by AnomalousMonk (Archbishop) on Apr 02, 2018 at 16:05 UTC | |
Re: Confused on Scalar/Hash
by csharp2a (Novice) on Apr 02, 2018 at 15:57 UTC | |
Re: Confused on Scalar/Hash
by LanX (Saint) on Apr 02, 2018 at 15:41 UTC | |
Re: Confused on Scalar/Hash
by Anonymous Monk on Apr 02, 2018 at 16:47 UTC | |
by Your Mother (Archbishop) on Apr 03, 2018 at 04:37 UTC | |
by stevieb (Canon) on Apr 03, 2018 at 18:25 UTC |