[16627] in Perl-Users-Digest
Perl-Users Digest, Issue: 4039 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 17 03:05:26 2000
Date: Thu, 17 Aug 2000 00:05:15 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <966495915-v9-i4039@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 17 Aug 2000 Volume: 9 Number: 4039
Today's topics:
about variable lovebaby@my-deja.com
anyone here is the right address <star@sonic.net>
Re: anyone here is the right address <elephant@squirrelgroup.com>
Re: anyone know why when I add tr /a-z/A-Z/s i get ERRO <star@sonic.net>
Re: ARRAY of HASH values <glodalec@yahoo.com>
Re: Checking if variables exist <joelnelson@home.net>
Re: Checking if variables exist <vrillusions@mail.com>
Re: Checking if variables exist <elephant@squirrelgroup.com>
Re: Checking if variables exist <jkline@one.net>
Encrypting data with keys <steven@younghousehold.fsnet.co.uk>
Re: Help with regex <elephant@squirrelgroup.com>
LWP nukes user alarms? <newspost@coppit.org>
Re: md5 (Keith Calvert Ivey)
Re: Negativity in Newsgroup <drawbridge@home.com>
Re: perl 5.6 (Eric Bohlman)
Re: perl 5.6 (Gwyn Judd)
Re: perl 5.6 (Randal L. Schwartz)
problems installing DBD::oracle for oracle-db-access rudi_runkel@my-deja.com
redirect script just providing an HREF, not redirecting dack@visi.com*
Re: redirect script just providing an HREF, not redirec <mbudash@sonic.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 17 Aug 2000 04:59:42 GMT
From: lovebaby@my-deja.com
Subject: about variable
Message-Id: <8nfrfm$n90$1@nnrp1.deja.com>
I want to use the variable in my perl programe which I once used in
the php programe,how to do it?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 17 Aug 2000 04:54:20 GMT
From: arthur <star@sonic.net>
Subject: anyone here is the right address
Message-Id: <B5C01549.67A8%star@sonic.net>
Sorry I put the wrong address in here is the right one and good night
http://www.perl.com/pub/doc/manual/html/
arthur
------------------------------
Date: Thu, 17 Aug 2000 05:00:06 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: anyone here is the right address
Message-Id: <MPG.14060ec6c56c5c199896bf@localhost>
arthur wrote ..
>Sorry I put the wrong address in here is the right one and good night
>
>http://www.perl.com/pub/doc/manual/html/
the docs will also be on whatever machine it is that's running Perl ..
you can usually get to them by typing perldoc <docsection> from the
command line .. eg.
perldoc perlop
there are other options to perldoc .. for more information see the
perldoc section of the manual
perldoc perldoc
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Thu, 17 Aug 2000 04:40:25 GMT
From: arthur <star@sonic.net>
Subject: Re: anyone know why when I add tr /a-z/A-Z/s i get ERRORS
Message-Id: <B5C01204.67A7%star@sonic.net>
> well .. without actually seeing where you're putting that tr/// it's
> impossible to tell exactly why you're getting these errors (showing code
> is useless if you show code that has nothing to do with the problem)
>
So true, sorry. I had it working when I was working off my desktop but since
then the code has grown and for some reason I can not make it work.
> I'm guessing that you have no idea what the 's' modifier does to tr///
> .. you almost certainly do not want to be using it if you're just trying
> to convert lowercase to uppercase
>
> you should have a read of the documentation on tr/// in perlop .. it
> quite clearly explains and demonstrates what the 's' modifier does
I will I This is where they are at
http://www.perl.com/pub/doc/manual/html/pod/perlref.html
> perldoc perlop
>
> then you should have a read of the documentation for the uc function ..
> that's probably what you want anyway - it's a solution with an
> international flavour
>
> perldoc -f uc
------------------------------
Date: Thu, 17 Aug 2000 06:28:17 +0200
From: glodalec <glodalec@yahoo.com>
Subject: Re: ARRAY of HASH values
Message-Id: <MPG.1404cb5c28081397989680@news.siol.net>
In article <K%rm5.140$DT4.3826997@nnrp2.clara.net>,
newsgroups@ckeith.clara.net says...
> In article <399A1A94.CA4@yahoo.com>, Mouse <glodalec@yahoo.com> wrote:
> >Isnt that funny whenever I am asking something, I get tutorial of how to
> >use variables,which names
> >to use for variable etc...
>
> Oh, I'm sorry, I figured since you'd missed the numerous references in the
> documentation to the fact that Perl flattens arrays you were kind of new.
> Perhaps we should start a grading system whereby you post the time you've
> been playing with Perl, you know start a grading system ranging from script
> kiddie to Guru.
>
> *snort*
> Your so damn ungrateful. Just because *you* might know this means *you*
> should just accept that you're not following convention and ignore anyone's
> comments. The convention is for a reason - because it can cause problems -
> but obviously *you* know this.
>
> Thankfully you're not the only person reading this group, there are a lot of
> people out there who just read the posts to pick up answers and tips. To
> critique someone's code is not a crime, in fact its often a damn good idea
> because not only do you pick up things that are wrong, you pick up areas
> where you can get problems, "Try using lexical variables via my() rather
> than package variables" for instance.
>
> Since the answer is already happily documented, perhaps next time you would
> prefer people just told you to RTFM rather than explaining what you're doing
> wrong and *why* you do/can/could have problems in other areas of your code.
>
> Perhaps we shouldn't bother telling anyone to check the return values of
> their open()'s either ... ?
>
> Col.
>
>
> ---
> Colin Keith
> Systems Administrator
> Network Operations Team
> ClaraNET (UK) Ltd. NOC
>
I didnt ungratefull. Although Im programming with perl less than 10
days, I learned a lot from you here on NG. It just bother me, every my
post I put in was answered with reply of how should I use variables etc.
Regards
------------------------------
Date: Thu, 17 Aug 2000 04:47:48 GMT
From: Joel Nelson <joelnelson@home.net>
Subject: Re: Checking if variables exist
Message-Id: <399B6E5E.610FBF26@home.net>
> if ($FORM{'realname'} && $FORM{'callsign'} && $FORM{'computer'} &&
> $FORM{'email'} && $FORM{'location'}) { $required = "yes"; }
> else { die "You did not enter a required field, please make corrections
> and try again"; }
>
> Doesn't that mean that if all of those exist, it will set $required to
> yes? and if one of those don't exist it will die? then how come when I
> have those two lines in the script, I get an error saying that the page
> contains no data in netscape and IE I just get a blank page?
Well, where's the rest of the code? Hard to figure it out without it! But
really it's not a perl question, it's a web cgi type question. There are
other more appropriate news groups but they will still need the rest of your
code.
Joel
------------------------------
Date: Thu, 17 Aug 2000 04:59:48 GMT
From: Todd Eddy <vrillusions@mail.com>
Subject: Re: Checking if variables exist
Message-Id: <399B714F.D9A0A6E1@mail.com>
I didn't think you would need the rest of it, since it really won't effect this
in any way, so I thought I would just post that to save a little on the loading
time. So heres the whole thing:
#!/usr/bin/perl
###############
# Form Processing Section
#########################
# Determining whether or not the <FORM> method is GET or POST
# if it is GET, that means all the data was appended to the URL
# if it is POST, all the data was put into STDIN, a data buffer
#
# Data will be stored in an array called FORM, which can be referenced
# almoast anywhere using $FORM{'var'} where var is what the name of the
# variable was.
if ($ENV{"REQUEST_METHOD"} eq 'GET') { $buffer = $ENV{'QUERY_STRING'}; }
else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
# Send data as html
###################
print "Content-type: text/html\n\n";
# Loading the 'Settings.pl' file
################################
require 'settings.pl';
# Parsing the variables
#######################
$date = $FORM{'LAN_Date'};
$newdate = $date;
$newdate =~ tr[/][-]; # replace /es with -es
@filedate = split(/-/, $newdate);
if ($filedate[0] < 9) { $filedate[0] = "0".$filedate[0]; }
if ($filedate[1] < 9) { $filedate[1] = "0".$filedate[1]; }
$filedate = "20".$filedate[2]."-".$filedate[0]."-".$filedate[1];
$datalocation = $datadir.$filedate.".df";
# Make sure they filled out everything
#if ($FORM{'realname'} && $FORM{'callsign'} && $FORM{'computer'} &&
$FORM{'email'} && $FORM{'location'}) { $required = "yes"; }
#else { die "You did not enter a required field, please make corrections and try
again"; }
if ($FORM{'computer'} eq "BYOC") { $computer = "BYOC - They are going to bring
their own computer"; }
else { $computer = "house - They want to use one of the in-house computers"; }
# Advertise Check
#################
# Checking to see if user chose to display small text advertisement on
# bottom of page
if ($show_adv != 0) { $footer = "<FONT SIZE=\"1\" FACE=\"verdana, arial\"
COLOR=\"#808080\">who's coming - v0.5 - ©2000 Todd Eddy -
www.vrillusions.com/cgi/</FONT>"; }
# Insert data into file
#######################
$df_line =
$FORM{'realname_show'}."|".$FORM{'realname'}."|".$FORM{'email_show'}."|".$FORM{'email'}."|".$FORM{'callsign'}."|".$FORM{'location'};
open (FILE, ">>$datalocation") or die "Unable to open or create data file, this
may happen because the file is in use by someone else. Please resend.";
flock (FILE, 2);
print FILE "$df_line\n";
close FILE;
# EMAIL Section
###############
open (MAIL, "|$sendmail") or die "Can't open mail program: $!\n";
print MAIL "To: $FORM{'recipient'}\n";
print MAIL "From: \"$FORM{'realname'}\" <$FORM{'email'}>\n";
print MAIL "Subject: $FORM{'subject'}\n";
print MAIL qq~
$FORM{'realname'}, who came from $ENV{'REMOTE_HOST'} which resolves to
$ENV{'REMOTE_ADDR'}
registered for the LAN Party taking place on $date.
Here is their info:
Name: $FORM{'realname'}
Email: $FORM{'email'}
Callsign: $FORM{'callsign'}
$computer
Comments:
$FORM{'comments'}
~;
close(MAIL);
# HTML Section
##############
print qq~
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><META HTTP-EQUIV="Refresh" CONTENT="1;URL=$FORM{'redirect'}"></HEAD>
<BODY>Please wait...</BODY></HTML>
~;
Joel Nelson wrote:
> > if ($FORM{'realname'} && $FORM{'callsign'} && $FORM{'computer'} &&
> > $FORM{'email'} && $FORM{'location'}) { $required = "yes"; }
> > else { die "You did not enter a required field, please make corrections
> > and try again"; }
> >
> > Doesn't that mean that if all of those exist, it will set $required to
> > yes? and if one of those don't exist it will die? then how come when I
> > have those two lines in the script, I get an error saying that the page
> > contains no data in netscape and IE I just get a blank page?
>
> Well, where's the rest of the code? Hard to figure it out without it! But
> really it's not a perl question, it's a web cgi type question. There are
> other more appropriate news groups but they will still need the rest of your
> code.
>
> Joel
--
Todd Eddy
vrillusions@mail.com
http://www.vrillusions.com/
------------------------------
Date: Thu, 17 Aug 2000 05:19:08 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: Checking if variables exist
Message-Id: <MPG.1406133677d681599896c1@localhost>
Todd Eddy wrote ..
>Here is what I have:
>
>if ($FORM{'realname'} && $FORM{'callsign'} && $FORM{'computer'} &&
>$FORM{'email'} && $FORM{'location'}) { $required = "yes"; }
>else { die "You did not enter a required field, please make corrections
>and try again"; }
>
>Doesn't that mean that if all of those exist, it will set $required to
>yes? and if one of those don't exist it will die? then how come when I
>have those two lines in the script, I get an error saying that the page
>contains no data in netscape and IE I just get a blank page?
answers to your questions in order .. no, yes and almost certainly
missing HTTP headers
a) a scalar is false if it is undefined or if it equals the null string
or if the numeric value of the scalar is zero
b) the die alone will not output the correct HTTP headers .. and here -
we leave the realm of Perl .. ask more in a CGI newsgroup or lookup web
programming in the perlfaq pages
perldoc -q "web programming"
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Thu, 17 Aug 2000 01:40:01 -0400
From: Joe Kline <jkline@one.net>
To: vrillusions@mail.com
Subject: Re: Checking if variables exist
Message-Id: <399B7AB1.27B4DEC9@one.net>
Todd Eddy wrote:
>
> Here is what I have:
>
> if ($FORM{'realname'} && $FORM{'callsign'} && $FORM{'computer'} &&
> $FORM{'email'} && $FORM{'location'}) { $required = "yes"; }
> else { die "You did not enter a required field, please make corrections
> and try again"; }
>
> Doesn't that mean that if all of those exist, it will set $required to
> yes? and if one of those don't exist it will die? then how come when I
> have those two lines in the script, I get an error saying that the page
> contains no data in netscape and IE I just get a blank page?
Well, looking at the above code in conjunction with your later
posting...
The above code is "sort of" checking to see if the %FORM hash has
values for a bunch of keys. This isn't the best way to go about this,
I would suggest doing:
if ( ( exists $FORM{'realname'} && $FORM{'realname'} ) &&
( exists $FORM{'callsign'} && $FORM{'callsign'} ) &&
( exists $FORM{'computer'} && $FORM{'computer'} ) &&
( exists $FORM{'email'} && $FORM{'email'} ) &&
( exists $FORM{'location'} && $FORM{'location'} )
)
{ $required = "yes"; }
The "exists" check avoids autovivification. I do believe in I might be
a bit paranoid with my checking.
As a side note, I would suggest use CGI.pm (or one of the lighter
weight variants that can be found at http://search.cpan.org ) to do
your parameter parsing. This would let you do things like:
$realname = param('realname');
$callsign = param('callsign');
$computer = param('computer');
$email = param('email');
$location = param('location');
Then you could do more meaningful checking to see if all of the form
fields were completed properly.
--
Joe Kline
It takes a lot of brains to enjoy satire, humor, and wit;
but none to be offended by them. ---The Midnight Skulker
------------------------------
Date: Thu, 17 Aug 2000 06:02:46 +0100
From: "Steven Young" <steven@younghousehold.fsnet.co.uk>
Subject: Encrypting data with keys
Message-Id: <8nfrh2$qis$1@newsg4.svr.pol.co.uk>
I want my Perl script to encrypt some text submitted from an HTML form
before writing it to a file on the web server. This file will later be
downloaded by a program (witten in Visual Basic) and be decrypted. I do not
want the un-encrypted data to be on the server at anytime because of prying
eyes and i don't want it to able to be decrypted by anyone unless they have
a key.
What is the best solution for doing this? I have heard of the PGP and CRYPT
modules for PERL but do not really know if that is the way to go and if I
did use the PGP modules, how can I decrypt the data within my visual basic
app?
Any help is much appreciated,
Steven Young.
steven@younghousehold.fsnet.co.uk
------------------------------
Date: Thu, 17 Aug 2000 05:08:37 GMT
From: jason <elephant@squirrelgroup.com>
Subject: Re: Help with regex
Message-Id: <MPG.140610c133410cd99896c0@localhost>
Jeffri AB wrote ..
>I'm writing an application that will extract the contents between
>HTML-like tags. I've managed to come out with something but it works
>fine with only 1 pair of tags. Here's what I've done:
>
>$body =~ s#<$tag>([\w\W]*?)</$tag>#\1#gm;
>$body =~ s#<(.*?)>[\w\W]*?</\1>##gm;
>
>I need help to come out with a regex that'll process nested tags as
>well. E.g., if I have:
>
><aa>aa<bb>bb</bb>aa</aa>
>
>extracting the contents of {aa}: aabbaa
>extracting the contents of {bb}: bb
>
>I need it quite desperately. Thanks!
you need more help than you realise .. your regex knowledge is
apparently quite limited .. try using the HTML::Parser module instead ..
it's available from CPAN
http://www.cpan.org/modules/
it's by FAR the simplest solution
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: Thu, 17 Aug 2000 01:17:39 -0400
From: David Coppit <newspost@coppit.org>
Subject: LWP nukes user alarms?
Message-Id: <Pine.GSO.4.21.0008170113130.19093-100000@mamba.cs.Virginia.EDU>
I'd like to be able to put a time limit on my script, which is using LWP.
Unfortunately, it looks like LWP is using alarm() for its timeouts, which is
not interacting well with my alarms. Is there some way to do a timeout for my
script? Should I fork, then sleep, then kill the child?
Here's a sample script. It looks like my 5 second timeout is causing
$ua->request to timeout ahead of time. (The code is straight out of the
Cookbook, except the LWP code is the "long running" code.)
--------------
$SIG{ALRM} = sub { die "timeout" };
eval
{
alarm(5);
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->timeout(8);
my $req = new HTTP::Request GET => 'http://www.perl.com/';
my $res = $ua->request($req);
print length $res->content, "\n";
alarm(0);
};
if ($@ =~ /timeout/)
{
print "Timed out!\n";
}
--------------
Regards,
David
------------------------------
Date: Thu, 17 Aug 2000 03:29:22 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: md5
Message-Id: <39a0591f.14422627@news.newsguy.com>
metza@my-deja.com wrote:
>I'm using active perl, and have downloaded a module that requires
>md5.pm (I assume, it contains the the line:
>use md5 )
>
>Can anyone tell me where to get it?
It's MD5.pm, not md5.pm. Module names are capitalized by
convention to distinguish them from pragmas. Even if you're
using Windows, you shouldn't get into bad habits.
MD5.pm is now called Digest::MD5, and you should be able to
install it by typing
ppm install Digest-MD5
at the command line. I have before. Unfortunately, it seems to
be missing from the ActiveState site at the moment, even though
it shows up with the PPM "search" command.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: Thu, 17 Aug 2000 06:14:28 GMT
From: DM <drawbridge@home.com>
Subject: Re: Negativity in Newsgroup
Message-Id: <399B830C.26855853@home.com>
Jonathan,
Exactly. And it worked even better than I had expected. ;-]
___James
Jonathan Stowe wrote:
>
> On Fri, 11 Aug 2000 21:28:03 GMT, DM Wrote:
> > Why are there so many negative remarks in this newsgroup?
> >
>
> <snip whingeing>
>
> Thanks for that - it has caused all of the potential whingers who would
> have got in my killfile at some later date to expose themselves so I dont
> have to read their crap in the first place.
>
> /J\
------------------------------
Date: 17 Aug 2000 05:48:29 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: perl 5.6
Message-Id: <8nfubd$kgj$2@slb3.atl.mindspring.net>
Gwyn Judd (tjla@guvfybir.qlaqaf.bet) wrote:
: err...I mean...Of course it should just work :) Actually I think you
: might like to hold off till 5.6.1 is released.
I think you mean 5.6.2. Under the new numbering scheme, odd-numbered
releases are developmental versions and even-numbered ones are production
versions.
------------------------------
Date: Thu, 17 Aug 2000 06:20:40 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: perl 5.6
Message-Id: <slrn8pn11l.s14.tjla@thislove.dyndns.org>
I was shocked! How could Eric Bohlman <ebohlman@netcom.com>
say such a terrible thing:
>Gwyn Judd (tjla@guvfybir.qlaqaf.bet) wrote:
>: err...I mean...Of course it should just work :) Actually I think you
>: might like to hold off till 5.6.1 is released.
>
>I think you mean 5.6.2. Under the new numbering scheme, odd-numbered
>releases are developmental versions and even-numbered ones are production
>versions.
Oh okay, I didn't know that. I heard there was a bugfix release coming
out soonish though.
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Bad men live that they may eat and drink, whereas good men eat and drink
that they may live.
-- Socrates
------------------------------
Date: 16 Aug 2000 23:58:37 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: perl 5.6
Message-Id: <m13dk4qspu.fsf@halfdome.holdit.com>
>>>>> "Eric" == Eric Bohlman <ebohlman@netcom.com> writes:
Eric> Gwyn Judd (tjla@guvfybir.qlaqaf.bet) wrote:
Eric> : err...I mean...Of course it should just work :) Actually I think you
Eric> : might like to hold off till 5.6.1 is released.
Eric> I think you mean 5.6.2. Under the new numbering scheme,
Eric> odd-numbered releases are developmental versions and
Eric> even-numbered ones are production versions.
Wrong even/odd number.
5.7.x is for Perl developer internal use (odd middle digit).
5.6.x is for Perl stable releases (even middle digit).
5.7.0 has been released to the development team, and is now undergoing
testing as a release candidate. If all goes well, the final result
will be released as 5.6.1. This is primarily a bugfix release over
5.6.0 and will introduce no new features (that I recall) except for
some additional documentation (a new tutorial for the debugger, for
example).
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Thu, 17 Aug 2000 06:39:23 GMT
From: rudi_runkel@my-deja.com
Subject: problems installing DBD::oracle for oracle-db-access
Message-Id: <8ng1aq$t4d$1@nnrp1.deja.com>
Hello,
when I try to install DBD::oracle I always get this error:
Configuring DBD::Oracle ...
>>> Remember to actually *READ* the README file!
Especially if you have any problems.
The ORACLE_HOME environment variable value (/opt/oracle/product/8.1.5)
is notvalid.
It must be set to hold the path to an Oracle installation directory
on this machine (or a compatible archtecture).
See the README.clients file for more information.
ABORTED!
I thought that there is no need to install any oracle-software when I
want to connect to a oracle-db via perl on my suse-linux system. Am I
wring or what do I make wrong?
Thanks for your help,
Michael
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 17 Aug 2000 05:37:23 GMT
From: dack@visi.com*
Subject: redirect script just providing an HREF, not redirecting as I'd like
Message-Id: <399b71ce.192389942@news.visi.com>
I have successfully determined if the user is visiting the site with a
phone or a PC, but the redirect script doesn't take them there
directly; it only provides them with an HREF they need to click on.
What am I doing wrong? Here is the script:
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "Location: http://www.liquid3.com/\n\n";
You can see what happens at http://dev.dack.com/
Thanks in advance,
Dack
------------------------------
Date: Wed, 16 Aug 2000 23:18:58 -0700
From: Michael Budash <mbudash@sonic.net>
Subject: Re: redirect script just providing an HREF, not redirecting as I'd like
Message-Id: <mbudash-85830E.23185816082000@news.pacbell.net>
In article <399b71ce.192389942@news.visi.com>, dack@visi.com* wrote:
> I have successfully determined if the user is visiting the site with a
> phone or a PC, but the redirect script doesn't take them there
> directly; it only provides them with an HREF they need to click on.
> What am I doing wrong? Here is the script:
>
> #!/usr/local/bin/perl
>
> print "Content-type: text/html\n\n";
> print "Location: http://www.liquid3.com/\n\n";
>
>
> You can see what happens at http://dev.dack.com/
>
> Thanks in advance,
>
> Dack
>
>
if i understand your question... drop the content-type line...
hth-
--
Michael Budash ~~~~~~~~~~ mbudash@sonic.net
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 4039
**************************************