Re: sending a file back to user with perl.
by "Jason K. Chapman" <theguild(at)interserv.com>
|
Date: |
Thu, 10 May 2001 07:06:14 -0400 |
To: |
<hwg-techniques(at)hwg.org> |
In-Reply-To: |
dad |
|
todo: View
Thread,
Original
|
|
At 12:54 PM 5/10/2001 +1200, peter newton wrote:
>Hello All,
>
> From within a perl script I need to return 1 of 2 existing html files back
>to the user. I cannot remember how to do this, I'm sure its a 1 liner using
>the ` character. Can anyone help??
>
>Many Thanks
>Peter Newton
Living up to its reputation as the Swiss army chain saw of languages, Perl
offers about a million different ways to do it, but you're probably
thinking of a redirect:
print "Location: $url\n\n";
It's an http header, so make sure you use _two_ newlines at the end.
Jason K. Chapman
-
======================================================
THE HERETIC, a cyber thriller by Jason K. Chapman.
Online edition at <http://www.happyhacker.org/heretic/>. Softcover,
ISBN 1-929925-38-7. Latest news at <http://www.jasonkchapman.com>
======================================================
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA