[16116] in Perl-Users-Digest
Perl-Users Digest, Issue: 3528 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 1 00:06:13 2000
Date: Fri, 30 Jun 2000 21: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)
Message-Id: <962424312-v9-i3528@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 30 Jun 2000 Volume: 9 Number: 3528
Today's topics:
Re: $_ and @_ use? <o1technospam@skyenet.nospam.net>
Re: a large amount of unique numbers in an efficient wa (Craig Berry)
Re: a large amount of unique numbers in an efficient wa (Craig Berry)
Re: a large amount of unique numbers in an efficient wa (Craig Berry)
Re: a large amount of unique numbers in an efficient wa (Craig Berry)
Re: Arrakis & Perl <gwr@novia.net>
Re: check for valid e-mail address (brian d foy)
Re: comparison question (jason)
cross-module inclusion and use (Steve Revilak)
Re: cross-module inclusion and use <bwalton@rochester.rr.com>
Re: cross-module inclusion and use (jason)
date conversions... <kaweed@micron.com>
Re: date conversions... <makarand_kulkarni@My-Deja.com>
Re: DBD::Oracle and &DBI::fetchrow_hashref <jsdNOjsSPAM@gamespot.com.invalid>
Dumb Perl (win32) Q <mikecook@dcranch.com>
hash of arrays question <jimidogNOjiSPAM@mailcity.com.invalid>
Re: hash of arrays question <bwalton@rochester.rr.com>
Re: Help beginner with CGI.pm please newsposter@cthulhu.demon.nl
Re: Help beginner with CGI.pm please <dan@tuatha.sidhe.org>
Re: Help beginner with CGI.pm please <flavell@mail.cern.ch>
Re: Help with hashes <cghansen@micron.com>
Re: how to read STDERR from an ext cmd <jsdNOjsSPAM@gamespot.com.invalid>
Re: Include Files (jason)
Installing modules onto Tripod <mnysurf@home.comREMOVE>
Re: Looking for the comp.lang.perl.misc FAQ <o1technospam@skyenet.nospam.net>
Re: Looking for the comp.lang.perl.misc FAQ (Tad McClellan)
Manipulating HTML POST <tambaa@netscape.net>
Re: Manipulating HTML POST <makarand_kulkarni@My-Deja.com>
off topic question about NT command shell [was: Dumb Pe (jason)
Re: Perl NT and pipes <ned@bike-nomad.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 30 Jun 2000 20:16:36 -0500
From: "Jim Kauzlarich" <o1technospam@skyenet.nospam.net>
Subject: Re: $_ and @_ use?
Message-Id: <5xb75.1711$JZ4.4920@newsfeed.slurp.net>
"Tad McClellan" <tadmc@metronet.com> wrote in message
news:slrn8lo61h.59f.tadmc@magna.metronet.com...
> On Thu, 29 Jun 2000 22:49:09 -0500, Jim Kauzlarich
<o1technospam@skyenet.nospam.net> wrote:
>
>
> >What is "Perl golf"? I assume it has something to do with randomly
hacking
> >your way to the goal. I've heard the term at least twice now and I'm
> >curious.
>
>
> Accomplishing some task in Perl with the fewest possible characters.
>
> "lower score is better", like in golf.
arigato!
JMK
------------------------------
Date: Fri, 30 Jun 2000 22:38:40 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: a large amount of unique numbers in an efficient way?
Message-Id: <slq8bgdeop3157@corp.supernews.com>
Andrew Collington (aahz@writeme.com) wrote:
: What would be the most efficient way to generate a large array of random
: numbers, from, say 1000 to 9999?
Omitting error checking (like the bad things that will happen if you ask
for a smaller range than count), and assuming that you want to maintain
the random *ordering* of your random numbers (it's simpler to write if you
don't), here's one way:
sub uniqueRandomInts {
my ($lower, $upper, $count) = @_;
my (%used, @nums, $num);
my $range = $upper - $lower;
while (@nums < $count) {
push @nums, $num unless $used{$num = $lower + int rand $range}++;
}
return @nums;
}
print join "\n", uniqueRandomInts(1000, 10000, 500);
--
| Craig Berry - http://www.cinenet.net/users/cberry/home.html
--*-- "Beauty and strength, leaping laughter and delicious
| languor, force and fire, are of us." - Liber AL II:20
------------------------------
Date: Fri, 30 Jun 2000 22:40:23 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: a large amount of unique numbers in an efficient way?
Message-Id: <slq8en40op327@corp.supernews.com>
Ala Qumsieh (aqumsieh@hyperchip.com) wrote:
: Well, first of all, you can guarantee that your number is between 1000
: and 9999 (inclusive) by the following:
:
: int(1000 + rand 10000)
Make that: int(1000 + rand 9000)
--
| Craig Berry - http://www.cinenet.net/users/cberry/home.html
--*-- "Beauty and strength, leaping laughter and delicious
| languor, force and fire, are of us." - Liber AL II:20
------------------------------
Date: Fri, 30 Jun 2000 22:44:09 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: a large amount of unique numbers in an efficient way?
Message-Id: <slq8lp1op3184@corp.supernews.com>
Abigail (abigail@delanet.com) wrote:
: Part of being an correct algorithm implies garanteed termination.
: The above algorithm doesn't have that.
True for a 'truly' random number solution. For a pseudorandom cyclic
generator, every number in the range is guaranteed to be generated, so
termination is certain. In a sense, the random number generator plus
modulo operator implicit in rand's argument are themselves implementing
your "shuffle and cut" algorithm, less efficiently but with more obvious
expression as code.
--
| Craig Berry - http://www.cinenet.net/users/cberry/home.html
--*-- "Beauty and strength, leaping laughter and delicious
| languor, force and fire, are of us." - Liber AL II:20
------------------------------
Date: Fri, 30 Jun 2000 22:46:49 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: a large amount of unique numbers in an efficient way?
Message-Id: <slq8qp33op365@corp.supernews.com>
arnet@hpcvplnx.cv.hp.com wrote:
: > Part of being an correct algorithm implies garanteed termination.
: > The above algorithm doesn't have that.
:
: Assuming that the random number generator was truely random, how could
: you *ever* guarantee termination? The sequence "1047 1047 1047 1047 ..."
: is as random as any other. Is there a way to generate x *unique*
: random numbers between y and z and guarantee that you will always terminate?
Yes; as Abigail pointed out, you simply create an containing all of the
integers (y..z), shuffle them (e.g., using the FAQ algorithm) -- easy to
do in a guaranteed-to-terminate fashion -- and then take the first N
elements in the shuffled array.
--
| Craig Berry - http://www.cinenet.net/users/cberry/home.html
--*-- "Beauty and strength, leaping laughter and delicious
| languor, force and fire, are of us." - Liber AL II:20
------------------------------
Date: 30 Jun 2000 17:51:08 -0500
From: George Rapp <gwr@novia.net>
Subject: Re: Arrakis & Perl
Message-Id: <395d23ae$0$149$45beb828@newscene.com>
Rafael Garcia-Suarez <garcia_suarez@hotmail.com> wrote:
> news.teleline.es wrote in comp.lang.perl.misc:
>>Hello,
>>now Arrakis.com don't allow Perl cgi for all the new users.
> They're probably afraid that someone could code a giant internet worm.
> --
> Rafael Garcia-Suarez
8^) Submitted to alt.humor.best-of-usenet.
------------------------------
Date: Fri, 30 Jun 2000 18:42:41 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: check for valid e-mail address
Message-Id: <brian-ya02408000R3006001842410001@news.panix.com>
In article <8jidkc$lqo6$1@ID-36965.news.cis.dfn.de>, "mike solomon" <mike.solomon@eps.ltd.uk> posted:
> the regex does what I want it to do
no it doesn't. it would reject my perfectly valid and deliverable
address. furthermore, your limited solution may work for a limited
problem space, but not for a general solution for this forum.
> this script is used for reports going to internal addresses and to some of
> our customers and it is a lot better than nothing
but worse than doing it correctly.
> as to putting INVALID ADDRESS in the array
>
> this is because the array holds other error messages as well as the invalid
> addresses , such as invalid file names
that is special to your particular application and thus not necessary
for a general solution that you would give out in this forum. even
then, there are better ways of doing it.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>
------------------------------
Date: Sat, 01 Jul 2000 03:20:01 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: comparison question
Message-Id: <MPG.13c8009e13e1aba198975f@news>
James Fisher writes ..
>I am using the following code in an if statement
>
>if ($element eq "QUESTION" && $_{'NUMBER'} == $SearchNumber) {
>
>The latter comparison is failing when comparing two variables. I know
>you can compare variables... I have tried using eval to get a result to
>no avail. Possibly, is it the module I am using(XML::Parser module).
there's nothing wrong with the comparison .. my guess is that either
$element does not equal 'QUESTION' or the 'NUMBER' member of the %_ hash
does not numerically equal $SearchNumber
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Fri, 30 Jun 2000 22:24:01 -0400
From: revilak@umbsky.cc.umb.edu (Steve Revilak)
Subject: cross-module inclusion and use
Message-Id: <1ed28cm.709fzq7cnb7kN@svr02-p20.ppp.umb.edu>
I've been looking for an answer to this for some time, so I'd like to
ask.
The scenario in question would be a larger collection of Perl modules.
In some cases one module requires some of the functionality of a second;
and the second needs some functionality of the first. A very simplified
example:
------------------
# File: A.pm
package A;
use strict;
use lib ".";
use B;
sub a_sub
{
printf("a_sub got " . @_ . "\n");
}
1;
------------------
and
------------------
# file: B.pm
package B;
use strict;
use lib ".";
use A;
sub b_sub
{
printf("b_sub got " . @_ . "\n");
}
1;
------------------
Things seem to get along well at runtime, however:
$ perl -w A.pm
Subroutine a_sub redefined at A.pm line 9.
$ perl -w B.pm
Subroutine b_sub redefined at B.pm line 10.
$
I can see why these warnings would be produced, but what is the proper
thing to do in this sort of case? Something to the effect of what a
C-programmer might accomplish through:
#ifndef HEADER_FILE
#define HEADER_FILE
/* Stuff goes here */
#endif
Thanks!
------------------------------
Date: Sat, 01 Jul 2000 03:10:36 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: cross-module inclusion and use
Message-Id: <395D6177.11B7D653@rochester.rr.com>
Steve Revilak wrote:
>
> I've been looking for an answer to this for some time, so I'd like to
> ask.
>
> The scenario in question would be a larger collection of Perl modules.
> In some cases one module requires some of the functionality of a second;
> and the second needs some functionality of the first. A very simplified
> example:
>
> ------------------
> # File: A.pm
> package A;
>
> use strict;
> use lib ".";
> use B;
>
> sub a_sub
> {
> printf("a_sub got " . @_ . "\n");
> }
> 1;
> ------------------
>
> and
>
> ------------------
> # file: B.pm
> package B;
>
> use strict;
> use lib ".";
> use A;
>
> sub b_sub
> {
> printf("b_sub got " . @_ . "\n");
> }
> 1;
> ------------------
>
> Things seem to get along well at runtime, however:
>
> $ perl -w A.pm
> Subroutine a_sub redefined at A.pm line 9.
> $ perl -w B.pm
> Subroutine b_sub redefined at B.pm line 10.
> $
>
> I can see why these warnings would be produced, but what is the proper
> thing to do in this sort of case? Something to the effect of what a
> C-programmer might accomplish through:
>
> #ifndef HEADER_FILE
> #define HEADER_FILE
> /* Stuff goes here */
> #endif
>
> Thanks!
Well, since things are OK at runtime, you might just turn warnings off
and back on by adding
no warnings;
...
use warnings;
around the sub's. That way, when they are redefined, there aren't any
warning messages. The warnings are there because you usually do want to
know about things like that; if you don't, well, that's what no
warnings; is for.
--
Bob Walton
------------------------------
Date: Sat, 01 Jul 2000 03:48:33 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: cross-module inclusion and use
Message-Id: <MPG.13c8075445cf0b99989764@news>
Steve Revilak writes ..
>The scenario in question would be a larger collection of Perl modules.
>In some cases one module requires some of the functionality of a second;
>and the second needs some functionality of the first. A very simplified
>example:
-
>$ perl -w A.pm
>Subroutine a_sub redefined at A.pm line 9.
>$ perl -w B.pm
>Subroutine b_sub redefined at B.pm line 10.
>$
>
>I can see why these warnings would be produced, but what is the proper
>thing to do in this sort of case? Something to the effect of what a
>C-programmer might accomplish through:
to get finer control over the procedure you need to take control of it
rather than leaving it up to the convenient 'use' function
change the 'use's to 'require's and put them in BEGIN blocks .. then do
a variable check in there before making the require call (obviously each
one would need to set a flag so that the other one knows not to call
require)
check out the documentation for 'use' to see what it's equivalent to
perldoc -f use
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Fri, 30 Jun 2000 16:47:34 -0600
From: "Kris" <kaweed@micron.com>
Subject: date conversions...
Message-Id: <8jj82l$6ja$1@admin-srv3.micron.com>
hello-
I'm looking for some type of algorithm or code snippet (even an idea of
a direction to go in) on creating a numerical list from a dated list. I'm
using a plotting program to plot some dates, but it won't accept dates in
the format I have. So what I need to do is convert each date into a number.
So, if I convert the first date in the file to a 1 (say it's 3/30/2000) then
I need to convert 3/31/2000 to 2, and 4/1/2000 to 3, and so on. Any ideas
on how to do this? The other problem I have is that there are often
re-ocurring dates and they aren't all in order, so I need all instances of
4/1/2000 throughout the file to be a 3. A bit confusing and tailored I
know, but I thought I'd see if anyone had any ideas?
Kris
------------------------------
Date: Fri, 30 Jun 2000 17:37:52 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: date conversions...
Message-Id: <395D3D60.9B47CF64@My-Deja.com>
> a direction to go in) on creating a numerical list from a dated list.
take the epoch value for each date.
use timelocal function from Time::Local
--
------------------------------
Date: Fri, 30 Jun 2000 16:39:02 -0700
From: jsd <jsdNOjsSPAM@gamespot.com.invalid>
Subject: Re: DBD::Oracle and &DBI::fetchrow_hashref
Message-Id: <0ca90d7c.9929147e@usw-ex0104-026.remarq.com>
Mike Pastore <pastorem@mediaone.net> wrote:
>I'm using DBD::Oracle with a database on a remote server.
Everything
>is working just fine and dandy, except when I try to use
fetchrow_hashref. i
>Oracle returns uppercased field names. Is there any way to get
around this?
this is more of an oracle question than a perl question.
oracle doesn't care about the case of column names. "select *
from mytable" and "select * from MyTaBlE" are identical.
since it doesn't care, you probably shouldn't either, but if
you're trying to pretty them up for printing, you might the perl
function lc and ucfirst to be of interest...
-jsd-
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Fri, 30 Jun 2000 16:36:40 -0700
From: "Michael Cook" <mikecook@dcranch.com>
Subject: Dumb Perl (win32) Q
Message-Id: <eXb75.387$A82.330619@news.uswest.net>
Hello,
I put Active Perl on my winnt box to do some extra stuff and am having
trouble debugging CGI scripts. The output of these scripts is usually a
rather long html page & when I run this from a 'cmd' prompt, it buzzes by
very fast & I can't see all of the output. Is there a way to scroll back
through the output, or use a pager (like 'script.pl | more'), or is there
another interface I should bee debugging from?
Thanks a million!!!
Michael
------------------------------
Date: Fri, 30 Jun 2000 19:30:14 -0700
From: jimidog <jimidogNOjiSPAM@mailcity.com.invalid>
Subject: hash of arrays question
Message-Id: <01afe59c.ca3f6d6a@usw-ex0105-040.remarq.com>
Given a hash of arrays %pairs with 3 elements in each array, the
assignment
($a,$b,$c) = @ { $pairs{$key} };
works, but
($a,$b) = @ { $pairs{$key}[0,1] };
doesn't. Any ideas why?
-- Jim Mauldin
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Sat, 01 Jul 2000 02:40:35 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: hash of arrays question
Message-Id: <395D5A6E.8CE07571@rochester.rr.com>
jimidog wrote:
>
> Given a hash of arrays %pairs with 3 elements in each array, the
> assignment
>
> ($a,$b,$c) = @ { $pairs{$key} };
>
> works, but
>
> ($a,$b) = @ { $pairs{$key}[0,1] };
>
> doesn't. Any ideas why?
>
> -- Jim Mauldin
...
Sure. You have the braces in the wrong place. You need:
($a,$b) = @ { $pairs{$key} } [0,1];
--
Bob Walton
------------------------------
Date: 30 Jun 2000 22:07:57 GMT
From: newsposter@cthulhu.demon.nl
Subject: Re: Help beginner with CGI.pm please
Message-Id: <8jj5nt$bo5$1@internal-news.uu.net>
lliacopo8088@my-deja.com wrote:
> Thanks all!
> It's a shame that there is no quick way to check that all fields were
> completed though because you basically cannot have a generic script for
> multiple cgi applications. Seems client side checking with javascript
> is the way to go so that when the cgi script is launched it is taken
> for granted that form is completely filled out.
Nope, people can disable javascript. You _always_ have to check
server side.
Erik
------------------------------
Date: Fri, 30 Jun 2000 22:16:04 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Help beginner with CGI.pm please
Message-Id: <E_875.1403$cu1.4926@news1.rdc1.ct.home.com>
lliacopo8088@my-deja.com wrote:
> Thanks all!
> It's a shame that there is no quick way to check that all fields were
> completed though because you basically cannot have a generic script for
> multiple cgi applications.
But only the cgi program can know whether all the data it gets back is
correct, and whether it's even gotten all its data back.
> Seems client side checking with javascript
> is the way to go so that when the cgi script is launched it is taken
> for granted that form is completely filled out.
This is a good way to get badly burned by some twit with too much time on
its hands. Trusting that the data the client returns is correct is a *bad*
idea. It's trivial to spoof the return--a nefarious soul can send back
anything he/she/it wants to your program, and if it trusts the data is
valid it's going to get burned.
Don't trust data that comes from outside your program if you can help it.
(Not trusting your program is a touch too paranoid for most circumstances,
but isn't always inappropriate. Tricky to work around, though)
Dan
------------------------------
Date: Sat, 1 Jul 2000 00:17:56 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Help beginner with CGI.pm please
Message-Id: <Pine.GHP.4.21.0007010007490.7131-100000@hpplus03.cern.ch>
On Fri, 30 Jun 2000 lliacopo8088@my-deja.com once again demonstrated
the value of upside-down quoting as a bogosity indicator:
> You could fetch all the names into an array and loop through testing
> something like $q->param($name[$i]) to see if it's a null string "".
Unset parameters likely represent "unsuccessful controls" in the terms
of the HTML4.0 specification, and thus will be omitted from the
submission. Check the spec, but IINM this is a mandatory requirement,
not just a pleasant hint.
> However this does not work with all form constructs (checkbox radio
> select-multiple). It seems to only work with textfield and textarea.
"It seems"? Haven't you ever seen an interworking specification? If
you discovered deviations from a mandatory requirement, you'd be
pointing out which particular client implementation was at fault. As
you aren't doing so, I can only recommend the hon Usenauts to do their
own homework, rather than relying on usenet postings.
> Can such a generic script be built??
Pardon? If you mean "can a program be written to detect the absence
of something that should have been there", then the answer of course
is "yes, as long as you _know_ what should have been there".
Since a conscientious CGI programmer would be using CGI.pm to write
the form in the first place, then a reasonably-engineered script could
know what it expected, without additional red-tape.
[and another jeopardectomy, including multiple quoted sigs. It's a
pity that bogosity alerts have to be so voluminous. If you'd just
written "PERL" all in caps, and then deleted the rest...]
------------------------------
Date: Fri, 30 Jun 2000 16:52:42 -0600
From: "Colby Hansen" <cghansen@micron.com>
Subject: Re: Help with hashes
Message-Id: <8jj8br$6jl$1@admin-srv3.micron.com>
I actually had a good laugh at this one... :-)
Tad McClellan wrote in message ...
>On Thu, 29 Jun 2000 13:01:25 -0600, Colby Hansen <cghansen@micron.com>
wrote:
>
>>By the way, how old are you???
>
>
>I am "too old" for some things and "not old enough" for other things.
>
>
>Why do you ask?
>
>This is comp.lang.perl.misc, not soc.singles
>(and I'm "taken" anyway, thanks for your interest)
>
>:-)
>
>
>
>How old are _you_?
>
>How much money do you make?
>
>What are you wearing right now? :-)
>
>
>--
> Tad McClellan SGML Consulting
> tadmc@metronet.com Perl programming
> Fort Worth, Texas
------------------------------
Date: Fri, 30 Jun 2000 16:44:50 -0700
From: jsd <jsdNOjsSPAM@gamespot.com.invalid>
Subject: Re: how to read STDERR from an ext cmd
Message-Id: <113997a8.9aac64cb@usw-ex0104-026.remarq.com>
ken_ross@my-deja.com wrote:
>Perlfaq8 answers the question, "How can I capture STDERR from an
>external command?" I have a related problem, which is my
coworker is
>able to read standard error from an external command WITHOUT
using
>"2>&1", yet I have to use it
without seeing the code, i have to guess that your coworker had
messed with STDERR somehow, perhaps like this:
open (STDERR,">&STDOUT")
i personally prefer to use the IPC::Open3 when dealing with this
sort of problem. you may find it useful too. alternatively
since you were opening a command to FTP, i would *strongly*
recommend learning and using the Net::FTP module instead.
-jsd-
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Sat, 01 Jul 2000 03:25:41 GMT
From: elephant@squirrelgroup.com (jason)
Subject: Re: Include Files
Message-Id: <MPG.13c801f7c6d4c054989760@news>
Chris Moreton writes ..
>Is there a way to include text from another file in a perl script? For
>example, a list of constants that are common to several scripts or some
>initiation code which is common? And functions.
yes - the following perl documentation should help
perldoc -f use
perldoc perlmod
and maybe
perldoc lib
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Sat, 01 Jul 2000 03:41:24 GMT
From: "Thomas" <mnysurf@home.comREMOVE>
Subject: Installing modules onto Tripod
Message-Id: <ELd75.2772$6y5.2788392@news2.rdc2.tx.home.com>
I want to use LWP.pm with a cgi script on my website that is hosted by
tripod.com. Tripod has Perl, but it does not include LWP. I obviously do
not have access to the actual Perl program, so how can I install LWP.pm?
------------------------------
Date: Fri, 30 Jun 2000 17:10:23 -0500
From: "Jim Kauzlarich" <o1technospam@skyenet.nospam.net>
Subject: Re: Looking for the comp.lang.perl.misc FAQ
Message-Id: <sO875.1389$JZ4.4349@newsfeed.slurp.net>
"Tad McClellan" <tadmc@metronet.com> wrote in message
news:slrn8lpft3.696.tadmc@magna.metronet.com...
> On Fri, 30 Jun 2000 01:53:22 -0500, Jim Kauzlarich
<o1technospam@skyenet.nospam.net> wrote:
>
> >Ok, I'm sure I'm going to displease SOMEONE here, but I've looked on
> >deja.com CPAN, www.perlfaq.com www.perl.com language.per.com and a few
> >others I can't recall,
>
> Asking for clue better not displease anyone.
> Post their displeasure here so we can scorn them :-)
:-)
> >but I still can't find the FAQ for this newsgroup.
>
> I don't think there is one.
Surprizing. In my (admittidly sparce) experience, newsgroups are either a
version of the Wild West, or have HUGE faq's. This is a new one for me!
> >I'm not looking for the Perl FAQ, but the rules and etiqute for this
> >newsgroup.
>
> The rules of netiquette are generally applicable to nearly all
> Big 8 newsgroups, so there is not a specific set of netiquette
> rules for this particular newsgroup.
>
> Seeing the regular postings on
>
> news.announce.newusers
>
> ought to be enough.
Dakashun. (or howerver it's spelled) ;-)
BTW... newbie/off-topic question: What are the Big 8? :)
------------------------------
Date: Fri, 30 Jun 2000 17:38:22 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Looking for the comp.lang.perl.misc FAQ
Message-Id: <slrn8lq4qe.74g.tadmc@magna.metronet.com>
On Fri, 30 Jun 2000 17:10:23 -0500, Jim Kauzlarich <o1technospam@skyenet.nospam.net> wrote:
>
>"Tad McClellan" <tadmc@metronet.com> wrote in message
>news:slrn8lpft3.696.tadmc@magna.metronet.com...
>> On Fri, 30 Jun 2000 01:53:22 -0500, Jim Kauzlarich
><o1technospam@skyenet.nospam.net> wrote:
>>
>> >but I still can't find the FAQ for this newsgroup.
>>
>> I don't think there is one.
>
>Surprizing. In my (admittidly sparce) experience, newsgroups are either a
>version of the Wild West, or have HUGE faq's. This is a new one for me!
We have a truly huge FAQ for the Perl _language_, but no FAQ
for the Perl _newsgroup_.
>BTW... newbie/off-topic question: What are the Big 8? :)
The 8 primary Usenet hierarchies ( comp.*, rec.*, ...)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 30 Jun 2000 20:10:09 -0500
From: TH <tambaa@netscape.net>
Subject: Manipulating HTML POST
Message-Id: <395D44F1.4A35576B@netscape.net>
We have a web server that stores network stats. To access these stats
one fills a form which uses the POST method to request the data from
the server. The problem is that the stats are displayed in delimited
format and difficult to view properly especially when there's a lot of
information. The web administrator's hands are full and does not have
time to work on changing the views.
Does anyone have any idea how I intercept the data and display the
stats in a format that is readable? There's a web server available
elsewhere that can be used to write cgi sripts in Perl.
Regards,
TH
------------------------------
Date: Fri, 30 Jun 2000 18:23:45 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Manipulating HTML POST
Message-Id: <395D4821.6801AC9E@My-Deja.com>
> Does anyone have any idea how I intercept the data and display the
> stats in a format that is readable? There's a web server available
> elsewhere that can be used to write cgi sripts in Perl.
Write a cgi script that reads the stats and formats them
for nice viewing. You may want to use tags like
<table>..</table>, <tr>..</tr> and <td>...</td> to
do the formatting. See if Data::ShowTable can help you.
--
------------------------------
Date: Sat, 01 Jul 2000 03:40:33 GMT
From: elephant@squirrelgroup.com (jason)
Subject: off topic question about NT command shell [was: Dumb Perl (win32) Q]
Message-Id: <MPG.13c805726a4c1bef989763@news>
Michael Cook writes ..
> I put Active Perl on my winnt box to do some extra stuff and am having
>trouble debugging CGI scripts. The output of these scripts is usually a
>rather long html page & when I run this from a 'cmd' prompt, it buzzes by
>very fast & I can't see all of the output. Is there a way to scroll back
>through the output, or use a pager (like 'script.pl | more'), or is there
>another interface I should bee debugging from?
oh good grief .. your subject was right - this is dumb
let's get the off topic part out of the way first .. you can configure
the NT Command Shell (cmd.exe) from the Control Panel .. the icon is
entitled Console .. amongst other things you can increase the buffer
size enabling you to scroll back through the lines of output
BUT .. you should be debugging CGI scripts in a CGI environment .. type
the following at the command prompt and read all the documents referred
to
perldoc -q "web programming"
and then type
perldoc perldoc
to learn more about this tool
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Fri, 30 Jun 2000 18:23:14 -0800
From: "Ned Konz" <ned@bike-nomad.com>
Subject: Re: Perl NT and pipes
Message-Id: <slqi5itsop313@corp.supernews.com>
In article <8jj8sn$1g4$1@nnrp1.deja.com>, embern@my-deja.com wrote:
> I'm using build 522 of Active State Perl on Windows 2000 (also tried on
> NT and with PerlEx).
>
> I'm trying to open a pipe to a C executable ($Cprog). I'm sending it an
> input string ($inpstring) which consists of a line of text separated by
> tabs. The C program takes the inputstring and calls another program
> with it. The C program works and the input string gets piped from Perl.
>
> open (RESULTS, "$Cprog \"$inpstring\"|");
>
> The problem is that all the tabs get converted to spaces. If there are
> several tabs in a row, there will be only one space.
It's possible that the NT command shell is eating the tabs.
Does your C program get the tabs when you enter them at the command
line or from a batch file?
--
Ned Konz
currently: Stanwood, WA
email: ned@bike-nomad.com
homepage: http://bike-nomad.com, Perl homepage: http://bike-nomad.com/perl
------------------------------
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 3528
**************************************