Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Hash filter one-liner not working as expected

by nysus (Parson)
on Mar 17, 2019 at 10:09 UTC ( [id://1231351]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
            $hash= {
              'test_link_color' => '#31e500',
    ...
              'background_color' => 'ffffff',
              'test_text_color' => '#000000'
            };
    
  2. or download this
    my %colors = map { $_ => %$hash{$_} } grep { $_ =~ /color$/ } keys %$h
    +ash;
    
  3. or download this
            %colors = (
              'ffffff' => 'test_text_color',
    ...
              'header_textcolor' => 'header_textcolor',
              'test_menu_color' => '#004d59'
            );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found