Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: grep not working as expected

by imp (Priest)
on Oct 17, 2006 at 22:31 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://578916]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-26 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found