Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: grep not working as expected

by chargrill (Parson)
on Oct 17, 2006 at 22:31 UTC ( [id://578917]=note: print w/replies, xml ) Need Help??


in reply to grep not working as expected

Does it still not work if you do the following:

my $param = $q->param('report_type'); print "param=" . $param . "<BR>"; if( grep { /$param/ } (qw/case_id hosp_alias sender receiver/) ) { print "we are getting the list<BR>"; } else { print "we are NOT getting the list<BR>"; }

If it still doesn't work, then something is wrong somewhere else. If this does work, then perhaps the answer is tied to Fletch's response to the post just before yours, Re: Strange behaviour of m and $_ - in that (quoting Fletch) "Subroutine invoations don't interpolate in double quoted strings (of which m// is a special kind.)"



--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found