Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: check parameters

by hdb (Prior)
on Apr 08, 2013 at 14:41 UTC ( #1027524=note: print w/replies, xml ) Need Help??


in reply to Re^4: check parameters
in thread check parameters

ag4ve, can you pls state what you want to achieve? Here is what happens step-wise:

my $pattern ="(".join('|', @{$opts->{params}}).")"; # pattern is now "(a|b)" my @test = grep { /^$pattern/i } keys %$format; # @test = ( "bar", "abc" )

!grep... puts grep into scalar context, ie it will return 2, the length of @test above. !2 is false therefore your "if" block will not be executed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027524]
help
Chatterbox?
[choroba]: How is Bembel different from Krug?
[hippo]: karlgoethebier, Ich habe kein Deutsch.
[Corion]: choroba: A Bembel is a traditional pottery ware, which is only(!) used for serving Cider (well, Apfelwein)
[shmem]: choroba: it's hessisch
[Corion]: Not every Krug is a Bembel!
[karlgoethebier]: there is just the mug: 🍺
[Corion]: A Bembel must look like this
[karlgoethebier]: https://de. wikipedia.org/ wiki/Bembel#/ media/File: Bembel_Zum_blauen_ Bock_1978.jpg
[choroba]: as my friend says, Ich stehe Deutsche ver nicht aber klein ;-)
[Corion]: Krug is generic pottery ware for pouring beverages, but a Bembel is painted with that blue paint and contains only (!) Apfelwein

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (14)
As of 2017-05-24 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?