Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Hash filter one-liner not working as expected

by Laurent_R (Canon)
on Mar 17, 2019 at 10:36 UTC ( #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? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2021-11-30 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?