title: Search pattern not terminated at filename.pl line 15
body: <p><a href="https://stackoverflow.com/questions/10299213/search-pattern-not-terminated-in-perl">Search pattern not terminated in Perl</a>
  This link is not useful for me.</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  
  #FILE_HANDLE -&gt; name used like that because of Bareword
  #open file passed as argument
  open FILE_HANDLE, "&lt;", "$ARGV[0]" or die $!;
  
  #reading file line by line
  while (&lt;FILE_HANDLE&gt;)
  {
      my $var = "Var";
      my $line = $_ if /\b$var\b/;
      #empty string check for $line
      if (length ($line // ''))
      {
          #spliting the string on the basis of space delimiter and stroing in array
          my @lineWords=split (' ', $line);
          my $signalname="$lineWords[2]";
          my $suffix="$lineWords[3]";
          my $compareWord='l:-1';
          my $i=3;
          while ($suffix ne $compareWord)
          {
              $i++;
              $signalname .= $suffix;
              $suffix="$lineWords[$i]";
          }
          $i += 3;
          print "$signalname $lineWords[$i]\n";
      }
  }
  close FILE_HANDLE;
  </code></pre>
  
  <p>In this perl script, I am getting following error :</p>
  
  <blockquote>
    <p>Search pattern not terminated at
    CreateNameId.pl line
    15.</p>
  </blockquote>
  
  <p>This script worked well with some files but give above error for some files.</p>