[Chicago-talk] is this still on?
Jay Strauss
me at heyjay.com
Sun May 17 18:26:04 PDT 2020
Right, thanks
I forgot
Jay Strauss
312.617.0264
Please excuse typos
Sent from my iPhone
> On May 17, 2020, at 2:02 PM, James E Keenan <jkeenan at pobox.com> wrote:
>
> On 5/17/20 12:49 PM, Jay S wrote:
>> Hi Perl mongers, I'm not sure if this list is still on|active.
>> I hope everyone is doing well and staying sane.
>> I haven't programmed in a long time and can't remember stuff. How do make a list out of a hash?
>> Instead of:
>> my $ClubID = $data{ClubID};
>> my $GameCode = $data{GameCode};
>> my $DateStarted = $data{DateStarted};
>> my $GameType = $data{GameType};
>> I'd like to do something like this but can't remember the proper incantation:
>> my ($ClubID, $GameCode, $DateStarted, $GameType) = @data(qw[ClubID GameCode DateStarted GameType]);
>
> You probably want:
>
> my ($ClubID, $GameCode, $DateStarted, $GameType) =
> @data{qw[ClubID GameCode DateStarted GameType]};
>
> i.e., braces instead of parens to indicate hash slice.
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> https://mail.pm.org/mailman/listinfo/chicago-talk
More information about the Chicago-talk
mailing list