[11445] in Perl-Users-Digest
Perl-Users Digest, Issue: 5045 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 3 13:17:19 1999
Date: Wed, 3 Mar 99 10:00:18 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 3 Mar 1999 Volume: 8 Number: 5045
Today's topics:
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos dave@mag-sol.com
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos (Abigail)
Re: A smiple question <jeromeo@atrieva.com>
Compiling setuid scripts with perl <jmiguel@virtualsw.es>
Re: help on APPLET Class (Abigail)
Re: help!, Hash or sparse arrays? (Steve Linberg)
Re: help!, Hash or sparse arrays? <arnej@fc.hp.com>
Re: How do I get Perl Modules to run in my webspace? dturley@pobox.com
How do I start? <Doc@goforit.demon.co.uk>
Re: How do I start? (Steve Linberg)
Re: Inserting a 'newline' in arrays? (Abigail)
not an array referecne?? (Peter Bismuti)
Re: Pentium III Chips Released with IDs - Intel won't b (Thane Hubbell)
perl script records empty fields kristina.stoeva@cesoft.com
Re: regexp <admin@asarian-host.org>
Re: replace { with space ikarydis@my-dejanews.com
SSI and Perl script with CGI.pm(Pondering?Hmmm...) <sunny.boyle@slip.net>
Re: The millennium cometh -- eventually evanjohn@my-dejanews.com
Re: The millennium cometh -- eventually (Larry Rosler)
The Win32::AdminMisc::GetDriveSpace function mirak63@my-dejanews.com
Re: URGENT! Where Do You Hide The CGI Cards From The Sp dturley@pobox.com
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 03 Mar 1999 15:52:02 GMT
From: dave@mag-sol.com
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <7bjlqu$7fb$1@nnrp1.dejanews.com>
In article <36DD100B.B21B8AFC@datenrevision.de>,
Philip Newton <Philip.Newton@datenrevision.de> wrote:
> Abigail wrote:
> >
> > Ronald J Kimball (rjk@linguist.dartmouth.edu) wrote on MMX September
> > MCMXCIII in <URL:news:1do2799.dvk4pb1as2dmmN@bay1-134.quincy.ziplink.net>:
> [...]
>
> Abigail, where are you getting those dates from? MMX September MCMCXIII,
> indeed!
You're right, I think she meant MMX September MCMXCIII.
--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 3 Mar 1999 16:45:44 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <7bjovo$6ul$1@client2.news.psi.net>
dave@mag-sol.com (dave@mag-sol.com) wrote on MMX September MCMXCIII in
<URL:news:7bjlqu$7fb$1@nnrp1.dejanews.com>:
:: In article <36DD100B.B21B8AFC@datenrevision.de>,
:: Philip Newton <Philip.Newton@datenrevision.de> wrote:
:: > Abigail wrote:
:: > >
:: > > Ronald J Kimball (rjk@linguist.dartmouth.edu) wrote on MMX September
:: > > MCMXCIII in <URL:news:1do2799.dvk4pb1as2dmmN@bay1-134.quincy.ziplink.net>:
:: > [...]
:: >
:: > Abigail, where are you getting those dates from? MMX September MCMCXIII,
:: > indeed!
::
:: You're right, I think she meant MMX September MCMXCIII.
Not only did I meant MMX September MCMXCIII, I also wrote
MMX September MCMXCIII.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: Wed, 03 Mar 1999 09:40:43 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
Subject: Re: A smiple question
Message-Id: <36DD741B.BC8023C9@atrieva.com>
Ronald J Kimball wrote:
> I know what untested means. What does OTTOMH mean?
>
> > if $foo !~ /\d+/; # If $foo is not all digits, all the time.
> >
>
> You forgot to anchor the regex.
>
> /^\d+$/
> /\D/
Off the top of my head, I'd say these are better paterns.
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: Wed, 03 Mar 1999 18:14:17 +0100
From: Jose Miguel Rodriguez <jmiguel@virtualsw.es>
Subject: Compiling setuid scripts with perl
Message-Id: <36DD6DE9.84741D7@virtualsw.es>
Hi,
I'm trying to use the new perlcc utility to make "true" executables under Linux. After
some tries, I got it, but I need the executable to run with suid bits on, and the
executable complaints about it ("no -e allowed in setuid scripts") when running as any
user but root.
Any hint?
Thank you in advanced
--
saludos,
jmiguel
Virtual Software,
http://www.virtualsw.es/
------------------------------
Date: 3 Mar 1999 17:19:39 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: help on APPLET Class
Message-Id: <7bjqvb$75i$1@client2.news.psi.net>
lql (liu@bommerang.aero.rmit.edu.au) wrote on MMX September MCMXCIII in
<URL:news:36DCE1C9.CF5E3E51@bommerang.aero.rmit.edu.au>:
!!
!! I am a now stuying the Javascript.
Don't do it! Don't do it! Javascript bad. Perl good.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: Wed, 03 Mar 1999 11:50:27 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: help!, Hash or sparse arrays?
Message-Id: <linberg-0303991150270001@ltl1.literacy.upenn.edu>
In article <36DD335F.EAC723B1@hasdf.com>, "Paul M. Neth"
<"paskd;jf"@hasdf.com> wrote:
> A hash is the best solution for sparse or duplicate data right?
I'm not familiar with these terms, but a hash is best for what it seems to
me you're trying to do.
> The print statement after reading that line appears to work. How come I
> cant reference the hash with?
>
> $adate = 96020110;
> print "testdate = $adate rh = $raws{$adate}";
>
> I still keep getting a blank for $raws hash output. What am I doing
> wrong?
This, for starters:
> # assign key/val into hash
> %raws=($yymmddhh,$rh);
This redefines the entire hash, but it seems that you want to add a
key/value pair to the hash instead of replacing the entire thing with a
single key/value pair (since you're doing it in a loop). If this
assumption of mine is correct, what you really want to say is:
$raws{$yymmddhh} = $rh;
HTH.
--
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
email: <linberg@literacy.upenn.edu>
WWW: <http://www.literacyonline.org>
------------------------------
Date: Wed, 03 Mar 1999 09:51:08 -0700
From: Arne Jamtgaard <arnej@fc.hp.com>
Subject: Re: help!, Hash or sparse arrays?
Message-Id: <36DD687C.752A@fc.hp.com>
Okay, lets see...
Doesn't look to bad too start:
> ******************** START mergerh.pl
> : # use perl
> # mergerh.pl perl program to read RAWS file (rochelle.raws), extract
> # data year desired, sort and then fill blanks with CIRA data file
> # (badl_t.all) export date and rh to external file
> # make it handle leap year also
> use strict
> # define year to extract
> $yr = 96;
> @daysinmonth = (31,28,31,30,31,30,31,31,30,31,30,31);
> # compute leap yr flag also, with easy computation
> if ((1996 % 4) == 0) {
> $lyf = 1;
> } else {
> $lyf = 0;
> }
> # specify the output seperators
> $, = ' '; # set output field separator
> $\ = "\n"; # set output record separator
> # open the CIRA visibility transmissiometer file
> open(CIRA,'badl_t.all') || die 'Cannot open file "badl_t.all".';
> # open the RAWS data file also
> open(RAWS,'rochelle.raws') || die 'Cannot open file "rochelle.raws".';
> print "reading RAWS data";
> while (<RAWS>) { # read data file (RAWS) listed on the cmd line
> if (!/^:/) { # if a colon does NOT start a line then do this
> ($Date,$prec,$wsmph,$wd,$tempf,$fuelf,$rh,$bp,$wsgust,$mxgust) =
> split(' ', $_, 9999);
> # extract yr,mm,day,hr from long date string
> $yymmddhh = substr($Date,0,8);
> # extract 2 digit year from long date format
> $datyear = substr($Date,0,2);
>
> if ($datyear == $yr) { # if data year is == to year specified then
> # assign key/val into hash
> %raws=($yymmddhh,$rh);
This is the first point where I get a disconnect. You do realize that
you are _replacing_ the %raws hash every time? Maybe you want
something more like:
$raws{$yymmddhh} = $rh;
> print "1996 is OK and date = $yymmddhh and rh = $raws{$yymmddhh}";
I also noticed that this print did not appear in your sample output.
If we didn't see this, then we never got inside this if-block, right?
So %raws would never get initialized.
> $olddate = $yymmddhh;
> } # end if datyear is right
> } # end regex filter
> } # while reading all lines
> # READING APPEARS TO WORK
> # output available data, hash might be missing some data
> print "writing raws data";
This is where you're treating the hash weirdly. You're running
through all possible keys using these for-loops. Of course you're
going to get a bunch of "undefined"s!
Check out the 'keys' function in your perl reference book.
Or, if this is really what you want, use an 'exists' to test
whether a particular hash key is defined before trying to access
it.
> for ($mm=1;$mm<=12;$mm++) { # loop over months
> $maxdays = $daysinmonth[$mm-1]; # get maxdays
> # check for leap yr and increment max days if needed
> if (($mm==2) && ($lyf == 1)) {
> $maxdays++
> }
> for ($d=1;$d<=$maxdays;$d++) { # loop over days
> for ($h=0;$h<=23;$h++) { # loop over hrs
> # pad month with 0 if needed
> $padmm = sprintf( "%02d", $mm );
> # pad day with 0 if needed
> $paddd = sprintf( "%02d", $d );
> # pad hr with 0 if needed
> $padhh = sprintf( "%02d", $h );
> # recreate the hash date using for loop variables
> $newdate = $yr.$padmm.$paddd.$padhh;
> print "new date = $newdate and new hash data = $raws{$newdate}"; #
> PROBLEM?
> print "old date = $olddate and old data = $raws{$olddate}"; #
> PROBLEM?
> print "$newdate and $raws{$newdate}\n";
> }
> }
> }
> ******************** END mergerh.pl
> As far as I can the reading ( e.g. 1996 is OK and date = 96012613
> and rh = 82.0)
> seems to be working into the hash. The printing is giving errors.
> Or am I referencing the hash wrong?
> ******** start output
> Use of uninitialized value at mergerh.pl line 71, <RAWS> chunk 50386.
> new date = 96010620 and new hash data =
> old date = 96010116 and old data = 64.0
> Use of uninitialized value at mergerh.pl line 74, <RAWS> chunk 50386.
> 96010620 and
> ********* end output
>
> I have also checked for spaces on the end of my concatenated date.
> I am used to writing awk scripts with arrays. I tried putting the
> data into arrays but it started swapping. I then discovered that
> perl doesnt allow sparse arrays? In awk I can allocate
> $data[$yymmddhh] (e.g. $data[96020212] without swapping?).
Here I don't kow what you mean by 'swapping', so I can't help.
> A hash is the best solution for sparse or duplicate data right?
Yup.
> The print statement after reading that line appears to work. How
> come I cant reference the hash with?
> $adate = 96020110;
> print "testdate = $adate rh = $raws{$adate}";
> I still keep getting a blank for $raws hash output. What am I doing
> wrong?
Check for the re-initialization problem I mentioned earlier.
Use a simple "foreach (keys %raws) { print; }" to make sure
that the key you're looking for is really in there.
Good luck, and hope that helps!
Arne
------------------------------
Date: Wed, 03 Mar 1999 17:02:32 GMT
From: dturley@pobox.com
Subject: Re: How do I get Perl Modules to run in my webspace?
Message-Id: <7bjpv0$bl8$1@nnrp1.dejanews.com>
In article <8riSBDA6uR32EwMI@dragroup.com>,
Graham Stow <graham@dragroup.com> wrote:
> You're absolutely correct David.
it happens only ocassionally.
> However, although my script is now running on my ISP's server, it is not
> producing the correct output and I obviously have a bug somewhere.
> Problem is I can't debug it locally 'cause when I do I get the error
> message..'Can't locate DB_File.pm in @INC at script.pl line 204. BEGIN
> failed - compilation aborted at script.pl line 204'.
> So how do I get DB_File.pm into the @INC array on my system. I am
> running Perl v5.003_07 and Windows95. Any ideas anyone?
I don't think you can. DB_File is used with the Berkely DB databases. You have
to have one installed, and I doubt it's been ported to windoze.
BTW, check ActiveState's web site for a MUCH more current win32 Perl.
--
____________________________________
David Turley
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 3 Mar 1999 16:15:31 +0000
From: Doc <Doc@goforit.demon.co.uk>
Subject: How do I start?
Message-Id: <dhqJPEAjAW32Ew4b@goforit.demon.co.uk>
Hi
I am a very experienced programmer using an Intel Pentium PC with Win95.
I must be going senile because I have spent days on perl.com trying to
find what I need to start using perl, and what to do with it. I have
downloaded everything from 'perl for W32' to activestate's build 509, to
DCOM, to binary GCC. Every area seems to suggest something different.
I would appreciate it if some kind person would just tell me which files
I need to install, and what else needs to be done, so that I can start
writing programmes in perl for the internet. Having programmed in many
languages I thought that I would need a weekend to come to terms with
most of this - 4 days and still can't do 'HELLO WORLD' is embarrassing!
Thanks in advance, (and hope)
doc
--
Doc
------------------------------
Date: Wed, 03 Mar 1999 11:45:10 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: How do I start?
Message-Id: <linberg-0303991145100001@ltl1.literacy.upenn.edu>
In article <dhqJPEAjAW32Ew4b@goforit.demon.co.uk>, Doc
<Doc@goforit.demon.co.uk> wrote:
> Having programmed in many
> languages I thought that I would need a weekend to come to terms with
> most of this - 4 days and still can't do 'HELLO WORLD' is embarrassing!
Check www.activestate.com, you'll find everything you need.
Be ready to spend more than a weekend "coming to terms" with Perl,
though. You can get the basics extremely quickly, but Perl is more
nuanced than most languages, and really mastering it will take even an
experienced programmer a good long time. I've been programming for 20
years, doing Perl for about 3 now, and consider myself roughly
intermediate, maybe low-intermediate, in Perl.
--------------------------
#!/usr/bin/perl -w
print "Hello, world!\n";
--------------------------
(The first line is not strictly necessary in shell-less Win32, but it's
good for portability.)
Have fun!
--
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
email: <linberg@literacy.upenn.edu>
WWW: <http://www.literacyonline.org>
------------------------------
Date: 3 Mar 1999 17:43:42 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Inserting a 'newline' in arrays?
Message-Id: <7bjsce$7c5$1@client2.news.psi.net>
Mick (horizon@internetexpress.com.au) wrote on MMX September MCMXCIII in
<URL:news:36DD270C.4EECE63A@internetexpress.com.au>:
!!
!! foreach(@vals) {
!! push @outlines, @{ $hash{$user_name}}; #Is this
!! right?
!! }
Unlikely, as what you do in the loop doesn't depend on the iteration
value.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
------------------------------
Date: 2 Mar 1999 08:16:24 GMT
From: bismuti@cs.fsu.edu (Peter Bismuti)
Subject: not an array referecne??
Message-Id: <7bg6oo$fba$1@news.fsu.edu>
$ip[$i] = [ split(/\./,$line[2]) ];
${$ip[$j+1]}[3] OK
{$ip[$j+1]}->[3] NOT OK??? Error messate: Not a
reference to an array.
I'm confused, I the first expression stores a hard
reference int the $ith element of the array ip.
The expression: {$ip[$j+1]} should evaluate to that
reference which should in turn be able to be
derenced by either expression.
What is wrong with this arguement??
Thanks as always!
_____________________________________________________________________
| |
| Pete Bismuti |
| Department of Computer Science |
| Florida State University |
| bismuti@cs.fsu.edu (850) 644-0516 |
|_____________________________________________________________________|
------------------------------
Date: 3 Mar 99 19:34:29 GMT
From: redsky@ibm.net (Thane Hubbell)
Subject: Re: Pentium III Chips Released with IDs - Intel won't budge
Message-Id: <Jl0PnHJ5PvPd-pn2-KwvJTdwEhfpR@Dwight_Miller.iix.com>
On Tue, 2 Mar 1999 17:26:15, Al Christians <achrist@easystreet.com>
wrote:
> I'm afraid that the really big (money) issue wrt CPU ID's is one
> that no one has noticed much yet. It has to do with electronic
> commerce apps. The application development opportunities here
> are endless. There is already a great deal of work on custom
> content in the development of web and e-business apps. What the
> CPU ID allows is the identification of particular customers as
> suckers who will not get a very good price offer, and of others
> as smart shoppers who must be given competitive pricing
I mentioned in a earlier message that I wrote a copy protection scheme
for my software based on BIOS data and machine type. This was a
FIASCO from day one, as users would change machines, upgrade machines
etc. Trying to ID a PERSON from a CPU ID is nuts. The best you can
do is ID the CPU. This will be a good thing for software licenses -
to an individual CPU. I see this coming, actually, from MicroSoft.
Buy Windows 98/2000 and install it on "THIS" CPU - but no other.
Great for software sales. But as a method to ID a particular
consumer? Not a chance.
------------------------------
Date: Wed, 03 Mar 1999 16:40:41 GMT
From: kristina.stoeva@cesoft.com
Subject: perl script records empty fields
Message-Id: <7bjom6$a7j$1@nnrp1.dejanews.com>
Hi,
I have an html form the info from which is posted to a perl script which
among other things records the form fields to a text format file. All this
runnig on HP-UX 10.x or Solaris. The problem is that from time to time I get
empty records in the text file. So I am looking for some kind of explanation?
Any help will be much appreciated!
Kristina S.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 03 Mar 1999 16:41:24 GMT
From: Mark <admin@asarian-host.org>
Subject: Re: regexp
Message-Id: <7bjoni$a82$1@nnrp1.dejanews.com>
In article <36d9d38e.620074800@news.ionet.net>,
mag@imchat.com (Mark P.) wrote:
> Okay, I got the first part with the following, however, I am still not
> able to get the last part of the url to go away. Oh well, I just guess
> I'll make do with this.
>
> $file = "$ENV{'HTTP_REFERER'}";
> $file =~ s/.*[\\\/:]//i;
What are you doing here? Replacing everything (.*), greedy even, followed by a
"\", a "/" or a ":" with nothing??
> $file =~ s/.html/.txt/ig;
> $file =~ s/.shtml/.txt/ig;
> $file =~ s/.htm/.txt/ig;
>
> Probably not as elegent a solution as most of you would
> create, but it does work.<G>
How about:
$file =~ s/\.s?html?/.txt/gi;
- Mark
System Administrator Asarian-host.org
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 03 Mar 1999 17:04:49 GMT
From: ikarydis@my-dejanews.com
Subject: Re: replace { with space
Message-Id: <7bjq39$bmm$1@nnrp1.dejanews.com>
In article <01be63bc$7a11f030$2bbe10ac@amipnet>,
"Sheila Eugenio" <seugenio@man.amis.com> wrote:
> How can I replace any occurrence of the left bracket with a white space? I
> did the following comparison:
> $newsubtype = ~ s/[{]/ /g;
> and everytime i print ("$newsubtype\n"); it replaces { with 4294967295.
>
> Thanks!
>
Try that:
$newsubtype =~ s/\{/ /g;
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 03 Mar 1999 17:30:04 GMT
From: kOsAn <sunny.boyle@slip.net>
Subject: SSI and Perl script with CGI.pm(Pondering?Hmmm...)
Message-Id: <7bjrie$d1k$1@nnrp1.dejanews.com>
Hi y'all,
Have a question that I am pondering about and hope the collective effort out
here could enlighten me.
ISSUE SYNOPSIS
--------------
In one of my current project, I am using Perl script(s) in conjuction with
SSI-enabled pages(.shtml). Executing the Perl script using the "exec cgi"
directive. A SSI-enabled page will cause the server to return a HTTP header to
the browser automatically(Note: they are not nph). Thus the Perl script(using
CGI.pm) should not need to return a HTTP header. I believe it's right. Am I?
If theory is right, it is not working in the practical world. I still need
my Perl script to return a HTTP header for it to work correctly. Next to the
details...
ISSUE DETAILS
-------------
A SSI-enabled page called index.shtml contains the following SSI directive in
the middle of the page:
<HTML code snipped>
<!--#exec cgi='/cgi-bin/myscript.pl'-->
<HTML code snipped>
The script-myscript.pl-utilizes CGI.pm heavily to generate the necessary HTML
stuff and at this point of time I need to have the statement "print header;"
before the script could spit out all the dynamically generated content to the
browser through the above index.shtml. Looking at the source of the final
page displayed on the browser reveals that the HTTP header generated as a
result of "print header;" which is "Content-Type: text/html" does not exist
in the source. BUT running myscript.pl on the command line(thus ignoring the
SSI) reveals the HTTP header "Content-Type: text/html" as the first line of
the output. Hmmm... Ain't this strange or am I missing something?
I tried eliminating the "print header;" statement from my script and the
result is that the dynamically generated content fails to appear in the
browser. The only stuff displayed are those specified in index.shtml.
QUESTIONS PONDERING ON AND REQUESTING FOR ENLIGHTENMENT
------------------------------------------------------- 1)Why is this
happening? My understanding is that the browser gets the HTTP header from the
.shtml page which is automatically generated by the web server. It should not
need another HTTP header by the script. Seems like the browser eats up the
latter HTTP header too as it does not show in the HTML source of the final
page.
2)Is the statement "print header:" mandatory when using CGI.pm. I do not
think so and hope not. Looking into the source for CGI.pm does not indicate
that either.
3)How can I eliminate this redundancy of returning a HTTP header? I guess I
call it redundant based on my theory as explained above.
So ladies && gentlemen && other species, I beg, implore and beseech y'all to
enlighten me.
Please............ =) && Thank You.
kOsAn
use perl || die;
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 03 Mar 1999 16:28:05 GMT
From: evanjohn@my-dejanews.com
Subject: Re: The millennium cometh -- eventually
Message-Id: <7bjnu8$9hd$1@nnrp1.dejanews.com>
In article <slrn7donmh.jnf.fl_aggie@enso.coaps.fsu.edu>,
fl_aggie@thepentagon.com wrote:
> On Tue, 2 Mar 1999 10:55:10 -0500, Russell Schulz
> <Russell_Schulz@locutus.ofB.ORG> wrote:
> + stop whining about 2000 not being a change into a new millennium
> + (because it is,
>
> No. It isn't. You know it isn't. Do you _really_ want to get into the
> history of mathematics, Rome, the Roman army, and the early Christian
> church?
>
> In brief:
[snipped explanation of why the 3rd Millennium starts in 2001]
That is all correct. However, the 2000s start on 1/1/2000.
2000 - 2999 = 1000 years = the 2000s = a millennium.
And if you say it has no more significance than a randomly chosen 1000 year
period, would you also say the the 1600s holds no more significance than a
randomly chosen 100 year period? That the 80s holds no more significance than
a randomly chosen 10 year period?
If you don't think people 10s of thousands of years from now might use the
term 'the 2000s' to refer to a historical era just as we now use the 1600s,
for example, you are short-sighted and lack imagination.
>
> + there. is _my_ point clear?
>
> Yeah. You disagree with the definition of what a century/millenium is.
> And there's nothing wrong with that.
Every dictionary I've ever seen defines a millennium as simply 'a thousand
year period'.
Again, 2000 - 2999 = the 2000s = 1000 years = a millennium.
Explain to me how that "disagree[s] with the definition of what a ...
millenium is".
>
> However, that definition is an arbritrary one, one that is commonly
> accepted not only in day-to-day operations, but also by the legal
> establishment. You're welcome to try and change their minds, if you
> can. Good luck.
>
> + have you _ever_ seen anyone think 2000 is part of the 1900s?
>
> Yes. People who have a clue. Alternatively, you can always use the
> Hewbrew calendar, where this year is 5759.
You are seriously trying to claim that the 1900s and the 20th Century are the
exact same thing (1901 - 2000)? Hmmm, just who is the clueless one around
here?
Ok, here's a quick explanation of how it works:
When using ordinal descriptives (17th Century, 3rd Millennium) the time period
in question starts with 1 and ends with 0 (1601 - 1700, 2001 - 3000).
When using cardinal descriptives (the 1600s, the 2000s, the 80s) the time
period starts with 1 and ends with 9 (1600 - 1699, 2000 - 2999, 1980 - 1989).
Get it now?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 3 Mar 1999 09:27:40 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: The millennium cometh -- eventually
Message-Id: <MPG.114710e322397779896cb@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <7bjnu8$9hd$1@nnrp1.dejanews.com>, on Wed, 03 Mar 1999
16:28:05 GMT evanjohn@my-dejanews.com says...
...
> When using ordinal descriptives (17th Century, 3rd Millennium) the time period
> in question starts with 1 and ends with 0 (1601 - 1700, 2001 - 3000).
>
> When using cardinal descriptives (the 1600s, the 2000s, the 80s) the time
> period starts with 1 and ends with 9 (1600 - 1699, 2000 - 2999, 1980 - 1989).
^
0
But I agree with everything you present, modulo this typo. 31 December
1999 is the last day of the 1900s, and 31 December 2000 is the last day
of the Twentieth Century and the Second Millennium.
--
Larry Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 03 Mar 1999 15:56:38 GMT
From: mirak63@my-dejanews.com
Subject: The Win32::AdminMisc::GetDriveSpace function
Message-Id: <7bjm3g$7rl$1@nnrp1.dejanews.com>
Has anyone usee the Win32--GetDriveSpace function. I don't have any examples
in either of the two books I have on Perl for Win32. I'm using the latest of
the ActiveState Perl builds and I think I have it installed correctly but I'm
getting some goofy error when I try to run the script. A working example
would be appreciated.
Thanks,
Karim
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 03 Mar 1999 16:50:08 GMT
From: dturley@pobox.com
Subject: Re: URGENT! Where Do You Hide The CGI Cards From The Spiders?
Message-Id: <7bjp7r$ap5$1@nnrp1.dejanews.com>
In article <ZLZC2.79$hc3.684@nswpull.telstra.net>,
mgjv@comdyn.com.au (Martien Verbruggen) wrote:
> This has absolutely nothing at all to do with perl.
Agreed, but allow me this: the file I'm about to refer to is *.pl file. :-)
> Spiders
> will simply not find it if there is no link to them. Well behaved
> spiders can be stopped with a robots.txt file. Etc.
This is how I understand it as well. However, recently I was searching my
name in one of the search engines, maybe HotBot, but I can't remember. (Come
on, you all do it :-) I received a hit that was a config file for one of my
scripts being used on someone's server. The file was called config.pl and
there's no link to the file on any web pages, yet the spider indexed it. The
person was running the script from a web directory, not a special cgi-bin
directory, so does this mean the the spiders actually do something like a
readddir, rather than just following links?
--
____________________________________
David Turley
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 5045
**************************************