title: Filehandle Quirk Perl
body: <p>In the following code if there is space between <code>FILE</code> and <code>(</code> in the <code>printf</code> statement
  like</p>
  
  <pre><code>printf FILE ("Test string inline\n");
  </code></pre>
  
  <p>Perl will treat <code>FILE</code> as a filehandle otherwise  </p>
  
  <pre><code>printf FILE("Test string inline\n");
  </code></pre>
  
  <p>will be treated as subroutine call(If no subroutine is defined by FILE perl will through an error <code>Undefined subroutine &amp;main::FILE called at ./test.pl line xx</code> ). Isn't there a better way Perl can implement this ? (Maybe this is why bareword filehandles are considered outdated ?)</p>
  
  <pre><code>#!/usr/bin/perl
  
  use warnings;
  
  open(FILE,"&gt;test.txt");
  printf FILE ("Test string inline\n");
  close(FILE);
  
  
  sub FILE
  {
      return("Test string subroutine\n");
  }
  </code></pre>