Wow, that was really easy! Thank you very much for your help!! Joshua Scott Security Systems Analyst, CISSP 626-568-7024
-----Original Message----- From: Rob Dixon [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 5:11 PM To: [EMAIL PROTECTED] Subject: Re: Perl Subroutines Hi Joshua Just redirect STDOUT to the file using open: open STDOUT, "> file.htm" or die $!; opentbl(); close STDOUT; HTH, Rob "Joshua Scott" <[EMAIL PROTECTED]> wrote in message 5D23931127B7EB409640001B7E8A6E32014A2AFA@PASNT32">news:5D23931127B7EB409640001B7E8A6E32014A2AFA@PASNT32... > I've created a group of Perl subroutines to handle the creation and > layout of my web pages. These subs are used when browsing to my > website. Basically all they do when invoked is print a bunch of HTML. > I've now run into the scenario where I'd like to use these same subs > to print static web > pages where the output doesn't go to the web browser, but instead goes > to a > file. How could I go about doing that? > > Here's an example of what my subs look like: > > Sub opentbl { > Print "<table>"; > Print "<tr>"; > Print "<td></td>"; > Print "</tr>"; > Print "</table>"; > }; > > I call the sub from webpages the standard way. > > I sure hope I explained this clearly. I'm still getting used to Perl. > Thank you for any help you can provide! > > Joshua Scott > > ============================================================================ ========== > NOTICE - This communication may contain confidential and privileged information that is for the sole use of the intended recipient. Any viewing, copying or distribution of, or reliance on this message by unintended recipients is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. > > ============================================================================ == > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ====================================================================================== NOTICE - This communication may contain confidential and privileged information that is for the sole use of the intended recipient. Any viewing, copying or distribution of, or reliance on this message by unintended recipients is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. ============================================================================== -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]