title: Can't modify non-lvalue subroutine call in read at download.cgi line 39, near "$cur;"
body: <p>Hi i am trying to compile the perl program but it is giving the error.</p>
  
  <p>Here is my code</p>
  
  <pre><code>#!/usr/bin/perl
  
  require './filemin-lib.pl';
  use lib './lib';
  
  use File::Basename;
  use List::Util qw( min max );
  use Cwd 'abs_path';
  
  &amp;ReadParse();
  
  get_paths();
  
  my $file = $cwd.'/'.$in{'file'};
  my $size = -s "$file";
  my $begin=0;
  my $end=$size;
  (my $name, my $dir, my $ext) = fileparse($file, qr/\.[^.]*/);
  
  open (FILE, "&lt; $file") or die "can't open $file: $!";
  binmode FILE;
  
  print "Content-Type: application/x-vlc-plugin\n";
  print "Cache-Control: public, must-revalidate, max-age=0";
  print "Pragma: no-cache" ;
  print "Content-Disposition: attachment; filename=\"$name$ext\"\n";
  print "Content-Transfer-Encoding: binary";
  print "Accept-Ranges: bytes";
  print "Content-Length:  $end - $begin \n\n";
  print "Connection: close"; 
  
  #open (FILE, "&lt; $file") or die "can't open $file: $!";
  #binmode FILE;
  
  my $cur=$begin;
  seek(FILE,$begin,0);
  while(!eof(FILE) &amp;&amp; $cur &lt; $end)
  {
      read FILE, min(1024*16) , $end-$cur;
      $cur+=1024*16;
  }
  close FILE;
  </code></pre>
  
  <p>In the i am trying to play the video with the help of <code>vlc-plugin</code> and i am trying to play the video file.But i am not getting where i am going wrong.But for this i am getting error</p>
  
  <p><code>Can't modify non-lvalue subroutine call in read at download.cgi line 39, near "$cur;"</code></p>
  
  <p>Please someone help me out.Thanks in advance.</p>