Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Unable to use if condition inside foreach loop using perl?

by haukex (Archbishop)
on Mar 23, 2017 at 09:45 UTC ( [id://1185587]=note: print w/replies, xml ) Need Help??


in reply to Unable to use if condition inside foreach loop using perl?

The =~ operator applies the pattern on the right-hand side to the value on the left-hand side. This means the value on the left-hand side should be the line you are matching against. Try if($temp_line =~ /^REVISION_LOCATION:/)

Update: Added link

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found