Advertisement
hakonhagland

CGI4

Jul 17th, 2015
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use CGI qw( -utf8 );
  2. use CGI::Carp qw(fatalsToBrowser);
  3. use utf8;
  4.  
  5. $cgi=CGI->new();
  6.  
  7. print $cgi->header(-type => 'text/html', -charset => 'utf-8');
  8.  
  9. $page        = $cgi->param('page');
  10. $root_dir = "/home2/godspla1/public_html/romanian";
  11.  
  12. $root_dir =~ s|/$||; #get rid of trailing slash
  13.  
  14. open (RESULTS, "$root_dir/$page")
  15.   or die "Can't open results page ($root_dir/$page): $!";
  16. binmode STDOUT, ":utf8";
  17. while ( <RESULTS> ) {
  18.      print \n";
  19. }
  20. close RESULTS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement