hashref Questions

1

perl -E 'say for map s/(æ|ø|å)/ {qw(æ ae ø oe å aa)}->{$1}/ger, qw(rød gul blå)' perl -E 'say for map s/(æ|ø|å)/"".{qw(æ ae ø oe å aa)}->{$1}/ger, qw(rød gul blå)' The first line above give...
Maladminister asked 4/9, 2019 at 8:14

5

I have a compound hashref as follows my $ch = { k1 => [ { k=>1 }, { m=>2 } ], k2 => [ { l=>90}, ... ], }; Hash::Util::lock_hashref_recurse($ch) does not effectively lock these v...
Askwith asked 5/8, 2013 at 11:30

4

Solved

I have a Perl class/module that I created to display Bible verses. In it there is a hash that stores several verses, with the key being the book/chapter/verse and the value being the text. This has...
Beanstalk asked 25/6, 2013 at 13:4

2

if((scalar keys ($this->{'libraries'}->{$y}->{'cellHash'})) == 0){ This is the line where I am getting the "Type of argument to keys on reference must be unblessed hashref or arrayref" ...
Kinser asked 13/6, 2013 at 5:58

2

Solved

$a = {b=>{c=>1}}; # set up ref $b = $a->{b}; # ref the ref $b .= (d=>1,e=>1); # where we want to assign multiple key/val at once At the end of it $a should look like: { 'b' =&gt...
Kansu asked 9/8, 2012 at 22:33
1

© 2022 - 2024 — McMap. All rights reserved.