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 reply to Re: Unable to use if condition inside foreach loop using perl?
by haukex
in thread Unable to use if condition inside foreach loop using perl?
by finddata
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |