in reply to string matching
The short answer is that you have an asterisk where you should have a space. So your if test might become:
if ($desc =~ /;FTP : /)
The longer answer is that if you are searching for a fixed string like this it is usually both more efficient and less error prone to use index instead of a regex match in the first place. eg:
if (index ($desc, ';FTP : ') > -1)
If you only want to trigger when $desc starts with that string (rather than containing it anywhere) then look for the index value being precisely zero.
|
|---|