Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: grep not working as expected

by chargrill (Parson)
on Oct 17, 2006 at 22:31 UTC ( #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.)"

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

Comment on Re: grep not working as expected
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2015-10-04 05:26 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (99 votes), past polls