🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.perl.misc
Article #229

Re: And...

#229
From: Ami
Date: Sat, 29 Mar 2003 08:03
32 lines
1945 bytes
Thank you, Mr. Asari !

"Hiro Asari" <hiro@asari.net> wrote in message
news:v8ad4gp2hvvk47@corp.supernews.com...
> "Ami" <amiba128@sd6.so-net.ne.jp> wrote in message
> news:3e85034f$0$55953$45beb828@newscene.com...
> > If the people, access a Web page, has the cookie,
> >    the page is displayed.
> > But the man, access a Web page, doesn't have the cookie,
> >    the page isn't displayed and jump to another page.
> > I want to know a script for the purpose as prohibition direct link.
> >
> > #!/usr/bin/perl
> > if ( index ( $ENV{'HTTP_COOKIE'} , 'hello' ) < 0 ) {
> >      print "Location: http://www.usa.com/\n\r";
> > }
> >
> > Am I right ?
> > Is the script right ?
> >
> >
>
> Since you're not doing anything with the position of the substring, index is
> probably uncalled for.
>
> if ($ENV{'HTTP_COOKIE'} !~ m/hello/) {
>     # do stuff
> }
>
>
> You should try fj.comp.lang.perl.  If you aren't too comfortable with
> English.
Technical Details
Message-ID: <3e855291$0$9608$45beb828@newscene.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!chi1.webusenet.com!rip!c03.atl99!news.webusenet.com!newscene!novia!novia!sequencer.newscene.com!not-for-mail
References: <3e85034f$0$55953$45beb828@newscene.com> <v8ad4gp2hvvk47@corp.supernews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fa0ae,e633c10bef9c13b3
X-Google-Attributes: gidfa0ae,public
X-Google-Thread: f9898,d665bc63d5f5269f
X-Google-Attributes: gidf9898,public
X-Google-ArrivalTime: 2003-03-29 00:03:49 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!chi1.webusenet.com!rip!c03.atl99!news.webusenet.com!newscene!novia!novia!sequencer.newscene.com!not-for-mail
From: "Ami" <amiba128@sd6.so-net.ne.jp>
Newsgroups: comp.lang.perl.misc,fj.comp.lang.perl
Subject: Re: And...
Date: 29 Mar 2003 02:03:06 -0600
Lines: 34
Message-ID: <3e855291$0$9608$45beb828@newscene.com>
References: <3e85034f$0$55953$45beb828@newscene.com> <v8ad4gp2hvvk47@corp.supernews.com>
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106