Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: grep not working as expected

by imp (Priest)
on Oct 17, 2006 at 22:31 UTC ( #578916=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    grep { /$q->param('report_type')/ } (qw/case_id hosp_alias sender rece
    +iver/)
    
  2. or download this
    grep { $q->param('report_type') eq $_ } (qw/case_id hosp_alias sender 
    +receiver/)
    
  3. or download this
    my $report_type = $q->param('report_type');
    
    grep { $report_type eq $_ } (qw/case_id hosp_alias sender receiver/)
    
  4. or download this
    use List::Util qw( first );
    
    if ( first { $report_type eq $_ } (qw/case_id hosp_alias sender receiv
    +er/)) {
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-07-22 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (130 votes), past polls