[10366] in Perl-Users-Digest
Perl-Users Digest, Issue: 3959 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 13 05:07:22 1998
Date: Tue, 13 Oct 98 02:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 13 Oct 1998 Volume: 8 Number: 3959
Today's topics:
Re: Are there any "perl.newbie" group or forum? (Mark-Jason Dominus)
Re: Are there any "perl.newbie" group or forum? <rra@stanford.edu>
Re: Checking file size and date in Perl Win32 (Larry Rosler)
Continuing s/// from the last position. <antti.boman***NOSP@M***helsinki.fi>
Re: Don't kill me <mp@mkt2mkt.com>
Re: inputing two arrays into a sub <erhmiru@erh.ericsson.se>
Is Perl threaded <eeke@inficad.com>
Jiggers! It's Larry <mp@mkt2mkt.com>
Re: Max lines in an Array? <sales@madm.com>
Re: Need to Cut Mem use <sales@madm.com>
Re: Need to Cut Mem use (Sam Holden)
Re: Perl freezes when using special characters in HTML (Ruud Limbeck)
Re: Perl freezes when using special characters in HTML (Ruud Limbeck)
Re: Perl freezes when using special characters in HTML (Ruud Limbeck)
Perl ODBC Installation and then SQL not found (David Griffis)
RE:Are there any "perl.newbie" group or forum? <mp@mkt2mkt.com>
Search Engine `Stop' Words <jerryp.usenet@connected.demon.co.uk>
Re: Search Engine `Stop' Words <ebohlman@netcom.com>
Send vars to script via POST <9435697@ml.petech.ac.za>
Send vars to script via POST <9435697@ml.petech.ac.za>
Send vars to script via POST <9435697@ml.petech.ac.za>
Re: Send vars to script via POST <ebohlman@netcom.com>
Re: sorting hack (Larry Rosler)
Re: Statistics for comp.lang.perl.misc (Bart Lateur)
Re: Still can not get browser to read perl script (Larry Rosler)
unresolved symbol: _dbm_open ronald_f@my-dejanews.com
Re: Win32::NetAdmin usage problem <erhmiru@erh.ericsson.se>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 13 Oct 1998 02:32:38 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <6vus66$o47$1@monet.op.net>
In article <ylww658eup.fsf@windlord.stanford.edu>,
Russ Allbery <rra@stanford.edu> wrote:
>Perl isn't that good of a language to learn how to program in
>(yes, I know some people with strong qualifications disagree with me on
>that score...).
Really? Who disagrees?
I ask because I've never actually seen anyone express that opinion,
and I've often wanted to try it and see what the result was.
------------------------------
Date: 13 Oct 1998 00:02:08 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <yl7ly554i7.fsf@windlord.stanford.edu>
Mark-Jason Dominus <mjd@op.net> writes:
> Russ Allbery <rra@stanford.edu> wrote:
>> Perl isn't that good of a language to learn how to program in (yes, I
>> know some people with strong qualifications disagree with me on that
>> score...).
> Really? Who disagrees?
> I ask because I've never actually seen anyone express that opinion, and
> I've often wanted to try it and see what the result was.
I seem to remember bringing it up before and having at least one person
with a solid background in Perl training disagree with me. But I can't
remember any more specifics than that.
Perl not being a good first language seems practically self-evident to me,
so I'm not sure how well I can argue the point. Of course, I personally
followed the semi-traditional programming learning track of the 80s (BASIC
to Pascal to C to a wide smattering of stuff ranging from LISP to shell to
COBOL, and then finally Perl).
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Mon, 12 Oct 1998 21:58:04 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Checking file size and date in Perl Win32
Message-Id: <MPG.108c7db4163ffff59898b3@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <3622C31F.3938A7E5@ix.netcom.com> on Mon, 12 Oct 1998 23:04:00
-0400, Lyubov Ignatovsky <mikei@ix.netcom.com> says...
> On Win32 use modification time for the file date, the others (access, creation)
> don't work.
> Lyubov
"Wouldn't It Be Nice If" people would check their assertions, before
posting them for thousands of people to be misled by. All it takes to
find out what works is this:
#!/usr/local/bin/perl -w
print -A $0, ' ', -C $0, ' ', -M $0, "\n";
__END__
And guess what -- it all works! And even better than on Unix, because
the -C gives the creation date as advertised, not the inode-change date.
(No inodes, you know.)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 13 Oct 1998 10:07:48 +0200
From: "Antti Boman" <antti.boman***NOSP@M***helsinki.fi>
Subject: Continuing s/// from the last position.
Message-Id: <6vuu5o$4f1$1@hiisi.inet.fi>
I've been trying to find a solution, and couldn't. Forgive me if I've been
blind.
I have a huge file that needs replacing strings, one by one, from the start
to the bottom. If I replace a pattern, how can I replace another one
continuing from the end position where that first pattern was found? I know
the variable $4, but it's a read-only value (a copy or a reference). pos()
seems to work for searches only.
-a
------------------------------
Date: Mon, 12 Oct 1998 22:22:39 -0800
From: madame philosophe <mp@mkt2mkt.com>
Subject: Re: Don't kill me
Message-Id: <3622F17A.6BA777DA@mkt2mkt.com>
This was sent to discussion only...
Is this OK???
PS I have also set my browser to wrap at 60 chars. Is this working?
Randal Schwartz wrote:
>
> >>>>> "madame" == madame philosophe <mp@mkt2mkt.com> writes:
>
> madame> As I wrote Randal directly,
>
> and oddly enough, marked the *NEWS* but not the *MAIL*!
>
> Ugh. Please learn NOT to send mail that is also posted unless
> the MAIL is marked that it is also POSTED.
>
> <sigh>
--
-madame philosophe
"I am not a troll!"
- famous last words before the
guillotine of comp.lang.perl.misc
She's here to save the world from herself...
------------------------------
Date: 13 Oct 1998 09:53:33 +0200
From: Michal Rutka <erhmiru@erh.ericsson.se>
To: avitala@macs.biu.ac.il
Subject: Re: inputing two arrays into a sub
Message-Id: <lag1cs6goy.fsf@erh.ericsson.se>
dblack@pilot.njin.net (David Alan Black) writes:
> >my problem is how to input two arrays into a sub, such that the sub can
> >distinguish one from the other.
> >of course, if i use: foo(@a,@b)
> >then @_ is equal to the concatenation of @a and @b, and that ain't much use.
>
> Pass references to the arrays:
>
> sub asub {
> my ($a1, $a2) = @_;
> # now make a copy of the arrays' contents, or manipuate directly
> }
>
> &asub(\@arr1, \@arr2);
Or you can prototype the sub like in the code below:
sub two_arr(\@\@){
my ($a1, $a2) = @_;
print "First array is: ",@{$a1},"\n",
"Second array is: ",@{$a2},"\n";
}
@a1 = (1,2,3);
@a2 = ('a','b','c');
two_arr(@a1,@a2);
which when run will produce:
First array is: 123
Second array is: abc
Michal,
------------------------------
Date: Mon, 12 Oct 1998 22:18:48 +0000
From: Eeke <eeke@inficad.com>
Subject: Is Perl threaded
Message-Id: <36228048.5EE@inficad.com>
I am using ActiveState's Perl for Win32, with Microsoft's IIS webserver,
and connecting to various databases via ODBC. I have gotten some
impressive performance all things considered, but am considering
"upgrading" to using perlEx (also from ActiveState). I am tring to
thresh out the pro's and con's of regular 'ol perl vs. perlEx. Is perl
threaded, e.g. if two simultaneous calls come in for similar perl
programs that require database connectivity, is one blocked before the
other can begin ? How about perlEx ? I have been under the impression
that good ODBC drivers are multi-threaded, but I imagine that if I use
perlEx's BEGIN and END blocks, I will defeat that. Any suggestions or
comments would be greatly appreciated.
Thanks !
-- Sherman
eeke@inficad.com
------------------------------
Date: Mon, 12 Oct 1998 23:05:56 -0800
From: madame philosophe <mp@mkt2mkt.com>
Subject: Jiggers! It's Larry
Message-Id: <3622FB9B.5E86DBFD@mkt2mkt.com>
Hi,
FYI
Rumor has it that Larry Wall is featured at the Salon Site
http://www.salonmagazine.com
I also happened to see another interview of Larry at a new web development
site called
http://www.devhead.com
I just glossed over it... I'll read it later tonight.
It's a ZDNet site, however the interview was somewhat technical (read NOT FLUFFY)
and he gives some good insights for the future of Perl and what's coming with 5.005
pause...pause
But then all of you probably know this already!!!
------
madame philosophe
"I am not a troll!"
- Famous last words before the
guillotine of comp.lang.perl.misc
--She's here to save the world from herself...
------------------------------
Date: Mon, 12 Oct 1998 22:30:22 -0700
From: "Doyle Johnson" <sales@madm.com>
Subject: Re: Max lines in an Array?
Message-Id: <6vupem$kd9$1@nnrp03.primenet.com>
Mark-Jason Dominus wrote in message <6vuakb$lc8$1@monet.op.net>...
>In article <6vu4o4$egq$1@nnrp03.primenet.com>,
>Doyle Johnson <sales@madm.com> wrote:
>> Is there a limit to the number of lines you can stuff into an array?
>
>No, unless you run out of memory.
Ok thats where I guess I lose it..... there must be a certain amount of
overhead to each line.... my testing has produced the following:
File A 12,000 lines 1.7 megs total size runs
File B 16,000 lines 1.3 megs total size gags
The fact that the length of the lines in file B didnt seem to matter nor did
the file size. It seemed to be more of a number of lines before "out of mem"
error.
Now Im no expert but this would suggest that Perl is using twice the mem for
an array than the actual data contained in it. There must be a work around
in Perl to use an array or some other grouped list to sort data.
There must be someone on this list that has been through this and knows how
to get around it. I guess I just have to get lucky enough for them to see
this thread and give me a hand...:)
Thanks again
D.Johnson
------------------------------
Date: Mon, 12 Oct 1998 22:38:45 -0700
From: "Doyle Johnson" <sales@madm.com>
Subject: Re: Need to Cut Mem use
Message-Id: <6vupud$ki5$1@nnrp03.primenet.com>
>
>> As you can see I used the file read method to save some mem usage
>
>I've never heard of "the file read method".
>
>> foreach $visits (<LOG>)
Hahah well I used that for lack of a better term... in other words reading
in the file and working with it then closing it:
Open(FILE,<$file")
uses less memory than
open(FILE,"<$file")
@LIST = <FILE>;
It is way slower but uses less mem. The array seems to use up an inexcusable
amount of mem.
>
>Oops; you've just read in the entire file. Try this instead:
>
> while (defined($visits = <LOG>))
>
Thanks let me give that a try... if it will read through each line that
may free up the mem I need to get the full 20,000 entries.
------------------------------
Date: 13 Oct 1998 07:40:36 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Need to Cut Mem use
Message-Id: <slrn7260vk.mtn.sholden@pgrad.cs.usyd.edu.au>
On Mon, 12 Oct 1998 16:53:52 -0700, Doyle Johnson <sales@madm.com> wrote:
>Below is a snip of the code... further investigation seems to show a problem
>with the neumber of lines in the file more than the physical size.... Is
>there a max number of lines for an array? If so is it possible to alter
>this?
>
> This is a standard html log parsing script found all over the web that I
>modified to except a larger log file. As you can see I used the file read
>method to save some mem usage to read in the initial data. I have managed
>to double the amount of entries this script will allow but it is still way
>short of my needs.
>
><START>
>sub split_data
> {
> open(LOG, "<$log_file") || &error();
> &lockS(LOG);
> foreach $visits (<LOG>)
This reads the whole file into memory... this is bad if you don't need it
all in memory (unless you know the file is short)...
try replacing the foreach line with :
while(defined($visits = <LOG>)) # note untested from memory code...
And memory shouldn't be as much of a problem...
>This code will only handle aprox 15,000 entries before it gags.... I need to
>find a way to squeeze out 20,000 entries.
Don't slurp the whole file into memory for no apparent reason...
--
Sam
People get annoyed when you try to debug them.
--Larry Wall
------------------------------
Date: Tue, 13 Oct 1998 06:59:09 GMT
From: ruud.limbeck@tip.nl (Ruud Limbeck)
Subject: Re: Perl freezes when using special characters in HTML
Message-Id: <3622f909.5719210@news.NL.net>
On Mon, 12 Oct 1998 11:15:16 -0500, tadmc@flash.net (Tad McClellan)
wrote:
> 1) You read stuff into $form_info, and then never use it.
>
> Why even include those two lines of code?
You are right. Per accident I pasted an older version in the message.
This should be added on line three:
$ENV{'BX'}=$form_info;
I want to let pro98.exe know what variables are entered in the
html-form. pro98.exe can read the environment-variable call 'BX'
>From this moment on pro98 is in charge for creating and filling the
111.wrk
------------------------------
Date: Tue, 13 Oct 1998 07:18:21 GMT
From: ruud.limbeck@tip.nl (Ruud Limbeck)
Subject: Re: Perl freezes when using special characters in HTML
Message-Id: <3622fa43.6033280@news.NL.net>
On 12 Oct 1998 19:55:53 GMT, scott@softbase.com wrote:
>Ruud Limbeck (ruud.limbeck@tip.nl) wrote:
>> system ('pro98.exe 111.bbx');
>> ...
>> open(wrk, "111.wrk");
>
>Are you sure:
>
> 1. Pro908.exe has *finished*
Personaly I think it even has not been started at all. As soon as
there is a %-sign in the html-code, perl hangs when pressing the
submit-button. The 'blank screen' comes instantly. No waiting for the
pto98.exe to finish.
>
> 2. Are you sure it's crashing on a %, and not an EOF character?
Yes, If I change it into something else it works.
> Does pro98 produce binary output?
No. Only html-code
>
> 3. Have you considered checking the return code of the open
> and read commands, and printing the $! error message?
Yes, but again, the pro98.exe is even not started.
>
> 4. And, if you're using IIS or PWS as your web server, I have
> *NEVER* gotten system to work well. THe spawned processes
> either do nothing or lock up. There's something
> weird in the I/O redirection.
Hmmm. thanks for this..... I'm glad I have it running so far.... Can
you tell me what you use on NT?
PS: Thanks for your answers
Ruud Limbeck
------------------------------
Date: Tue, 13 Oct 1998 07:26:27 GMT
From: ruud.limbeck@tip.nl (Ruud Limbeck)
Subject: Re: Perl freezes when using special characters in HTML
Message-Id: <3622fedb.7208671@news.NL.net>
On 12 Oct 1998 23:53:06 GMT, sholden@pgrad.cs.usyd.edu.au (Sam Holden)
wrote:
>Then again if you like using system() so much why don't you just write your code
>like this :
>$|=1;
># since you never use $form_info I won't bother reading it in...
You are right. There should be one line extra in the code:
Line three should be:
$ENV{'BX'}=$form_info;
This way I want pro98.exe to use the environment variable BX
containing all the form variables.
>Why is the variable called $html when the output is 'text/plain'???
I changed in into 'text/html' but there is no difference.
>Why don't you try running the program at the command line and seeing what goes
>wrong???
As I mentioned earlier. The program is running very fine if there is
no %-sign in the html-code in the browser window. As soon as I press
the submit-button this html-form has to be read in into perl.
Depending on wether there is a %-sign in the code or not, perl
freezes. If I change the %-sign into something else, it works.
PS: I use a 'post'-command in the form. Not a 'get'.
>
>--
>Sam
>
>Can you sum up plan 9 in layman's terms? It does everything Unix does
>only less reliably.
> --Ken Thompson
------------------------------
Date: Tue, 13 Oct 1998 00:15:57 GMT
From: david_griffis@northgrum.com (David Griffis)
Subject: Perl ODBC Installation and then SQL not found
Message-Id: <36229b53.1110767@news.northgrum.com>
I installed perl and it works fine.
Then I installed Roth's ODBC extension.
I keep getting SQL not found when I use the samples.
Anyone know the scoop?
Merci!
David Griffis
------------------------------
Date: Mon, 12 Oct 1998 22:18:11 -0800
From: madame philosophe <mp@mkt2mkt.com>
Subject: RE:Are there any "perl.newbie" group or forum?
Message-Id: <3622F06E.F30B42EF@mkt2mkt.com>
> Perl can be a hideous death-trap to the unwary, the unskilled, or the
> inexperienced. It can also be a thing of beauty.
>
> James
I would prefer to be a thing of beauty!!!
or rather $beauty->param('madame');
--
-madame philosophe
"I am not a troll!"
- famous last words before the guillotine of comp.lang.perl.misc
She's here to save the world from herself...
------------------------------
Date: Tue, 13 Oct 1998 06:21:57 +0100
From: Jerry Pank <jerryp.usenet@connected.demon.co.uk>
Subject: Search Engine `Stop' Words
Message-Id: <NodI+LA1NuI2EwjG@connected.demon.co.uk>
I am in the middle of writing a search engine and am currently having
great fun optimising the code. Cheering and whooping as those micro-
seconds get whittled away. Benchmark Is my friend!
I'm now at the `stop' word stage. [words the engine will ignore]
Knowing for certain that many of you have been through this hoop before
& rather than go wheel-inventing, I wonder if anyone has any sage advice
to offer or even a recommended list of `stop' words?
I guess the most efficient method of word `elimination' would be a hash.
What is more efficient, a tied hash or one constructed `on the fly'
using __DATA__ and would this change depending on size of the data?
## Should really be in the Perl in Business thread I guess, anyway...##
Do do any of the major search engines use Perl in a big way. I'm sure
that would impress the PHT's and would be a valid inclusion to Johns
page. Maybe sendmail should be there as an example as well?
Jerry
-- Jerry Pank mailto:jerryp.usenet@netconnected.com
Not that I have anything much against redundancy. But I said that already.
-- Larry Wall in <199702271735.JAA04048@wall.org>
------------------------------
Date: Tue, 13 Oct 1998 08:25:50 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Search Engine `Stop' Words
Message-Id: <ebohlmanF0rBF2.722@netcom.com>
Jerry Pank <jerryp.usenet@connected.demon.co.uk> wrote:
: I'm now at the `stop' word stage. [words the engine will ignore]
: Knowing for certain that many of you have been through this hoop before
: & rather than go wheel-inventing, I wonder if anyone has any sage advice
: to offer or even a recommended list of `stop' words?
Is this for a fairly static class of documents, or a rapidly-changing
one? Is it only for documents under your control (such as documents on
your Web site)? If it's fairly static and controlled, I'd build the list
empirically: write a simple script to count the number of documents each
word appears in, run it once (or whenever the collection changes) and
take all words that appear in more than N% of the documents as stop words.
If your collection is dynamic, and you index storage format allows easy
deletion of entries, you might just index everything and then delete
entries that appear in more than N% of the documents.
: I guess the most efficient method of word `elimination' would be a hash.
: What is more efficient, a tied hash or one constructed `on the fly'
: using __DATA__ and would this change depending on size of the data?
Depends on what you mean by "efficient." Under normal circumstances, the
time spent loading the stop list will be a negligible part of the total
time spent indexing the documents, so speed isn't going to be important.
Maintainability will be, and that strongly favors keeping the stop list
in an external file rather than as part of the script.
------------------------------
Date: Tue, 13 Oct 1998 09:51:16 +0200
From: William Krige <9435697@ml.petech.ac.za>
Subject: Send vars to script via POST
Message-Id: <36230674.FD57C27C@ml.petech.ac.za>
Hi
I am trying to send a couple of variables (name, address, telno) to a
cgi script on another server. I have a form which does this at the
moment, but I would like to send the variables to the other script on
the server (http://www.somewhere.com) from a PERL script instead of
using the HTML form
Does anyone possibly have the code to do this.
Thanks
William
9435697@ml.petech.ac.za
------------------------------
Date: Tue, 13 Oct 1998 09:56:34 +0200
From: William Krige <9435697@ml.petech.ac.za>
Subject: Send vars to script via POST
Message-Id: <362307B1.8EC22CD3@ml.petech.ac.za>
Hi
I am trying to send a couple of variables (name, address, telno) to a
cgi script on another server. I have a form which does this at the
moment, but I would like to send the variables to the other script on
the server (http://www.somewhere.com) from a PERL script instead of
using the HTML form
Does anyone possibly have the code to do this.
Thanks
William
9435697@ml.petech.ac.za
------------------------------
Date: Tue, 13 Oct 1998 09:59:19 +0200
From: William Krige <9435697@ml.petech.ac.za>
Subject: Send vars to script via POST
Message-Id: <36230857.417489D4@ml.petech.ac.za>
Hi
I am trying to send a couple of variables (name, address, telno) to a
cgi script on another server. I have a form which does this at the
moment, but I would like to send the variables to the other script on
the server (http://www.somewhere.com) from a PERL script instead of
using the HTML form
Does anyone possibly have the code to do this.
Thanks
William
9435697@ml.petech.ac.za
------------------------------
Date: Tue, 13 Oct 1998 08:29:54 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Send vars to script via POST
Message-Id: <ebohlmanF0rBLu.76B@netcom.com>
William Krige <9435697@ml.petech.ac.za> wrote:
: I am trying to send a couple of variables (name, address, telno) to a
: cgi script on another server. I have a form which does this at the
: moment, but I would like to send the variables to the other script on
: the server (http://www.somewhere.com) from a PERL script instead of
: using the HTML form
The LWP module (available from CPAN if you don't have it already
installed) will let you do this.
BTW, you posted this request three times. Only one was necessary.
------------------------------
Date: Mon, 12 Oct 1998 22:30:00 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: sorting hack
Message-Id: <MPG.108c85329526bf2e9898b4@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <6vufoc$9bm$1@nntp2.ba.best.com> on Mon, 12 Oct 1998 20:09:14
+0000, Xah <xah@best.com> says...
> At 12:39 AM -0000 1998.10.12, Larry Rosler wrote:
> >(This is a classical Schwartz Transform. See perlfaq4: "How do I sort
> >an array by (anything)?" for details. You'll be surprised at how fast it
> >will run.)
...
> Note that the given solution will fail when the number of digits in the
> index exceed a prescribed size. (in the given case, 9) (yes, they are all
> non-negative integers.)
Considering that the largest value in your sample data was 2, it was hard
for John Porter or me to conceive that you wanted to deal with integer
strings of arbitrary length. My solution, with "sprintf '%.9d'" changed
to "sprintf '%.10d'", or (better) John's solution (pack 'N*') , works for
all non-negative integers < 2 ** 32.
> I wanted 100% correct implementations. I wonder if it is still faster if we
> first check what is the largest number of digits and the longest length of
> index in the input, and use these two values to convert the indexes into
> strings all of the same length, and sort these strings as the basis of the
> sort desired. I think this would be the best solution in terms of time
> complexity and also being practical.
You are wrong. It is necessary to convert each of the value strings to
the same length by left-padding with zeros or spaces. But it is *not*
necessary to convert all the comparison strings to the same length. This
is because a shorter string always compares smaller than a longer string
that starts with the same initial substring. (Think of the nonexistent
byte after the end of the shorter string as having the null value "\0",
which compares smaller than any character in the longer string.)
' 0'
' 0 0'
' 0 1'
' 1'
etc.
So just replace my sprintf format by "%${x}s" where $x is the length of
your longest value, and all will work as advertised.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 13 Oct 1998 09:02:45 GMT
From: bart.mediamind@ping.be (Bart Lateur)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <362410de.2631017@news.ping.be>
Martien Verbruggen wrote:
>> An interesting statistic would be the number of off-topic (= not
>> immediately Perl related) posts. Unfortunately, that's something that
>> cannot easily be automated...
>
>You can find these in the post entitled 'New posters to
>comp.lang.perl.misc'.
Not so. I recently found that some long time posters are more guilty of
this kind of behaviour. For examples, looks at the recent "Many Jars
Mystery", or the thread on how to get rid of your neighbours using Perl.
The difference is: long time posters don't get sneared at for doing it.
Bart.
------------------------------
Date: Mon, 12 Oct 1998 22:42:53 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Still can not get browser to read perl script
Message-Id: <MPG.108c883cc83f189898b5@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <6vug4o$jk0@newsops.execpc.com> on Mon, 12 Oct 1998 22:18:07 -
0500, Deva Seetharam <psdspss@execpc.com> says...
> The problem might be buffering by perl. So the Content-type info may not be
> reaching the server before the other lines.
> Turn off the buffering by adding this line
> $| = 1;
That is a silly statement. Data written to a stream always appears
sequentially, whether the file is buffered or not. If it were otherwise,
farewell determinism!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 13 Oct 1998 07:30:49 GMT
From: ronald_f@my-dejanews.com
Subject: unresolved symbol: _dbm_open
Message-Id: <6vuvj9$r2c$1@nnrp1.dejanews.com>
Hi!
I'm installing Perl 5.004 under HP-UX 10.01. Following the instructions
in the HPUX.install file, everything works fine, except that, upon doing
make test
one of the tests fails:
lib/odbm ... /usr/lib/dld.sl
Unresolved symbol: _dbm_open from /usr/lib/libdbm.1
I verified, that the libdbm* libraries indeed refer to (but not define) a
_dbm_open. They definie dbmopen and __dbm_open (i.e. 2 leading underscores)
though.
Did someone already experience this problem? Where should _dbm_open be
defined?
Ronald
--
Ronald Fischer <ronald_f@my-dejanews.com>
http://ourworld.compuserve.com/homepages/ronald_fischer/
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 13 Oct 1998 09:58:10 +0200
From: Michal Rutka <erhmiru@erh.ericsson.se>
To: atgyatkinson@ybs.co.uk
Subject: Re: Win32::NetAdmin usage problem
Message-Id: <lad87w6gh9.fsf@erh.ericsson.se>
gya@my-dejanews.com writes:
> I have installed the ActiveState Perl release ( Build 316 ) on my NT4 P.C.I
This is rather an oldie. Currently is the build 502 available. I had also
some problems with the 316 build. Mostly with Socket routines. Therefore,
I advise you to upgrade first.
Michal.
<cut>
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3959
**************************************