title: how to include .pl (PERL) file in PHP
body: <p>i have two pages one in php(index.php) and another one in Perl(dbcon.pl).</p>
  
  <p>basically i want my php file to show only the UI and all the data operations  would be done in  Perl file.</p>
  
  <p>i have tried
  in index.pl</p>
  
  <pre><code>&lt;?php include("dbcon.pl");?&gt;
  &lt;html&gt;
  &lt;br/&gt;PHP&lt;/br&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and dbcon.pl has</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  use DBI;
  
  use CGI::Simple;
  my $cgi = CGI::Simple-&gt;new;
  my $dsn = sprintf('DBI:mysql:database=%s;host=%s','dbname','localhost');
  
  my $dbh = DBI-&gt;connect($dsn,root =&gt;'',{AutoCommit =&gt; 0,RaisError=&gt; 0});
  
  
  my $sql= "SELECT * FROM products";
  my $sth =$dbh-&gt;prepare($sql);
  $sth-&gt;execute   or die "SQL Error: $DBI::errstr\n";
  while (my @row = $sth-&gt;fetchrow_array){
  print $cgi-&gt;header, &lt;&lt;html;
  &lt;div&gt;&amp;nbsp;@row[0]&amp;nbsp;@row[1]&amp;nbsp;@row[2]&amp;nbsp;@row[3]&amp;nbsp;@row[4]&lt;/div&gt;
  html
  }
  </code></pre>
  
  <p>but when i run index.php in browser it prints all the code in dbcon.pl file instead of executing it</p>
  
  <p>how to overcome this problem?</p>
  
  <p>note: i am running this in windows environment </p>
  
  <p>is there any other way to do this?</p>