Re: A perl program to translate HTML to Perl?

JohnBeaman (JRBeaman@w3f.com)
Wed, 15 Apr 1998 22:17:47 -0700


> Richard Sharpe wrote:
> 
> Hi,
> 
> has anyone built a Perl program that can take HTML and convert it to a Perl
> program that uses CGI.pm to produce the same HTML?
> 
> We are building pages using CyberStudio, but many of these pages need to be
> translated to Perl as CGI scripts. Hand translating them is a pain.
> 
> Regards
> -------
> Richard Sharpe, sharpe@ns.aus.com, NIC-Handle:RJS96
> NS Computer Software and Services P/L,
> Ph: +61-8-8281-0063, FAX: +61-8-8250-2080,
> Linux, AIX, Digital UNIX, ULTRIX, SunOS, Samba, Apache, NetScape, ICSS,
> Perl, C, C++ ...


Why not just have the Perl program "send" the html"???
No need to "translate" at all.  Save the html as a
".txt" file and:

 open(FILE,"$htmlfile.txt");
 @STUFF=<FILE>;
 close(FILE);
 print @STUFF;
 exit;

or is this too easy?
Just WHAT did you need to convert?

Curious,

- John
==================================================================== 
///,        ////   John Beaman - WebMaster  mailto:WebMaster@w3f.com 
\  /,      /  >.   The World Wide Web Factory:    http://www.w3f.com 
 \  /,   _/  /.    Your own Auto Responder: mailto:AutoReply@w3f.com 
  \_  /_/   /.     Buy American Made Products:  http://MADEinUSA.org 
   \__/_   <       Home of ProjectUSA: http://www.w3f.com/projectusa 
   /<<< \_\_       Join our Banner Club:   http://www.MADEinUSA/banr 
  /,)^>>_._ \      Web Servers at: http://virtualisys.com/vr/jbeaman 
  (/   \\ /\\\     This united States of America is NOT a Democracy! 
        // ````    Find out why http://w3f.com/patriots/demorep.html 
=======((`==========================================================