[12817] in Perl-Users-Digest
Perl-Users Digest, Issue: 227 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 22 15:07:28 1999
Date: Thu, 22 Jul 1999 12:05:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 22 Jul 1999 Volume: 9 Number: 227
Today's topics:
Re: a CGI problem <cfwu@slugger.ee.nthu.edu.tw>
Re: Array problem (Tad McClellan)
Re: authentication and getting HTTP_REMOTE_USER (Dan Wilga)
Re: Better Question re:File Parsing Difficulty <lojeck@mizar.usc.edu>
Re: Better Question re:File Parsing Difficulty (Greg Andrews)
Brain Dead & Parsing <andy@advdata.net>
Re: Can't modify array deref in addition <jcreed@cyclone.jprc.com>
checking if address is active (Steve .)
Re: FAQ 8.48: How do I add the directory my program liv <andy@advdata.net>
Re: getting the decimal portion of a floating point num (Larry Rosler)
Re: getting the decimal portion of a floating point num <bivey@teamdev.com>
Re: getting the decimal portion of a floating point num (Larry Rosler)
Re: Help me ..; databases ... <pcl@dds.nl>
help using GET to pul down an HTML document <<nospam>jasong@intrasonic.com>
help using GET to pull down an html document <<nospam>jasong@intrasonic.com>
Help using GET to pull down and HTML document. <jasong@intrasonic.com>
Re: How do I do a date string (ala from strftime) conve bane_dewitt@my-deja.com
How to guarantee a socket connection? tosh2@my-deja.com
Re: HTML on NT; how do I add docs? kiansp@my-deja.com
Re: lc Function <rdasilv@home.com>
Re: Perl CGI vs VB ASP <andy@advdata.net>
Perl Compiler?? <kangas@anlon.com>
Re: Perl Math Calculation vs. FORTRAN Calculations (Daniel S. Lewart)
Re: Perl on IIS <james.williamson@bbc.co.uk>
Re: Perl on IIS <lojeck@mizar.usc.edu>
Re: Perl on IIS <beaudoin.jean-marc@-NOSPAM-hydro.qc.ca>
Re: perl vs. FORTRAN Caculations (I R A Darth Aggie)
Re: Q: simple glob <webteam@ericps.crc.uiuc.edu>
Re: Q: simple glob <tchrist@mox.perl.com>
Re: reading files on IIS4.0 <swiftkid@bigfoot.com>
regualr expression bernd1615@my-deja.com
Speeding up Perl (Jason Stapels)
Re: TPJ/Earthweb junk mail? <macintsh@cs.bu.edu>
Re: TPJ/Earthweb junk mail? (Greg Bacon)
What is the best way to write data to a com port under <progressdll@angelfire.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 22 Jul 1999 18:10:50 GMT
From: Chi-Feng Wu <cfwu@slugger.ee.nthu.edu.tw>
Subject: Re: a CGI problem
Message-Id: <7n7mrb$e45$1@news.ee.nthu.edu.tw>
Yang Zhong-Lan <venice@video.ee.ntu.edu.tw> wrote:
: i want to tranfser a variable from a page written by CGI_program_A,
: but i don't want the user to change its value
: because its value is unknow to me, but CGI_program_B
: needs this value.
: can i make this variable invisible or unchangeable on the page,
: and the CGI_program_B can still get this value.
: example,
: <input type="text" name="aaa" value="dontchange">
: i hope aaa's value won't be changed by the user,
: but still can be transferred to CGI_program_B.
It is reasonable for CGI_program_A and CGI_program_B to be on the same
site. In that case, you can open some file to store the data that need
to be transfered. Localization of the data means higher security.
>>cfwu
------------------------------
Date: Thu, 22 Jul 1999 08:06:44 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Array problem
Message-Id: <kg17n7.i1a.ln@magna.metronet.com>
Jimtaylor5 (jimtaylor5@aol.com) wrote:
: >
: >@items = split '\|' , $line;
: >
: >foreach ( @items ) ... blah
: >
: >$total = @items; # count
: >
: >etc
: But what is ... blah,
A {block} of Perl code that does whatever it is you want to do.
Since you want to split them out, we assume that you want to
do _something_ with each one.
: and I still don't understand how I would get those items
: from the list into my program
You do not "get a list into your program".
You get a line into your program, in the $line variable.
Then you split() the $line to form the list, and save the list
element into the @items array.
: without knowing how many there are. maybe I'm
: missing something..
Arrays (and Hashes, and strings...) grow or shrink _as required_
in Perl programs.
You do not _need_ to know how many there are, perl will make
room for them.
Here is a complete program that you can run.
Run it.
Change the number of '|' separated items in $line, and run it again.
See? No problem.
----------------------------
#!/usr/bin/perl -w
use strict;
my $line = 'zero|one|two|t h r e e|four|five';
my @items = split /\|/ , $line;
foreach my $item ( @items ) {
print "element: '$item'\n";
}
----------------------------
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 22 Jul 1999 13:16:21 -0400
From: dwilgaREMOVE@mtholyoke.edu (Dan Wilga)
Subject: Re: authentication and getting HTTP_REMOTE_USER
Message-Id: <dwilgaREMOVE-2207991316220001@wilga.mtholyoke.edu>
> I can get other header information such as user_agent or remote_host, but
> not remote_user.
>
> Has anyone experienced this before or does anybody know of another way of
> capturing the username from an authentication dialog box?
Have you tried $ENV{REMOTE_USER}?
Dan Wilga dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply **
------------------------------
Date: Thu, 22 Jul 1999 09:14:17 -0700
From: Brian Lojeck <lojeck@mizar.usc.edu>
Subject: Re: Better Question re:File Parsing Difficulty
Message-Id: <Pine.GSO.4.10.9907220913280.14463-100000@mizar.usc.edu>
You can disregard this entire thread. the problem was a non-printing
charecter that my windoze-based text editor was hiding from me.
many thanks to you all for your help.
Brian Lojeck, lojeck@mizar.usc.edu
Learn as if you will live forever; live as if you will die tomorrow.
------------------------------
Date: 22 Jul 1999 11:06:02 -0700
From: gerg@shell.ncal.verio.com (Greg Andrews)
Subject: Re: Better Question re:File Parsing Difficulty
Message-Id: <7n7mia$9vg$1@shell1.ncal.verio.com>
Brian Lojeck <lojeck@mizar.usc.edu> writes:
>
>I can't figure out why this code prints the first "print" but not the
>second. a representative (short) of the file is copied to the bottom of
>the message.
>
>-------------- code starts here -----------------
>
> #just a simple test to make sure my code isnt hinky
> if ('<MarkHere>' =~ /MarkHere/) {
> print ('<br><br><br>This Will Print<br><br><br>');
> }
>
> #now the check of $_
> open(HPe, "$filename")
Syntax error. The open call is missing a semicolon.
It's also missing a check to see if the open() call succeeded.
> while (<HPe>){
> if (/MarkHere/){
> print ('<br> This Will Not Print <br>');
> }
> }
>
When I added the missing semicolon, your script ran fine and
printed both "br><br><br>This Will Print<br><br><br>" and
"<br> This Will Not Print <br>".
The print statements are also missing newlines at the end, but
perhaps that was deliberate.
-Greg
--
::::::::::::::::::: Greg Andrews gerg@wco.com :::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
------------------------------
Date: Thu, 22 Jul 1999 13:31:29 -0400
From: "Andy" <andy@advdata.net>
Subject: Brain Dead & Parsing
Message-Id: <932666299.310902@nntp.adni.net>
Folks,
I can really use some help. I am sure it is pretty simple for most
of you but I have been trying to figure it out for a couple hours.
I am trying to parse documents for my company from a remote web site. I am
just using lynx to get the source then store it in an array.
I am trying to search for a certain word like Current:
once it finds current it will print the next 5 lines that have href tags on
it
or
once it finds current. If will go until it hits the next word it is
searching for like Archive.
I am trying to pull a list of all the links on a page and the titles for
each are Current and Archive. The 5 lines of href tags can change to 3
sometimes, so I would prefer to have it just print any href tags between
Current and Archive. Any help would be greatly arppreciated
I have tried a lot and have been unsuccessful at this point. Thanks..
-- Andy
------------------------------
Date: 22 Jul 1999 12:48:56 -0400
From: Jason Reed <jcreed@cyclone.jprc.com>
Subject: Re: Can't modify array deref in addition
Message-Id: <a1g12ghbpj.fsf@cyclone.jprc.com>
Tomas Karlsson <tomas.karlsson@andover.net> writes:
> Hi,
>
> A short question about references. I would like to make changes to 3
> elements at the same time, but Perl doesn't like my code. I have:
>
> @{$totals{$dateref}} += @{$table{$site}{$dateref}} foreach my
> $dateref (keys %{$table{$site}});
>
> and I get the error message: "Can't modify array deref in addition". Ok
> so that clearly doesn't work. The only solution that I came up with is
>
> $totals{$dateref}->[0] += $table{$site}{$dateref}->[0];
> $totals{$dateref}->[1] += $table{$site}{$dateref}->[1];
> $totals{$dateref}->[2] += $table{$site}{$dateref}->[2];
Maybe you want
foreach my $dateref (keys %{$table{$site}}) {
$totals{$dateref}[$_] += $table{$site}{$dateref}[$_] for (0..2);
}
?
Adding an array to another array (what you're doing above) doesn't
make a lot of sense.
---Jason
------------------------------
Date: Thu, 22 Jul 1999 18:30:27 GMT
From: syarbrou@nospam.enteract.com (Steve .)
Subject: checking if address is active
Message-Id: <379762ae.790566@news.enteract.com>
We have a problem with a web site going down often. I need to write a
program that will basically hit the web site and return a value to a
log, whether it successfully is running or not. I can't use ping for
the box is running, just the web interface is dead. Thought of using
a call to lynx, but wasn't sure how to determine success or failure
with it. Any ideas? Thanks.
Steve
Newsgroup replies preferred. Remove nospam from address when
responding thru email.
------------------------------
Date: Thu, 22 Jul 1999 13:42:00 -0400
From: "Andy" <andy@advdata.net>
Subject: Re: FAQ 8.48: How do I add the directory my program lives in to the module/library search path?
Message-Id: <932666930.25230@nntp.adni.net>
I think you can do
unshift(@INC, "<dir path>");
that should put it to the beginning of @INC.
but I could be wrong :)
-- Andy
Tom Christiansen wrote in message <37974d7b@cs.colorado.edu>...
>(This excerpt from perlfaq8 - System Interaction
> ($Revision: 1.39 $, $Date: 1999/05/23 18:37:57 $)
>part of the standard set of documentation included with every
>valid Perl distribution, like the one on your system.
>See also http://language.perl.com/newdocs/pod/perlfaq8.html
>if your negligent system adminstrator has been remiss in his duties.)
>
> How do I add the directory my program lives in to the module/library
search path?
>
> use FindBin;
> use lib "$FindBin::Bin";
> use your_own_modules;
>
>--
>"Great spirits have always encountered violent opposition from mediocre
minds."
> - Albert Einstein
------------------------------
Date: Thu, 22 Jul 1999 09:09:05 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: getting the decimal portion of a floating point number
Message-Id: <MPG.1200e1f4c7c641fc989d1b@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <01bed452$e8c53e40$583c08cf@bill.jump.net> on 22 Jul 1999
14:59:35 GMT, William <bivey@teamdev.com> says...
> Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in article
> <7n5sd6$tdo$1@lublin.zrz.tu-berlin.de>...
> > William <bivey@teamdev.com> wrote in comp.lang.perl.misc:
> > >Because on my system that operation on that number yields
> > > 0.678900000000795
> > >which isn't exactly what the original poster had in mind,
> > >I'm sure.
> >
> > Probably not, but it is what they *should* have had in mind. If
> > the extra places are unwanted, use sprintf and friends.
>
> You mean they should expect that
> 12345.6789 - int(12345.6789) == 0.678900000000795
>
> On what planet? As far as sprintf goes, it will work, but I
> suspect its overhead is overkill for such a simple problem.
> You're suggesting that sprintf( "%.4f", $value-int($value) )
> is an efficient solution compared to $value =~ m{(\.\d)}?
Your mental model of this situation is totally muddled. You are
confusing string literals that happen to resemble floating-point numbers
with variables that are the result of floating-point calculation.
If the question is, what is the portion of the string literal
'12345.6789' that is the decimal point and any digits following, then
your string manipulation is acceptable. But if the question is, what is
the decimal portion of the result of a calculation, your method is
haphazard at best. It relies on perl to convert the floating-point
number to a string (using the same mechanism as sprintf, by the way),
which you then manipulate as a string. Why should there not be more
non-zero trailing digits than you think? The variable represented (as a
string) by 12345.6789 is only an approximation to that implicitly
infinite-precision representation.
The expression '$x - int $x' is in fact the correct way to get an
APPROXIMATION to the fractional part of $x. It may well have fewer
significant digits than $x, even *no* significant digits (consider a
number > 10**53 or whatever).
So rounding with sprintf to the desired *apparent* precision is quite
appropriate -- in fact, The Only Way To Do It right.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 22 Jul 1999 16:39:47 GMT
From: "William" <bivey@teamdev.com>
Subject: Re: getting the decimal portion of a floating point number
Message-Id: <01bed460$e8954c40$583c08cf@bill.jump.net>
Larry Rosler <lr@hpl.hp.com> wrote in article
<MPG.1200e1f4c7c641fc989d1b@nntp.hpl.hp.com>...
> [Posted and a courtesy copy sent.]
> Your mental model of this situation is totally muddled. You are
> confusing string literals that happen to resemble floating-point numbers
> with variables that are the result of floating-point calculation.
You are confusing an example value with a literal and an error
resulting from a floating point calculation with reality. The
$val - int($val) form is introducing digits that do not appear
in other calculations on a variety of numeric values, including
this one. Therefore, based on what the original poster wants,
my version is correct (though not the only correct method). I
might also point out that we do not know the status of the value
at the point this operation is to occur (the poster didn't
supply enough information to decide if it is a string or numeric
value - the word 'number' could mean either).
[...]
> The expression '$x - int $x' is in fact the correct way to get an
> APPROXIMATION to the fractional part of $x.
[...]
Funny, I thought the original poster wanted a useful, and sensible
value rather than an approximation that did not match rational
expectations.-Wm
------------------------------
Date: Thu, 22 Jul 1999 11:05:41 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: getting the decimal portion of a floating point number
Message-Id: <MPG.1200fd516ed2114e989d1d@nntp.hpl.hp.com>
In article <01bed460$e8954c40$583c08cf@bill.jump.net> on 22 Jul 1999
16:39:47 GMT, William <bivey@teamdev.com> says...
> Larry Rosler <lr@hpl.hp.com> wrote in article
> <MPG.1200e1f4c7c641fc989d1b@nntp.hpl.hp.com>...
> > Your mental model of this situation is totally muddled. You are
> > confusing string literals that happen to resemble floating-point numbers
> > with variables that are the result of floating-point calculation.
>
> You are confusing an example value with a literal and an error
> resulting from a floating point calculation with reality. The
> $val - int($val) form is introducing digits that do not appear
> in other calculations on a variety of numeric values, including
> this one.
The digits do not appear because you don't see them, not because they
are not there. See below.
> Therefore, based on what the original poster wants,
> my version is correct (though not the only correct method). I
> might also point out that we do not know the status of the value
> at the point this operation is to occur (the poster didn't
> supply enough information to decide if it is a string or numeric
> value - the word 'number' could mean either).
>
> [...]
> > The expression '$x - int $x' is in fact the correct way to get an
> > APPROXIMATION to the fractional part of $x.
> [...]
>
> Funny, I thought the original poster wanted a useful, and sensible
> value rather than an approximation that did not match rational
> expectations.-Wm
Even the literal is an approximation. You seem to have very little
understanding of internal binary floating-point representations, which
doesn't help you to formulate 'rational expectations'. You are being
misled by conversions from and to *decimal* representations and *binary*
representations.
perl -e 'print 12345.6789; printf " %.14f\n", 12345.6789'
12345.6789 12345.67890000000100
Just because 'print' approximates the number and hides the least-
significant bits doesn't mean they're not there.
Now please go away until you learn some computer 'science'.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 22 Jul 1999 20:08:56 +0200
From: danny <pcl@dds.nl>
Subject: Re: Help me ..; databases ...
Message-Id: <37975E38.C5B464C8@dds.nl>
Thanks to all for the answers..
1)
I'm trying to get a understanding for ODBC ... (i know oracle ..) but it seems
that i'm making the same mistakes over and over again...
Is there a BASIC statement for the ODBC
like
create a table
assign data to it
and read it ...
i tried to search.. but all the examples seems buggy ... (i run apache
locally...)
this example
1. use Win32::ODBC;
2. $db=new WIN32::ODBC('simple');
3. $varname="CGI Programming with Perl";
4. $db->Sql("select aname,price from mytable where
book='$varname' ");
5. $db->FetchRow();
6. ($Author,$cost)=$db->Data("aname","price");
7. print "The Book titled $varname is written by $Author
and costs $cost";
found at http://members.tripod.com/~anzer...
isn't working for me ... thats why i need a comprehensive example source code
2)
Whats wrong with :
$db->sql("select * from [table1]");
it won't perform the sql statement...
and
$db->sql("select field1 from [table1]");
is even a bigger dissaster..
is there a good url where i can find comprehensive and CLEAR transparent
information about ODBC ?
Many thanks,
danny
Jeff Thies wrote:
> > Windows NT Server
> > Database and CGI
> >
> > ColdFusion 4 Enterprise
> >
> > Chili!ASP
> > PhP3
> > Perl 5,
> > Visual Basic & C++ CGI
> > ODBC
> > Support
> >
> > whats the best way to use a database in perl ?
>
> DBI::DBD and DBD::ODBC
>
> Check the DBI man page... You might just want to run CF instead, easy
> but not as flexible.
>
> Jeff
------------------------------
Date: Thu, 22 Jul 1999 11:50:11 -0700
From: "Jason Gabriel" <<nospam>jasong@intrasonic.com>
Subject: help using GET to pul down an HTML document
Message-Id: <7n7p40$fne$1@nnrp03.primenet.com>
This works great on servers that are not using HTTP 1.1 redirection. The
page is there but the server returns "Not Found" because my hosting service
has multiple domains on 1 ip address using HTTP 1.1 redirection with IIS 4.
So what happens is that www.intrasonic.com/main.htm is there but this code
below will not find it because of the redirection.
Pleeasss help me! I would really appreciate any help.
use IO::Socket;
$browser = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => "www.intrasonic.com",
PeerPort => "http(80)",
);
$browser->autoflush(1);
print $browser "GET /main.htm HTTP/1.0\n\n";
print "Content-type: text/html\n\n";
while (<$browser>) {
print;
}
close $browser;
------------------------------
Date: Thu, 22 Jul 1999 11:49:32 -0700
From: "Jason Gabriel" <<nospam>jasong@intrasonic.com>
Subject: help using GET to pull down an html document
Message-Id: <7n7p2r$fn3$2@nnrp03.primenet.com>
This works great on servers that are not using HTTP 1.1 redirection. The
page is there but the server returns "Not Found" because my hosting service
has multiple domains on 1 ip address using HTTP 1.1 redirection with IIS 4.
So what happens is that www.intrasonic.com/main.htm is there but this code
below will not find it because of the redirection.
Pleeasss help me! I would really appreciate any help.
use IO::Socket;
$browser = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => "www.intrasonic.com",
PeerPort => "http(80)",
);
$browser->autoflush(1);
print $browser "GET /main.htm HTTP/1.0\n\n";
print "Content-type: text/html\n\n";
while (<$browser>) {
print;
}
close $browser;
------------------------------
Date: Thu, 22 Jul 1999 11:47:31 -0700
From: "Jason Gabriel" <jasong@intrasonic.com>
Subject: Help using GET to pull down and HTML document.
Message-Id: <7n7ov2$fm6$2@nnrp03.primenet.com>
This works great on servers that are not using HTTP 1.1 redirection. The
page is there but the server returns "Not Found" because my hosting service
has multiple domains on 1 ip address using HTTP 1.1 redirection with IIS 4.
So what happens is that www.intrasonic.com/main.htm is there but this code
below will not find it because of the redirection.
Pleeasss help me! I would really appreciate any help.
use IO::Socket;
$browser = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => "www.intrasonic.com",
PeerPort => "http(80)",
);
$browser->autoflush(1);
print $browser "GET /main.htm HTTP/1.0\n\n";
print "Content-type: text/html\n\n";
while (<$browser>) {
print;
}
close $browser;
------------------------------
Date: Thu, 22 Jul 1999 16:34:23 GMT
From: bane_dewitt@my-deja.com
Subject: Re: How do I do a date string (ala from strftime) conversion to time_t?
Message-Id: <7n7h6f$vjh$1@nnrp1.deja.com>
In article <379701B6.E9B1B35A@cwa.de>,
Stephan Wilms <Stephan.Wilms@cwa.de> wrote:
> Stephan
> (initiator of the campaign against grumpiness in c.l.c)
You should stick around c.l.p.m - I've never seen so many people so
desperately in need of a backrub!
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 22 Jul 1999 18:49:26 GMT
From: tosh2@my-deja.com
Subject: How to guarantee a socket connection?
Message-Id: <7n7p3h$2ji$1@nnrp1.deja.com>
Hi, I have a program that runs for 8 hours a day. During that 8 hours
the program makes socket connections. Sometimes it is unable to do so,
but I need the data from the connection, which will be made eventually,
so how do I keep trying to make the connection until it is successful?
I've tried:
while(!($remote = IO::Socket::INET->new(Proto => "tcp", PeerAddr
=> $host, PeerPort
=> "http(80)")))
which doesn't seem to be yielding the results I am after.
Any suggestions?
THANKS!!!
Tosh
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 22 Jul 1999 17:51:55 GMT
From: kiansp@my-deja.com
Subject: Re: HTML on NT; how do I add docs?
Message-Id: <7n7lnm$17e$1@nnrp1.deja.com>
Thanks, nice try. :-) I'll elaborate... If you install ActivePerl
(Windows-stuff, that is), you get documetation in HTML format with it. When
you open this (it's on the Start menu), it has two frames. The left hand side
contains a Table of Contents (TOC), which is a file called "perltoc.html". If
you click here, the related section opens in the right-hand frame.
When you install a module with PPM, the HTML documentation is also installed.
The TOC is updated so the new info is linked in, and you can click on the
left-hand side to open up the new documentation.
Now, if I just drop some files into the HTML hierarchy, the TOC stays the
same (it's a static file). Instead of manually editing it, I would like to
know how this index file is generated.
That's my question... Which program takes care of this documentation?
In article <379725D5.DC8C6DA4@bigfoot.com>,
matt <mlopresti@bigfoot.com> wrote:
> point your browser to read the new .html file. Is this what you're
> asking?
>
> kiansp@my-deja.com wrote:
>
> > I have installed AvticePerl "version 5.005_03 built for
> > MSWin32-x86-object", build 518.
> > With this comes documentation in HTML format.
> > Now I want to have a couple of HTML files added to the "perltoc.html"
> > file. This is additional info for a couple of modules.
> > I created a new folder under "C:\Perl\html\lib" and dropped the
> > HTML files into the folder.
> >
> > How do I incorporate new html files into the TOC?
> >
> > The PPM does this during an install, how is the documentation
> > maintained?
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 22 Jul 1999 18:33:22 GMT
From: "Rick Dasilva" <rdasilv@home.com>
Subject: Re: lc Function
Message-Id: <StJl3.4430$um6.39219@news2.rdc1.on.home.com>
Thanks Larry.
Rick.
Larry Rosler wrote in message ...
>[Posted and a courtesy copy sent.]
>
>In article <beHl3.4336$um6.38319@news2.rdc1.on.home.com> on Thu, 22 Jul
>1999 16:00:07 GMT, Rick Dasilva <rdasilv@home.com> says...
>> Can anyone tell me why th lc function in perl does not convert characters
>> such as É to é? Is this a known bug.
>
>perldoc perllocale
>
>Followups set.
>
>--
>(Just Another Larry) Rosler
>Hewlett-Packard Laboratories
>http://www.hpl.hp.com/personal/Larry_Rosler/
>lr@hpl.hp.com
------------------------------
Date: Thu, 22 Jul 1999 13:51:26 -0400
From: "Andy" <andy@advdata.net>
Subject: Re: Perl CGI vs VB ASP
Message-Id: <932667496.85665@nntp.adni.net>
Because sometimes you need both!
Asp is nice to integrate with the M$ stuff because it is just easier.
I think cookies and such are easier with ASP, but any of the true
parsing and dynamic content stuff will need to come from perl. There are
modules out for ASP that do certain things but where else can you get free
modules with something other than perl?
Perl should stay!!
Cost Factor!
-- Andy
matt wrote in message <379727AF.ABA0A758@bigfoot.com>...
>Reliablity!!!!!! Learning curve(You know it already)
>
>Eisen Chao wrote:
>
>> Hi All:
>>
>> I'm familiar with using Perl within CGI,
>> but not with VB & ASP.
>>
>> What are the advantages of the Perl/CGI
>> combination over using the Micro$oft
>> product ?
>>
>> We are going over to an M$ Web Server and
>> I have to justify the further use of perl.
>>
>> Thanks in Advance,
>>
>> Eisen
>
>
>
>
------------------------------
Date: Thu, 22 Jul 1999 14:02:59 -0500
From: Mike <kangas@anlon.com>
Subject: Perl Compiler??
Message-Id: <37976AE3.E03CF5B4@anlon.com>
I have seen an Alpha Perl Compiler Kit. The release is from Sept. 1996.
Does anyone have any idea about any newer versions or what the status on
a perl compiler is??
Thanks.
--
Michael Kangas
Anlon Systems, Inc.
kangas@anlon.com
------------------------------
Date: 22 Jul 1999 16:07:02 GMT
From: d-lewart@uiuc.edu (Daniel S. Lewart)
To: scott.dummer@noaa.gov (Scott Dummer)
Subject: Re: Perl Math Calculation vs. FORTRAN Calculations
Message-Id: <7n7fj6$22q$1@vixen.cso.uiuc.edu>
Scott Dummer <scott.dummer@noaa.gov> writes:
> I have wrote a series of equations to calculate something (like the
> distance on an oblate spheroid "earth") in FORTRAN and perl. Does
> anybody know why their answers differ slightly? I would tend to believe
> the FORTRAN calculation since one of it's strengths is intensive
> accurate mathematical number crunching. The FORTRAN program is using
> double precession (16 decimal places). The perl to the best of my
> knowledge is using 16 decimal places as well, although I am currently
> not using the perl math module, as I do not know what I would gain with
> it.
Judging from the sloppiness of your spelling and grammar, the answers
differ because you made one or more typos in one or both calculations.
Daniel Lewart
d-lewart@uiuc.edu
------------------------------
Date: Wed, 21 Jul 1999 14:31:07 +0100
From: "James Williamson" <james.williamson@bbc.co.uk>
Subject: Re: Perl on IIS
Message-Id: <7n4i5a$6ch$1@nntp0.reith.bbc.co.uk>
Todd Tolhurst wrote in message <3794d56b.20654481@news-server>...
>On Tue, 20 Jul 1999 19:39:26 GMT, Bennett <bennett_j@yahoo.com> wrote:
>
>>I need to run a Perl script on a box using IIS 4.0. The system
>>administrator is too scared to install an interpreter.
>
> Pay no attention to him, as he is an imposter. A true sysadmin is
>fearless. A true sysadmin also shuns IIS and kin.
>
>> However, he
>>seems to think that I can run the script without having to put perl on
>>the server.
>
> Hmm. Let me know when he's done setting that up.
>
>--
>Todd Tolhurst
>toto@toto.com
>http://www.w3xpert.com/toto/
>
Woosie,
It's probably not a case of too scared, too ignorant is more like it. ASP's
security holes are legendary, although I wouldn't be surprised if he just
doesn't know how to do it, as opposed to being too scared to do it.
James Williamson
james.williamson@bbc.co.uk
------------------------------
Date: Thu, 22 Jul 1999 09:35:07 -0700
From: Brian Lojeck <lojeck@mizar.usc.edu>
Subject: Re: Perl on IIS
Message-Id: <Pine.GSO.4.10.9907220933370.14463-100000@mizar.usc.edu>
There is a freeware app on the net (forget the address) called perl2exe
that works decently well for most perl scripts I've used it on. it turns
your perl script into a .exe file.
i've used it myself for a very quick-n-dirty server setup when
activestate's perl interpreter was giving me trouble...
Brian Lojeck, lojeck@mizar.usc.edu
Learn as if you will live forever; live as if you will die tomorrow.
------------------------------
Date: Thu, 22 Jul 1999 16:36:18 GMT
From: "Jean-Marc Beaudoin" <beaudoin.jean-marc@-NOSPAM-hydro.qc.ca>
Subject: Re: Perl on IIS
Message-Id: <6MHl3.9341$8v6.588896@carnaval.risq.qc.ca>
James Williamson <james.williamson@bbc.co.uk> a écrit dans le message :
7n4i5a$6ch$1@nntp0.reith.bbc.co.uk...
>
> Todd Tolhurst wrote in message <3794d56b.20654481@news-server>...
> >On Tue, 20 Jul 1999 19:39:26 GMT, Bennett <bennett_j@yahoo.com> wrote:
> >
> >>I need to run a Perl script on a box using IIS 4.0. The system
> >>administrator is too scared to install an interpreter.
> >
> > Pay no attention to him, as he is an imposter. A true sysadmin is
> >fearless. A true sysadmin also shuns IIS and kin.
> >
A true sysadmin.....runs Apache web server....instead!
> >> However, he
> >>seems to think that I can run the script without having to put perl on
> >>the server.
> >
> > Hmm. Let me know when he's done setting that up.
> >
> >--
> >Todd Tolhurst
> >toto@toto.com
> >http://www.w3xpert.com/toto/
> >
>
> Woosie,
> It's probably not a case of too scared, too ignorant is more like it.
ASP's
> security holes are legendary, although I wouldn't be surprised if he just
> doesn't know how to do it, as opposed to being too scared to do it.
>
> James Williamson
> james.williamson@bbc.co.uk
>
>
------------------------------
Date: 22 Jul 1999 16:53:31 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: perl vs. FORTRAN Caculations
Message-Id: <slrn7pej8h.tpb.fl_aggie@thepentagon.com>
On Thu, 22 Jul 1999 08:43:26 -0700, Larry Rosler <lr@hpl.hp.com>, in
<MPG.1200dbf277a45bf0989d1a@nntp.hpl.hp.com> wrote:
+ You are right about Fortran being quick. Don't expect speed from Perl -
+ - it's not designed for that.
So, just compile the fortran subroutines as libraries and use xs to
access them thru perl. Then you get the speed of fortran and the
ease-of-use in perl.
+ (Just Another Larry) Rosler
Is this a JAL? ;)
James
------------------------------
Date: Thu, 22 Jul 1999 11:53:23 -0500
From: ERIC webteam <webteam@ericps.crc.uiuc.edu>
To: Yogish Baliga <baliga@synopsys.com>
Subject: Re: Q: simple glob
Message-Id: <Pine.GSO.3.96.990722115244.5438A-100000@ericps.crc.uiuc.edu>
hmm..
i tried "<$new/*.CSV>" and the *.CSV is just take literally.
-milan
On Wed, 21 Jul 1999, Yogish Baliga wrote:
> Enclose the String <$new/*.CSV> in quotes.
>
> -- Baliga
>
> milan andric wrote:
>
> > What is wrong with the glob statement :
> >
> > open (DATA, "counties.list");
> >
> > while ($line=<DATA>){
> > chomp ($line);
> >
> > if ($line eq "Jo"){$line="jodavies"}
> > elsif($line eq "Rock"){$line="rockisla"}
> > elsif($line eq "St."){$line="stclair"}
> >
> > $new=substr("\L$line",0,8);
> > chdir("indexes/$new") || print "can't chdir $!\n";
> > if (<*.CSV>){
> > #it doesn't seem to do anything.. @temp is empty.
> > push (@temp, <$new/*.CSV>);}
> > chdir ("../../");
> > }
> >
> > close(DATA);
> > print @temp;
> >
> > a little stuck...
> >
> > thanks for any help,
> > milan
>
>
>
------------------------------
Date: 22 Jul 1999 11:20:37 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Q: simple glob
Message-Id: <379752e5@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
ERIC webteam <webteam@ericps.crc.uiuc.edu> writes:
:i tried "<$new/*.CSV>" and the *.CSV is just take literally.
Try glob("$new/*.CSV") instead.
--tom
--
All language designers are arrogant. Goes with the territory... :-)
--Larry Wall in <1991Jul13.010945.19157@netlabs.com
------------------------------
Date: Thu, 22 Jul 1999 20:54:41 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: reading files on IIS4.0
Message-Id: <7n8i61$elf13@news.cyber.net.pk>
: open (INFO, "../investors/testfile.txt");
or die() - where is that?
: @lines = <INFO>;
: close (INFO);
: $index = $#lines;
: $stock = $lines[$index];
: print $stock;
you really want to print $stock before the header?
: print "Content-type: text/html\n\n";
: print "<HTML><HEAD><TITLE>Stock Ticker</TITLE></HEAD><BODY>\n";
: print "<h1>Today's stock value</h1><br><br>";
: print "index is \'$stock\'<HR>";
Why are you quoting the single quotes?
: print "</body></html>";
------------------------------
Date: Thu, 22 Jul 1999 17:53:28 GMT
From: bernd1615@my-deja.com
Subject: regualr expression
Message-Id: <7n7lqj$189$1@nnrp1.deja.com>
Dear Readers ,
the following code needs improvment :
foreach $gerrit (@welo) {
$gerrit = /(^[a-zA-Z0-9].*)\s/ ;
@welo = grep { !/$domain eq $gerrit/ } @welo; }
@welo contains strings. I want to delete all entries of
@welo, where $domain is equal to the characters from the begining up to
the first \s of the string.
Your insight knowledge will be greatly appreciated !
bernd
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 22 Jul 1999 18:39:01 GMT
From: jmstapel_n0spam@mtu.edu (Jason Stapels)
Subject: Speeding up Perl
Message-Id: <7n7og5$4is$1@campus1.mtu.edu>
I wanted to double check ona few things. I did some tests and came up with
the following...
grep blah($_), @array; # fastest
for (@array) { blah($_); } # fast
map { blah($_); } (@array); # slow
blah can be anything really, but for some reason the grep command
actually runs through the fastest which actually surprised me.
Is there anything I should be weary of if I use the grep command
for doing simple loop operations on large arrays?
Jason
------------------------------
Date: 22 Jul 1999 17:59:08 GMT
From: John Siracusa <macintsh@cs.bu.edu>
Subject: Re: TPJ/Earthweb junk mail?
Message-Id: <7n7m5c$5vd$1@news1.bu.edu>
Jon Orwant <orwant@rising-sun.media.mit.edu> wrote:
> As you know from our conversation at YAPC, I'm not happy with the
> web site either.
Oh jeez, amen to that. It's a web design nightmare. Within 10
seconds of browsing my first article online, I fired off an email
complaining about the tiny, unreadable font they used for code
examples. I mean, it's kind of useless as a resource if you can't
read the code.
As for junk email, I get so much that I don't really keep track. It
was probably "manually auto-deleted" by my spam trigger-finger...
-----------------+----------------------------------------
John Siracusa | If you only have a hammer, you tend to
macintsh@bu.edu | see every problem as a nail. -- Maslow
------------------------------
Date: 22 Jul 1999 18:23:00 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: TPJ/Earthweb junk mail?
Message-Id: <7n7ni4$b30$2@info2.uah.edu>
In article <7n7m5c$5vd$1@news1.bu.edu>,
John Siracusa <macintsh@cs.bu.edu> writes:
: Oh jeez, amen to that. It's a web design nightmare. Within 10
: seconds of browsing my first article online, I fired off an email
: complaining about the tiny, unreadable font they used for code
: examples. I mean, it's kind of useless as a resource if you can't
: read the code.
You don't have to be pushed around by some fucking "HTML programmer",
you know.
Apologies to Ken.
Greg
--
Cop: McManus told us another story altogether.
Fenster: Is that the one about the hooker with dysentery?
------------------------------
Date: Thu, 22 Jul 1999 18:17:54 +0200
From: "Joeri Belis" <progressdll@angelfire.com>
Subject: What is the best way to write data to a com port under DOS.
Message-Id: <7n7g8b$oht$1@xenon.inbe.net>
What is the best way to write data to a com port under DOS.
the baud rate must be 9600. How can i set this in a perl program
joe
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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 V9 Issue 227
*************************************