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?? |
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
In Section
Seekers of Perl Wisdom
|
|