[10339] in Perl-Users-Digest
Perl-Users Digest, Issue: 3932 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 8 20:07:58 1998
Date: Thu, 8 Oct 98 17:00:18 -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 Thu, 8 Oct 1998 Volume: 8 Number: 3932
Today's topics:
Re: [OT] London.pm (was "Many Jars" Mystery) <gellyfish@btinternet.com>
Re: A small favor with .dat files. (Alastair)
Re: Are there any "perl.newbie" group or forum? (Ronald J Kimball)
Re: Auto Reply via E-mail <gellyfish@btinternet.com>
Re: Capturing command output in Perl ceevee@my-dejanews.com
Re: CGI perl book <matt@whiterabbit.co.uk>
Re: Difficulty with HTML & Perl & CGI (Craig Berry)
Re: Difficulty with HTML & Perl & CGI <baliga@synopsys.com>
Re: Difficulty with HTML & Perl & CGI <rootbeer@teleport.com>
Re: format question <gellyfish@btinternet.com>
Re: ftp within a perl program <gellyfish@btinternet.com>
Re: Getting the last date modified <ludlow@us.ibm.com>
Re: I have installed Linux. Now what? (me)
Re: I/O problem (Alastair)
Re: Need help refining this (Ronald J Kimball)
Net::Whois for new Internic output? neal@make-a-store.com
Re: pattern matching (Alastair)
Re: PERL, C++ Software Test Engineer-Chandler, AZ (Craig Berry)
Re: PERL, C++ Software Test Engineer-Chandler, AZ (Ronald J Kimball)
Re: Please help me!! Connecting to Oracle (Alastair)
Re: print bug/feature? (Larry Rosler)
Re: select (Alastair)
Size limitations of MLDBM ? (Kevin Sheely)
Why it doesn't work under UNIX?????? <flanker@sonnet.ru>
Re: Why it doesn't work under UNIX?????? <rootbeer@teleport.com>
Re: Why it doesn't work under UNIX?????? (Alastair)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 8 Oct 1998 21:20:32 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: [OT] London.pm (was "Many Jars" Mystery)
Message-Id: <6vj6qg$fu$1@gellyfish.btinternet.com>
On Thu, 08 Oct 1998 16:22:17 +0100 Kiril <work@despam.idea.co.uk> wrote:
> dave@mag-sol.com wrote:
>> The Cittie of Yorke on High Holborn. Sam Smiths Old Brewery Bitter at #1.50 a
>> pint.
>>
>> London.pm meetings are on the first Thursday of the month and have so far all
>> been held at the same pub. All visiting Perl Mongers will be made very welcome
>> (ask Chris Masto).
>>
>> Dave...
> I knew something good will come out of reading this newsgroup :-))))))
> I work across from it..... Every first Thursday did you say ?
> How does one recognise london.pm ? By the badges or by the
> conversation topics ?
>
Neither really, I figured it out by deduction - I will however be wearing a
tie the description of which will be posted on the mailing list on the
morning of that day. Dave & I will be wearing suits and everyone else will
be wearing whatever it is they care to wear.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Thu, 08 Oct 1998 23:36:34 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: A small favor with .dat files.
Message-Id: <slrn71qms2.80.alastair@calliope.demon.co.uk>
Brian Owen <BOwen@PrioritySearch.Com> wrote:
>I want to know why the changes do not take affect... This is the
>information in the original .dat file, but when I add the second line it is
>not recognized. I did not write the original script used to call this data,
>but need to know what needs to be done to adjust the data in this file. I
>need to be able to add/remove people from this list at ease. There is also
What you need to do is specify a better question.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Thu, 8 Oct 1998 19:38:25 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <1dglhdk.n3mxjekkjhc0N@bay1-365.quincy.ziplink.net>
Craig Berry <cberry@cinenet.net> wrote:
> And so (nearly) was Randal. I believe the original line, spoken by Lord
> Dark Helmet, was "I see your schwartz is as big as mine...but do you know
> how to use it?" :)
Hey, look, we're getting closer to the actual quote with every message!
"I see your schwartz is as big as mine. Now let's see how well you
*handle* it."
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 8 Oct 1998 21:56:15 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Auto Reply via E-mail
Message-Id: <6vj8tf$go$1@gellyfish.btinternet.com>
On Wed, 7 Oct 1998 23:29:31 -0400 Tony <aldisfu@i-2000.com> wrote:
> Hi,
>
> How could I do an auto-reply via e-mail.
>
> Why couldn't I use open(mail,"| telnet ppp.com 25");
> What should I do if I wanted to do that?
>
Why would you want to do that ?
You can do:
open(MAIL,"|/usr/lib/sendmail -t") || die "Cant do sendmail";
you could also read perlfaq9
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Thu, 08 Oct 1998 22:20:50 GMT
From: ceevee@my-dejanews.com
Subject: Re: Capturing command output in Perl
Message-Id: <6vjds2$358$1@nnrp1.dejanews.com>
If I understand your question right, you could say .
$output = `ping`;(not the backticks)
the above variable should capture the output from ping command.
In article <6vg2u7$uu1$1@imsp009a.netvigator.com>,
"wkchiu" <wkchiu@yahoo.com> wrote:
> I am writing a perl script in NT which runs the PING.EXE command to check a
> node (using system() or win32::create() ??) and examine the reply of
> PING.EXE to see whether the node is alive or dead. My question is how can I
> capture the output of PING.EXE in perl script to carry out the processing ?
>
> wkchiu.
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 08 Oct 1998 23:30:57 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
To: nguyen.van@imvi.bls.com
Subject: Re: CGI perl book
Message-Id: <361D3D21.AF03C117@whiterabbit.co.uk>
When I was learning, I used CGI Programing on the world wide web by
Shishir Gundavaram (published by O'Reilly Asscts - ISBN 1-56592-168-2).
Great resource for learning and for reference.
Matt
--
nguyen.van@imvi.bls.com wrote:
>
> Hi guys,
>
> I want to know which book is the excellent one for Perl CGI. I want to buy one
> so that I can write CGI scripts.
>
> Thanks
> Van
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
Matt's daily comic strip
Porridge and Fartcakes
http://www.whiterabbit.co.uk/cartoons
------------------------------
Date: 8 Oct 1998 22:19:45 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Difficulty with HTML & Perl & CGI
Message-Id: <6vjdq1$5at$3@marina.cinenet.net>
madame philosophe (mp@mkt2mkt.com) wrote:
: NOTE: I think if you are creating a new CGI object you want to write:
:
: use CGI;
:
: rather than
:
: use CGI qw( :standard);
Hmm: > perl -e 'use CGI qw(:standard); new CGI' ''
>
Seems to work fine. Isn't it better to try it rather than making
inaccurate assertions?
: also you can print out with commas after each html shortcut which means
: this:
[snip]
:
: print $query->header(), $query->start_html(-title=>'No Title',
: -bgcolor=>'white'), $query->h4({-align=>'center'}, "Testing 4..."),
: $query->end_html;
:
: is the same as the first entry.
Though I might omit unneeded parens and improve formatting, just to make
reading and maintaining the code a bit easier:
print $query->header,
$query->start_html(-title => 'No Title',
-bgcolor => 'white'),
$query->h4({-align => 'center'}, 'Testing 4...'),
$query->end_html;
Also, unrelated to Perl, you might reconsider using color name strings
rather than hex constants. They do scary things on older browsers.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Thu, 08 Oct 1998 16:14:58 -0700
From: Yogish Baliga <baliga@synopsys.com>
To: "John A. Miller" <patheon@ns.net>
Subject: Re: Difficulty with HTML & Perl & CGI
Message-Id: <361D4772.FD75C010@synopsys.com>
The HTML page sent to the web-browser by CGI program should have a header
Content type: <type>\n\n
If it is not present, the browser will end up in saying Document Contains No
Data...
I think the header method of CGI require some input like the content type
i.e., text/html etc.
-- Baliga
John A. Miller wrote:
> Greetings:
>
> I have written several HTML pages using Perl. But I have had to spell
> everytkhing out. I would like to be able to use some of the short cuts
> like query->header() but I can't figure out how to do it correctly. (I
> am using Omni HTTPD v2.0 as my web server on an NT machine)
>
> I have been having a lot of trouble trying to get the following to work:
>
> ---------------------------------- Begin
> Script----------------------------------
> #!/usr/bin/perl
>
> use CGI qw(:standard);
> use CGI::Carp qw(fatalsToBrowser);
> $query = new CGI;
> print $query->header();
> print $query->start_html(-TITLE=>'No Title',-BGCOLOR=>'white');
> print "<H4><CENTER>Testing 4...</CENTER></H4>";
> print $query->end_html;
> ---------------------------------- End
> Script----------------------------------
>
> It gives me the infamous "Document Contains No Data" error. I can
> however write the same thing by spelling everything out and the page
> works. I have used this successfully:
> ---------------------------------- Begin
> Script----------------------------------
> #!/usr/bin/perl
>
> print "Content-type: text/HTML\n\n";
> print "<HTML> ";
> print "<HEAD> ";
> print "<TITLE></TITLE>";
> print "</HEAD> ";
> print "<BODY> ";
> print "<H1>Testing 1...</H1>";
> print "</BODY>";
> print "</HTML>";
> ---------------------------------- End
> Script----------------------------------
>
> If I comment out the first two lines...
> ##use CGI qw(:standard);
> ##use CGI::Carp qw(fatalsToBrowser);
>
> I get no errors. But it also doesn't write anything. What am I doing
> wrong?
>
> Thanks,
> John
> patheon@ns.net
------------------------------
Date: Thu, 08 Oct 1998 23:35:48 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Difficulty with HTML & Perl & CGI
Message-Id: <Pine.GSO.4.02A.9810081628000.4710-100000@user2.teleport.com>
On Thu, 8 Oct 1998, Yogish Baliga wrote:
> The HTML page sent to the web-browser by CGI program should have a
> header Content type: <type>\n\n
That's not what that header should look like. The docs, FAQs, and
newsgroups abour CGI programming should be able to help you find you what
it should be like.
> If it is not present, the browser will end up in saying Document
> Contains No Data...
I'm agnostic about that: I've never seen that result from that cause, and
I don't think that you have either. But the behavior of a browser or
server is irrelevant here; this is a newsgroup about Perl, not about
servers and browsers.
> I think the header method of CGI require some input like the content
> type i.e., text/html etc.
The docs for the CGI module tell another story.
It's good that you're trying to be helpful, but your posting is likely to
cause more confusion than help. Please check the facts before posting
again. Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 8 Oct 1998 21:45:48 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: format question
Message-Id: <6vj89t$gk$1@gellyfish.btinternet.com>
On Wed, 07 Oct 1998 11:21:39 -0700 Jaime Diaz <jamdiaz@klaskycsupo.com> wrote:
> trying to add formatting capabilities to the format commanad...
>
>
> right now for testing i have outputted 'df -k ' command in unix to a
> file...
>
Hang on a second here. I answered this self same question from you om
the 28 September. I neednt test my memory on this matter because I still
have the original post on my system. OK this is a busy group so you might
have missed it - but a quick search on Dejanews will throw this up:
Path: neptunium.btinternet.com!not-for-mail
From: Jonathan Stowe <gellyfish@btinternet.com>
Newsgroups: comp.lang.perl.misc
Subject: Re: format help
Date: 28 Sep 1998 21:28:42 -0000
Organization: Gellyfish software
Lines: 83
Message-ID: <6uov2a$13v$1@gellyfish.btinternet.com>
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 8 Oct 1998 23:52:42 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: ftp within a perl program
Message-Id: <6vjfnq$h6$1@gellyfish.btinternet.com>
On Wed, 07 Oct 1998 02:50:23 GMT jbachofner <jbach@teleport.com> wrote:
> Anyone know how to ftp files from with in a perl script? I need to get
> files from a UNIX box daily and save them on a NT machine.
>
One Perl : The Net::FTP module available with libnet.
One Not Perl : Install Samba on the unix system and use copy.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Thu, 08 Oct 1998 16:55:23 -0500
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: Getting the last date modified
Message-Id: <361D34CB.D0DF86CD@us.ibm.com>
Brandon Lin wrote:
>
> I'm a novice to perl. Can anyone please tell me how to get
> the last date modified of a file using perl?
The FAQ is your friend...
http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html#How_do_I_get_a_file_s_timestamp_
The documentation that comes with Perl is good reading too.
--
James Ludlow (ludlow@us.ibm.com)
Disclaimer: This isn't technical support, and all opinions are my own.
------------------------------
Date: Thu, 8 Oct 1998 23:36:31 GMT
From: jsoohoo@netcom.com (me)
Subject: Re: I have installed Linux. Now what?
Message-Id: <jsoohooF0J88v.5HM@netcom.com>
In article <3614EA91.40E9@spacely.com> George Jetson <gjetson@spacely.com> writes:
>Dan Bialek wrote:
>>
>> Dear Clever Linux People,
>>
>> I have installed Red Hat onto my PC, and now I am unable to get it do
>> anything useful. How do I use
>> the various editors, so that I can write basic Perl programs from my new
>> example book and run them?
>> I am at complete loss. I fired up the emacs in X windows, but I really
>> have no idea what I am doing. I apologize for my ignorance, but if
>> anyone can shine flashlight of help this way, I would be ever thankful.
>> Please respond via email.
>
>At the risk of starting an editor war, I would suggest that you look
>around for an editor called nedit. If you can find a binary package of
>it, instead of compiling it yourself, I think you would like it much
>better.
>
>(To those who might respond "Wrong! nedit uses Motif, and Motif is
>commercial." I will respond, "True, but you can use LessTif 0.85 or
>greater. Works fine for me.")
>
>nedit is very much like Windows text editors. While many people would
>consider that a drawback, I suspect you are coming to the Linux world
>from Windows 95, and you would find this user interface to be more like
>what you are used to.
>
Choose any editor. It can be vi, emacs, nedit... You are going to have
to go thru the manual or have someone show you the basic commands. Chances
are whatever editor you choose will be the one you will use for the rest
of your life... unless of course you choose something like ed, sed, or
cat :)
------------------------------
Date: Thu, 08 Oct 1998 23:33:53 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: I/O problem
Message-Id: <slrn71qmn1.80.alastair@calliope.demon.co.uk>
Gil Brown <gil_brown@hp.com> wrote:
>Hi;
>
>I am looking for a way to do direct I/O (not buffered) I know there is a way
>to specify that but I can't remember it.
At the risk of opening myself to ridicule ... perhaps you're just after the $|
method i.e. $| = 1;
>Thanks a lot
You're welcome.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Thu, 8 Oct 1998 19:38:29 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Need help refining this
Message-Id: <1dgli4a.ogz02dbx5tzfN@bay1-365.quincy.ziplink.net>
<baillie@my-dejanews.com> wrote:
> $to_store=~tr/[a-z A-Z:]//d;
Do you really want to delete the square brackets from $to_store? The
first argument to tr/// is not a regular expression.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Thu, 08 Oct 1998 22:29:23 GMT
From: neal@make-a-store.com
Subject: Net::Whois for new Internic output?
Message-Id: <6vjec3$3n3$1@nnrp1.dejanews.com>
The internic recently (I think) changed their whois output. Has anyone updated
the Net::Whois module?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 08 Oct 1998 23:38:10 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: pattern matching
Message-Id: <slrn71qmv2.80.alastair@calliope.demon.co.uk>
thayner@taxcut.com <thayner@taxcut.com> wrote:
>I have two groups of files (one file from each group is supposed to match the
>other) which should contain an identical list of field names. Does anyone
>have code that can do this. Thanks.
>
>Thompson Hayner
Your question is poorly specified. I assume this is why you've recieved no
replies.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: 8 Oct 1998 22:08:44 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: PERL, C++ Software Test Engineer-Chandler, AZ
Message-Id: <6vjd5c$5at$2@marina.cinenet.net>
pramsey@iname.com wrote:
: Says who,
Both the group charter and the actively expressed consensus of the group.
: and since when?
Since the inception of clpm.
: And who appointed you the enforcer?
See my recent post on the nature of an anarchy, and the consequent duty of
each citizen to be police officer, firefighter, trash collector, and so
forth.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Thu, 8 Oct 1998 19:38:31 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: PERL, C++ Software Test Engineer-Chandler, AZ
Message-Id: <1dgli8y.1rh9pubdx0yboN@bay1-365.quincy.ziplink.net>
<pramsey@iname.com> wrote:
> >Ok. Here's a referral. misc.jobs.offers
> >
> >This is not a job posting newsgroup.
>
> Says who, and since when? And who appointed you the enforcer?
Does the title of this newsgroup end with '.jobs'? Nope.
There ya go.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Thu, 08 Oct 1998 23:54:17 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Please help me!! Connecting to Oracle
Message-Id: <slrn71qnt8.80.alastair@calliope.demon.co.uk>
hovi <hovi@mtco.com> wrote:
> I am a new Perl user. I need to get connected to Oracle through
>Perl. I am using Windows 95 and the newest version of Perl. Please
>e-mail me back with help if you could. Thank You.
The prognosis is bad I'm afraid. You should probably have a go yourself and, if
you hit a problem, ask a more specific question.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Thu, 8 Oct 1998 15:49:29 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: print bug/feature?
Message-Id: <MPG.1086e151867625529897fd@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <vuww6a7py3.fsf@otis.arraycomm.com> on Thu, 8 Oct 1998
20:34:44 GMT, Farhad Farzaneh <ff@otis.arraycomm.com> says...
> lr@hpl.hp.com (Larry Rosler) writes:
> > In article <6vivl5$rht@news.dtc.hp.com> on 8 Oct 1998 18:18:13 GMT,
> > (Gordon Wilson) <gw@dtc.hp.com> says...
> > > The following:
> > > printf"%1.0f %1.0f %1d %1d\n",9.5,10.5,9.5,10.5;
> > >
> > > prints:
> > > 10 10 9 10
...
> I think the point was that both 9.5 and 10.5 are being rounded to 10. It
> should be either
>
> 9 10 9 10
>
> or
>
> 10 11 9 10
Ah. I missed that point. This is in fact not a Perl question, as was
determined by testing it using C also.
The answer lies in the IEEE 754 standard. I can't find it on the Web
(copyrighted material?) and I can't locate my copy, so I'll have to wing
it.
To avoid upward bias in always rounding to the next higher value a number
whose value is "exactly" 0.5 in the position to be rounded, the
implementation is expected to do such rounding upward or downward "at
random". In practice, the implementation uses the value of the preceding
bit before the one being rounded to determine the direction to round.
#!/usr/local/bin/perl -w
use strict;
foreach (6 .. 14) { printf "%.0f " => $_ + 0.5 }
print "\n";
__END__
prints:
6 8 8 10 10 12 12 14 14
How's that for a surprise? Usually the question here is "Why does so-
and-so-ending-in-5 round down instead of up?", and the answer is to print
'%.20f' and see that the actual representation is less than they thought.
But in this case, the actual representation is exact.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 08 Oct 1998 23:31:34 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: select
Message-Id: <slrn71qmim.80.alastair@calliope.demon.co.uk>
Igor <supra@ucentral.ml.org> wrote:
>Hello!!!
>
>Please submit any working example for:
>select ( $rbits, $wbits, $ebits, $timeout )
>
>I just can't make it work.
Huh? What did you try and what errors did you see?
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Thu, 8 Oct 1998 22:34:05 GMT
From: sheely@misty.ca.boeing.com (Kevin Sheely)
Subject: Size limitations of MLDBM ?
Message-Id: <F0J5Ct.2LA@news.boeing.com>
I am experimenting with MLDBM and running into some problems when
the database file size approaches 1 gb. We have a large amount of
data that we would like to manipulate with several levels in a
complex data structure. I've noticed that no more data is added
after the file size gets around 1 gb and then some of the previous
entries are missing when I go back and read through the file.
I am using:
DataDumper 2.09
MLDBM 2.00
DB_File 1.60
BerkleyDB 1.85
Perl 5.004_04
HP-UX 10.20
Here is a sample program that gets an error close to 400,000
---------------------
#!/usr/bin/perl -w
use Fcntl;
use MLDBM qw(DB_File) ;
$|=1; #autoflush
$file = "test_mldbm";
if (!tie(%ob, 'MLDBM', $file, O_RDWR | O_CREAT, 0644))
{
die "could not open / tie to $file \n";
}
$limit = 400000;
for ($i=1;$i<=$limit;$i++)
{
if ($i%1000 == 0) {print "$i ";}
$ob{"$i"} ={'a'=>'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
'b'=>'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',
'c'=>'ccccccccccccccccccccccccccccccccccccccccccccccccc',
'd'=>'ddddddddddddddddddddddddddddddddddddddddddddddddd',
'e'=>'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
'f'=>'fffffffffffffffffffffffffffffffffffffffffffffffff',
'g'=>'ggggggggggggggggggggggggggggggggggggggggggggggggg'
};
if (!exists $ob{"$i"} ) {die "$i does not exist \n";}
}
untie %ob;
system("ll $file");
if (!tie(%ob, 'MLDBM', $file, O_RDWR , 0644))
{
die "could not open / tie to $file \n";
}
for ($i=1;$i<=$limit;$i++)
{
if (!exists $ob{"$i"}) {print "key$i does not exist \n";}
}
untie %ob;
-----------------------------------------------------------------------
Kevin Sheely Boeing Shared Services
P.O. Box 3707 m/s 7M-HC
Seattle, WA. 98124-2207
sheely@misty.ca.boeing.com
-----------------------------------------------------------------------
------------------------------
Date: Fri, 9 Oct 1998 02:51:42 +0300
From: "Michael Yevdokimov" <flanker@sonnet.ru>
Subject: Why it doesn't work under UNIX??????
Message-Id: <6vjf8a$pbt$1@bison.rosnet.ru>
#!/usr/local/bin/perl
#
####$destdir =
"/usr/local/etc/httpd/basicnet.sonnet.ru/data/devtools/components/vb_r";
@txt = <*.txt>;
@zip = <*.zip>;
open (OUT,">index.html");
print OUT "<html>\n<head>\n<title>Listing of files</title>\n";
print OUT "</head>\n";
print OUT "<body bgcolor=white text=black>\n";
#Link files
foreach ( @zip )
{
print OUT "<table border=0 cellpadding=2 width=593 height=97>\n";
#Description files processing
foreach ( @txt )
{
print OUT "<tr><td width=476 height=19 valign=top bgcolor=#004080>\n";
print OUT "<a href=\"$_\">$_</a>\n";
print OUT "</td>\n";
print OUT "</tr><tr>\n";
print OUT "<td width=593 height=16
colspan=2><strong><em><small>Description:</small></em></strong></td>\n";
print OUT "</tr><tr>\n";
print OUT "<td width=593 height=42 colspan=2 valign=top><small>\n";
open(IN,"$_");
#print OUT "<pre>\n";
while(<IN>) {
print OUT "$_";
}
#print OUT "</pre>\n";
close(IN);
print OUT "</small></td>\n";
print OUT "</tr>\n";
}
print OUT "</table>\n";
}
print OUT "</body>\n";
print OUT "</html>";
close(OUT);
exit(0);
----------------------------------------------------------------------------
-
Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, flanker@sonnet.ru and inform them
of the time the error occurred, and anything you might have done that may
have caused the error.
--
Michael Yevdokimov (flanker@sonnet.ru)
--------------------------------------------------------------------------
Developers Support Site
Web: http://www.basicnet.sonnet.ru
E-mail: quests@basicnet.sonnet.ru
--------------------------------------------------------------------------
------------------------------
Date: Thu, 08 Oct 1998 23:12:58 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Why it doesn't work under UNIX??????
Message-Id: <Pine.GSO.4.02A.9810081612070.4710-100000@user2.teleport.com>
On Fri, 9 Oct 1998, Michael Yevdokimov wrote:
> open (OUT,">index.html");
Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
> Internal Server Error
When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.
http://www.perl.com/CPAN/
http://www.perl.org/CPAN/
http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
http://www.perl.org/CPAN/doc/manual/html/pod/
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 08 Oct 1998 23:29:11 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Why it doesn't work under UNIX??????
Message-Id: <slrn71qme7.80.alastair@calliope.demon.co.uk>
Michael Yevdokimov <flanker@sonnet.ru> wrote:
>#!/usr/local/bin/perl
[SNIP]
Why doesn't it work? Who knows? Who cares? It's difficult to read through this
badly formatted code basically. Perhaps a '-w' switch might help. Perhaps
checking the status of your 'open' calls.
I wish you luck.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
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 3932
**************************************