## use CGI; $query = new CGI; $filename = $query->param('thefile'); while(<$filename>) { # do something with the data. }