title: How do I read a file on my webserver from my Perl CGI script and then print the data?
body: <p>I have a file "a.cpm" on my webserver. I have a handler that when you go to asdasd.com/a.cpm it starts the CGI perl script. I have tried reading the file then printing the data but it doesnt do anything.</p>
  
  <pre><code>#!/usr/bin/perl
  print "Content-type:text/html\r\n\r\n";
  print "test string";
  print "&lt;br&gt;";
  $filepath = $ENV{'PATH_TRANSLATED'};
  open FILE, $filepath or die $!;
  my @lines = &lt;FILE&gt;;
  while (my $line = &lt;FILE&gt;) 
  {
  print $_;
  }
  </code></pre>