[perl]代码库
#-----------------------------
$url = "http://www.perl.com/CPAN/";
print "Location: $url\n\n";
exit;
#-----------------------------
# download the following standalone program
#!/usr/bin/perl -w
# oreobounce - set a cookie and redirect the browser
use CGI qw ( :cgi );
$oreo = cookie ( -NAME => 'filling',
-VALUE => "vanilla cr鑝e",
-EXPIRES => '+3M', # M for month, m for minute
-DOMAIN => '.perl.com' );
$whither = "http://somewhere.perl.com/nonesuch.html";
print redirect ( -URL => $whither,
-COOKIE => $oreo );
#-----------------------------
#Status: 302 Moved Temporarily
#
#Set-Cookie: filling=vanilla%20cr%E4me; domain=.perl.com;
#
# expires=Tue, 21-Jul-1998 11:58:55 GMT
#
#Date: Tue, 21 Apr 1998 11:55:55 GMT
#
#Location: http://somewhere.perl.com/nonesuch.html
#
#Content-Type: text/html
#
#B<<blank line here>>
#-----------------------------
# download the following standalone program
#!/usr/bin/perl
# os_snipe - redirect to a Jargon File entry about current OS
$dir = 'http://www.wins.uva.nl/%7Emes/jargon';
for ( $ENV {HTTP_USER_AGENT} )
{
$page = /Mac/ && 'm/Macintrash.html'
|| /Win ( dows ) ?NT/ && 'e/evilandrude.html'
|| /Win|MSIE|WebTV/ && 'm/MicroslothWindows.html'
|| /Linux/ && 'l/Linux.html'
|| /HP-UX/ && 'h/HP-SUX.html'
|| /SunOS/ && 's/ScumOS.html'
|| 'a/AppendixB.html';
}
print "Location: $dir/$page\n\n";
#-----------------------------
use CGI qw ( :standard );
print header ( -STATUS => '204 No response' );
#-----------------------------
#Status: 204 No response
#
#Content-Type: text/html
#
#<blank line here>
#-----------------------------
#!/bin/sh
cat <<EOCAT
Status: 204 No response
EOCAT
#-----------------------------
by: 发表于:2017-09-13 14:16:55 顶(0) | 踩(0) 回复
??
回复评论