Posts

Showing posts from June, 2010

Embedding Perl into Perl

This article describes embedding a Perl script into a Perl script. The program executes through Common Gateway Interface (CGI), which reads ASCII file through file upload method and displays content of the file. The Perl script upload.pl is called through the Perl script file-upload.pl using function eval{}. This program can be modified to call by reference function, to access other system programs too.file-upload.html<html> <head> <title>File Upload</title> </head> <body> <form method="post" action="/cgi-bin/file-upload.pl" enctype="multipart/form-data"> Enter the file to upload:<br> <input name="file" size="45" type="file"><br> <p> <input name="reset" type="reset"> <input name="submit" value="Upload" type="submit"> </p> </form> …