Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: pattern match on entire file

by trantor (Chaplain)
on Nov 14, 2001 at 18:31 UTC ( [id://125310]=note: print w/replies, xml ) Need Help??


in reply to pattern match on entire file

$temp =~ /$tempName/s;

This searches for the string contained in $tempName in $temp, in multiline mode. It is not a problem if $tempName contains metacharacters because it will be interpolated only once.

if ($temp eq '')

This checks the contents of $temp, not the result of the pattern match!

You should have now enough hints to go on :-)

-- TMTOWTDI

Replies are listed 'Best First'.
Re: Re: pattern match on entire file
by amulcahy (Acolyte) on Nov 14, 2001 at 19:44 UTC
    thank you trantor and CubicSpline - the combination of both worked.
    calree0 -> haven't tried grep yet, don't think speed is an issue for this but one never knows....

    thanks again...maybe someday I'll know enough to ask a question that might challenge you lot?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2024-04-18 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found