Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Hash filter one-liner not working as expected

by Laurent_R (Canon)
on Mar 17, 2019 at 10:36 UTC ( [id://1231352]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    syntax error at colors.pl line 31, near "$hash{"
    
  2. or download this
    my %colors = map { $_ => $hash->{$_} } grep { $_ =~ /color$/ } keys %$
    +hash;
    
  3. or download this
    my %colors = map { $_ => $$hash{$_} } grep { $_ =~ /color$/ } keys %$h
    +ash;
    
  4. or download this
    $ perl colors.pl
    $VAR1 = {
    ...
              'test_headline_color' => '#7b0706',
              'header_textcolor' => 'blank'
            };
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1231352]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found