Bug in Perl syntax detection

komodo 8 years ago 0
The line:
 $title .= " File" if ( $title !~ / File/i );
causes all text in the source file after the tilde(~) to be considered a string.  I found this because I was searching for a subroutine that was after this line using Find in Files, and it was not coming up as a result. 
Below is the surrounding code, the offending code was on line 38316.

  #TTS 10991
  # leave the entered title, if one exists
  # fix blank/optional fields
  # if using the entered title, then don't tack on the number
  if(!defined $title || $title eq '') {
$title = $file_type;
$title .= " File" if ( $title !~ / File/i );
#TT 11054 fix: add the count, if not provided
#this should still fix 10991, where add file titles were being dropped
#AND should fix 11054 where dupliacte #counts were being added
if ($title !~ /#\d/) {
$title_cnt = &upload_file_get_title_count($file_type_cde,$ms_id,$ms_rev_no,$j_id);
$title .= " #$title_cnt";