[11177] in Perl-Users-Digest
Perl-Users Digest, Issue: 4777 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 29 07:07:16 1999
Date: Fri, 29 Jan 99 04:00:20 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 29 Jan 1999 Volume: 8 Number: 4777
Today's topics:
A known problem ??? <tristan.braun@pneu.com>
Re: CGI, Xitami and other modules (A.J. Norman)
Re: Floating point math errors <abey@hill.ucr.edu>
Re: Getting the last number in an IP addr with a regex. <aqumsieh@matrox.com>
Re: Good CGI Book dave@mag-sol.com
Re: Good CGI Book dave@mag-sol.com
Re: Gosh, s// faster than m// (was Re: Counting charact <zenin@bawdycaste.org>
Re: Gosh, s// faster than m// (was Re: Counting charact (Ilya Zakharevich)
Help!! Lower case!! <support@mekagames.com>
Re: Help!! Lower case!! (Sam Holden)
Re: Help!! Lower case!! <qdtrini@jdicms88.ericsson.se>
htpasswd and perl bann3094@my-dejanews.com
LWP and multiple connections at the same time <zozulak@point.sk>
Re: LWP and multiple connections at the same time (Sam Holden)
Re: More cannot evaluate $query->param('thing') (Bart Lateur)
NEWBIE texi2html <oly0@cncdsl.com>
Re: Perl Criticism [summary] (Sam Holden)
Re: Perl Criticism (David Formosa (aka ? the Platypus))
Re: Perl Criticism <aqumsieh@matrox.com>
Re: Perl Criticism <aqumsieh@matrox.com>
Re: Perl Criticism <aqumsieh@matrox.com>
Problem printing nested string variables? (Gary K. Nitzberg)
Re: Problem printing nested string variables? <abey@hill.ucr.edu>
Re: Reading headers & LWP <gisle@aas.no>
Rename is intermittently deleting my file... marcia.vigar@reed.co.uk
Re: The behaviour of split() <michael.preminger@jbi.hioslo.no>
Re: Visual Perl? <dieter.muecke@wueba.de>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 29 Jan 1999 11:14:30 +0100
From: "Tristan Braun" <tristan.braun@pneu.com>
Subject: A known problem ???
Message-Id: <36b18978.0@news.ka.choin.net>
I am using Version 5.003_07 for Win32. My Problem is, when I am using the
format function combined with write, I get no result.
I have tryed some samples from "Learning Pearl for Win32 Systems" and the
result is the same.
Thanks in advance.
Regards,
Tristan Braun
tristan.braun@pneu.com
http://www.pneu.com
------------------------------
Date: 29 Jan 1999 10:06:00 -0000
From: nja@le.ac.uk (A.J. Norman)
Subject: Re: CGI, Xitami and other modules
Message-Id: <78s168$6j4@harrier.le.ac.uk>
In article <78lf6c$k917@atbhp.corpmel.bhp.com.au>, Ron Savage
<Savage.Ron.RS@bhp.com.au> wrote:
> A guess:
> 1. You put your modules in a non-standard place
Yes.
> 2. From the command line they are found via PERL5LIB
No, I was either pushing the directory onto @INC from within the
script, or using the -I option from the command line (two of the
three methods Srinivasan suggests, which leads on to...)
> 3. Xitami does not honour PERL5LIB
Yes it does - typically the third method (the one I didn't try before
posting to this group) was the one that worked. The two others
mentioned above don't seem to work with Xitami, but did from the
command line. Xitami uses the Unix-style first line of the script to
invoke Perl, but doesn't seem to pick up the options.
--
Andrew Norman, Leicester, England
nja@le.ac.uk || andrew.norman@le.ac.uk
http://www.le.ac.uk/engineering/nja/
------------------------------
Date: Thu, 28 Jan 1999 23:18:10 -0800
From: Abraham Grief <abey@hill.ucr.edu>
To: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Floating point math errors
Message-Id: <Pine.LNX.4.05.9901282309150.30465-100000@hill.ucr.edu>
On Thu, 28 Jan 1999, Larry Rosler wrote:
> In article <Pine.LNX.4.05.9901281219300.8809-100000@hill.ucr.edu> on
> Thu, 28 Jan 1999 12:20:04 -0800, Abraham Grief <abey@hill.ucr.edu>
> says...
> >
> > Read the faq.
> >
> > http://language.perl.com/newdocs/pod/perlfaq4.html
>
> Usenet convention is to quote only what you need to, and *before* your
> comments on it.
>
I don't really see any benefit from writing
> > http://language.perl.com/newdocs/pod/perlfaq4.html
> >
> > Read the faq.
instead of
> > Read the faq.
> >
> > http://language.perl.com/newdocs/pod/perlfaq4.html
I think both are equally clear.
>
> 0.01 is imprecise. Every time you add it to $amt you accumulate error.
> You could either keep track of the number of times through the loop as
> an integer, multiply it by 0.01 and add it; or (far better) do all your
> arithmetic in integers (pennies, as you say), then divide by 100 to
> display totals in dollars.
You're right. However, I would still use printf so that my output for
something like 2.2 would be 2.20 instead.
------------------------------
Date: Sat, 23 Jan 1999 20:50:12 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
To: "Kim Saunders" <kims@tip.net.au>
Subject: Re: Getting the last number in an IP addr with a regex.
Message-Id: <x3yk8ydcucs.fsf@tigre.matrox.com>
[posted and emailed]
"Kim Saunders" <kims@tip.net.au> writes:
> could someone please help me with a regex to give me the last number in an
> IP address with a regex???
If that is all that you need then:
my $ip = '127.0.0.1';
my ($last_no) = ($ip =~ /\.(\d+)$/);
------------------------------
Date: Fri, 29 Jan 1999 09:21:10 GMT
From: dave@mag-sol.com
Subject: Re: Good CGI Book
Message-Id: <78rui1$2c0$1@nnrp1.dejanews.com>
In article <36B0AF65.4276804C@nortelnetworks.ca>,
Tom Renic <trenic@nortelnetworks.ca> wrote:
> Can anyone suggest a very good CGI Textbook that is a good
> starting point for a beginner, yet can act as a good desk reference
> for an experience programmer?
"The Official Guide to Programming with CGI.pm" by Lincoln Stein. Is all you
need.
--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 29 Jan 1999 09:25:37 GMT
From: dave@mag-sol.com
Subject: Re: Good CGI Book
Message-Id: <78ruqb$2ma$1@nnrp1.dejanews.com>
In article <36b0e141$0$16666@nntp1.ba.best.com>,
"J. David Eisenberg" <nessus@shell5.ba.best.com> wrote:
> Tom Renic <trenic@nortelnetworks.ca> wrote:
> : Can anyone suggest a very good CGI Textbook that is a good
> : starting point for a beginner, yet can act as a good desk reference
> : for an experience programmer?
>
> "CGI Programming on the World Wide Web", by Shishir Gundavaram,
> published by O'Reilly; ISBN 1-56592-168-2
This book is now looking pretty dated. A new edition (renamed "CGI Programming
with Perl", <http://www.oreilly.com/catalog/cgi2/noframes.html>) is due out in
June so it might be worth waiting for that if you can.
Dave...
--
Dave Cross
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 28 Jan 1999 22:08:14 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Gosh, s// faster than m// (was Re: Counting characters with tr/// (in perl))
Message-Id: <917561134.536421@thrush.omix.com>
Brand Hilton <bhilton@tsg.adc.com> wrote:
>snip<
: Now I'm curious. Why is it that, when running Configure, the default
: is to NOT use Perl's malloc?
It depends on the system and is defined in hints files. As I
understand it, if the target system already has a fast and reliable
malloc() it uses that by default, as perl's malloc() isn't as memory
efficient (choosing speed over wastefulness) as the core system's.
If you really want to tune your perl for a particular type of
applications, there are all kinds of neat compile time options you
can play with. By default however, the build takes a more moderate,
all-around use approach.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: 29 Jan 1999 10:02:58 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Gosh, s// faster than m// (was Re: Counting characters with tr/// (in perl))
Message-Id: <78s10i$20a$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Zenin
<zenin@bawdycaste.org>],
who wrote in article <917561134.536421@thrush.omix.com>:
> : Now I'm curious. Why is it that, when running Configure, the default
> : is to NOT use Perl's malloc?
>
> It depends on the system and is defined in hints files. As I
> understand it, if the target system already has a fast and reliable
> malloc() it uses that by default, as perl's malloc() isn't as memory
> efficient (choosing speed over wastefulness) as the core system's.
I do not know any system where the core malloc is less wasteful than
Perl's one. Some are pretty close, but still on the wrong side. The
only significant reason why hints contain mymalloc=n is inertia.
Ilya
P.S. Well, I lied. OS/2 API DosSubAllocMem() uses *way* less memory
than Perl's malloc(), at least basing on my simulations. But it
was 13 times slower, so is not a viable alternative.
------------------------------
Date: 29 Jan 1999 07:39:59 GMT
From: "MekaGames Staff" <support@mekagames.com>
Subject: Help!! Lower case!!
Message-Id: <01be4b5a$4775e0c0$558baccf@default>
Hello,
I have a variable....
$string = "InterNet";
I'd like to know how to lowercase the I and the N.
Please reply as fast as possible.
- Kaveh
------------------------------
Date: 29 Jan 1999 07:46:55 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Help!! Lower case!!
Message-Id: <slrn7b2prf.700.sholden@pgrad.cs.usyd.edu.au>
MekaGames Staff <support@mekagames.com> wrote:
>Hello,
>I have a variable....
>
>$string = "InterNet";
>
>I'd like to know how to lowercase the I and the N.
>Please reply as fast as possible.
RTFM as fast as you can...
--
Sam
People get annoyed when you try to debug them.
--Larry Wall
------------------------------
Date: Fri, 29 Jan 1999 12:41:46 +0100
From: Richard Nilsson <qdtrini@jdicms88.ericsson.se>
Subject: Re: Help!! Lower case!!
Message-Id: <36B19E7A.A90C2A0C@jdicms88.ericsson.se>
Sam Holden wrote:
> MekaGames Staff <support@mekagames.com> wrote:
> >Hello,
> >I have a variable....
> >
> >$string = "InterNet";
> >
> >I'd like to know how to lowercase the I and the N.
> >Please reply as fast as possible.
>
> RTFM as fast as you can...
>
> --
> Sam
>
> People get annoyed when you try to debug them.
> --Larry Wall
As Sam says, PERL's man pages describes how. Manipulating text is one
of the reasons of using PERL, since regexp is built in.
Use perldoc perlop, search for tr/, and you'll get the following aswer:
$ARGV[1] =~ tr/A-Z/a-z/; # canonicalize to lower case
You can of course also use the s/// operator.
/Richard
------------------------------
Date: Fri, 29 Jan 1999 05:49:49 GMT
From: bann3094@my-dejanews.com
Subject: htpasswd and perl
Message-Id: <78ri5r$nui$1@nnrp1.dejanews.com>
Does anybody have a script that will send the username and password
to a website pertected by htpasswd.
Roger
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 29 Jan 1999 11:56:11 +0100
From: "Peter Zozulak" <zozulak@point.sk>
Subject: LWP and multiple connections at the same time
Message-Id: <78s4co$a7l@gringo.somi.sk>
Hello,
I tried to look for some ideas how to let LWP do multiple network
connections at the same time.
Imagine you need download 10 files (1.html, 2.html, .... 10.html). By now I
use for ($i=1; ...) . It works fine, but do you have an idea about how to
make it without cycle ???
Thanks for reply. (if possible, CC to personal email)
Peter Zozulak, zozzi@cool.sk
------------------------------
Date: 29 Jan 1999 11:02:26 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: LWP and multiple connections at the same time
Message-Id: <slrn7b35a2.99s.sholden@pgrad.cs.usyd.edu.au>
On Fri, 29 Jan 1999 11:56:11 +0100, Peter Zozulak <zozulak@point.sk> wrote:
>Hello,
>
>I tried to look for some ideas how to let LWP do multiple network
>connections at the same time.
>
>Imagine you need download 10 files (1.html, 2.html, .... 10.html). By now I
>use for ($i=1; ...) . It works fine, but do you have an idea about how to
>make it without cycle ???
>From 'perldoc LWP' (I've got version 5.41).
BUGS
The library can not handle multiple simultaneous requests
yet. Also, check out what's left in the TODO file.
I guess you could always fork().
--
Sam
Another result of the tyranny of Pascal is that beginners don't use
function pointers.
--Rob Pike
------------------------------
Date: Fri, 29 Jan 1999 09:49:50 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: More cannot evaluate $query->param('thing')
Message-Id: <36b97284.5270603@news.skynet.be>
Ronald J Kimball wrote:
>It has nothing to do with Perl handling $query differently. The simple
>fact is that -> is not significant when Perl interpolates a
>double-quotish string; it's just two literal characters.
Not always so. (Funny how thoe threads always digress.)
Try this:
$array = [ qw(a b c) ];
$hash = { a => 'AAA', b => 'BBB', c => 'CCC' };
print "Here it comes: $hash->{$array->[1]}\n";
Let me spoil the fun: it prints
Here it comes: BBB
So the "->" IS used in interpolation. Just not for method calls.
Bart.
------------------------------
Date: 29 Jan 1999 02:27:57 PST
From: "Orlando L. Castro" <oly0@cncdsl.com>
Subject: NEWBIE texi2html
Message-Id: <36B18EB2.56F58766@cncdsl.com>
> Does anyone know of a utility called "texi2html" exists? If so, where can
> I find it?
Orlando L. Castro (perl newbie)
------------------------------
Date: 29 Jan 1999 06:17:43 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Perl Criticism [summary]
Message-Id: <slrn7b2kk6.56b.sholden@pgrad.cs.usyd.edu.au>
On Fri, 29 Jan 1999 05:42:46 GMT, topmind@technologist.com wrote:
>In article <39iudsv0ho.fsf@ibnets.com>,
> Uri Guttman <uri@ibnets.com> wrote:
>> >>>>> "t" == topmind <topmind@technologist.com> writes:
>>
>> t> P.S. I don't drool (unless Lara walks by)
>>
>> she must be on your screen's background since you seem to drool all over
>> your keyboard judging by your spelling and grammar (or rather lack
>> thereof). regardless of how bad a programmer you are (and you seem
>> awfully bad from your illogical diatribes), you wouldn't get hired in
>> most places with such a bad grasp of english (and such a strong grasp on
>> a cdrom character)
>>
>
>
>So spelling and grammar are related to one's programming experiece.
Yet again you make a statement that had no grounding in what was being
said. Where does the following sentence mention programming :
"she must be on your screen's background since you seem to drool all over
your keyboard judging by your spelling and grammar (or rather lack
thereof)."
That's right the answer is no where. Spelling and grammar was never linked
to programming ability... You made that connection.
You could argue they are, since spelling errors in variable names are
one of the most annoying things to have to deal with (from experience).
Also when you write code you also usually write some documentation, however,
you may never learn good spelling and grammar, since the compiler doesn't
check it for you, and practice only makes perfect if you practice the
right things...
Programming was mentioned afterwards but that was saying that a lack of
logic would indicate a bad programmer. Nothing about experience there
either.
>
>(P.S. When I am done fixing programming languages, I am going
>to replace english with a TRUE FONETIC system, so we are not
>stuck with illogical rules given to us by bad history.
>You probably cannot even recognize Englishes' illogical
>rules because you seem to lack the ability to stand back from
>what you are used to.)
Of course even if you miraculously replaced English with your new and
improved version it wouldn't last long anyway. Humans have this habit
of not letting themselves be restricted by stupid rules. Humans are lazy.
Slang develops fast and in different locations.
Look at Indonesian to see how a language can go from phonetic to no longer
phonetic in a very short time.
English has some illogical rules, but that is because it has evolved over
time to meet the needs of the people and not some theoritic guide that
doesn't work in practice. It's not the rules that are illogical, it's trying
to make an evolving spoken human language follow rules that is illogical.
--
Sam
Even if you aren't in doubt, consider the mental welfare of the person
who has to maintain the code after you, and who will probably put parens
in the wrong place. --Larry Wall
------------------------------
Date: 29 Jan 1999 08:15:01 GMT
From: dformosa@zeta.org.au (David Formosa (aka ? the Platypus))
Subject: Re: Perl Criticism
Message-Id: <slrn7b2rg5.fpl.dformosa@godzilla.zeta.org.au>
In article <78qigd$ssa$1@nnrp1.dejanews.com>, topmind@technologist.com wrote:
>In article <slrn7au5am.ivr.dformosa@godzilla.zeta.org.au>,
> dformosa@zeta.org.au (David Formosa (aka ? the Platypus)) wrote:
[...] Indeed I would argue that given that these are
>> quite commen in most langages most programers will be expecting them
>> and therefore a lanague without them would be more confising.
>
>
>I did *not* advocate doing away with short-circuit booleans altogether.
>It is using them as alternatives to IF's that I apposed to.
But if there useable as boolean short cuts then they will be used as
condistionals.
--
Please excuse my spelling as I suffer from agraphia. See
http://www.zeta.org.au/~dformosa/Spelling.html to find out more.
How to win arguments on usenet http://www.zeta.org.au/~dformosa/usenet.html
------------------------------
Date: Sat, 23 Jan 1999 19:59:06 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Perl Criticism
Message-Id: <x3yn239cwq1.fsf@tigre.matrox.com>
sholden@pgrad.cs.usyd.edu.au (Sam Holden) writes:
> As the sig says below (sortof), perl combines concepts from different types...
> procedural, functional, OO, and I odn't know what else...
I am not sure anyone else does!
>
> Perl was designed to be a mess (though in the nicest of possible ways).
> --Larry Wall
------------------------------
Date: Sat, 23 Jan 1999 20:13:49 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Perl Criticism
Message-Id: <x3ylnitcw1e.fsf@tigre.matrox.com>
topmind@technologist.com writes:
> In article <787ejj$j61$1@nnrp1.dejanews.com>,
> droby@copyright.com wrote:
> >
> > Uri has produced plenty of code. I've seen lots of it posted here. It's
> > generally quite intelligible to us, but to you would probably qualify as
> > cryptology. I suggest you find some and show us how you would improve it.
> > I.e., show us some real code with the faults you allege and show
> > us how to do it right.
>
> Is the code in this thread? Or another topic?
> Perhaps when/if I get my new newsreader working right, I
> can go hunting for such.
Somehow .. (usually by changing the focus of discussion) topmind
manages to escape supplying a single line of valid Perl code (again).
Oh well .. I think that he can't really backup his claims with real
solid code. Back in the old days, such people were usually referred to
as trolls. What is the equivalent word nowadays? reese?
------------------------------
Date: Sat, 23 Jan 1999 22:03:11 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Perl Criticism
Message-Id: <x3yhfthid8w.fsf@tigre.matrox.com>
Just as a followup to my own posting .. I was checking dejanews for
some of topminds postings on different ng's .. and guess what I found
.. here .. take a look (from comp.programming):
Beware: this may be funny ..
***********************************************
In article <35C65FE4.35465AF0@netlabs.net>,
Richie Bielak <richieb@netlabs.net> wrote:
> Dear Topmind,
>
> Rather than talking in abstract, why not show us some
> code. I'm attaching an Eiffel program that plays a
> simple "guess the animal" game. Can you write a similar
> program using your TOP method?
>
> ....[snip]
> ...richie
>
> http://www.netlabs.net/~richieb
>
Cool! A challenge.
Is this the game that builds a binary tree based on yes/no questions?
I wrote one in Basic a long time ago, but would be glad to write it
in say xbase. I will see if I have time this weekend.
I bet it will be shorter AND provide automatic persistance, AND
allow concurrent access with a little extra code (which I doubt
I will have time for).
Ha Ha, we'll see....
-tmind-
*******************************************************
ALAS, once again, Dr. Topmind manages to escape supplying a single
line of code by giving a stupid excuse like having no time. Yet, he
finds enough time to author multiple posts every day with no apparent
point.
He even pretends to accept the challenge, claims that he wrote a
program in his life, claims that *if* he writes a program, it will be
superior to others, but actually implements *NOTHING*. Lovely.
I move to abandon replying to any of topmind's posts until we see an
actual snippet of code. All in favour please raise your hands.
(and the crowd goes wild)
------------------------------
Date: Fri, 29 Jan 1999 06:30:49 GMT
From: gknitz@nitzspace.com (Gary K. Nitzberg)
Subject: Problem printing nested string variables?
Message-Id: <36b15543$0$16686@nntp1.ba.best.com>
I have global strings containing variables in local subroutines. The string
in the code below prints; "global global." I want to evaluate the string to
print "global local global". What is the best way to do this? TIA.
Gary.
gknitz@nitzspace.com
########################
$xxx = "global $joe global";
nest();
exit;
sub nest {
$joe = "local";
print $xxx;
}
########################
------------------------------
Date: Fri, 29 Jan 1999 00:04:13 -0800
From: Abraham Grief <abey@hill.ucr.edu>
To: "Gary K. Nitzberg" <gknitz@nitzspace.com>
Subject: Re: Problem printing nested string variables?
Message-Id: <Pine.LNX.4.05.9901282357560.32099-100000@hill.ucr.edu>
On Fri, 29 Jan 1999, Gary K. Nitzberg wrote:
>
> I have global strings containing variables in local subroutines. The string
> in the code below prints; "global global." I want to evaluate the string to
> print "global local global". What is the best way to do this? TIA.
>
>
> Gary.
> gknitz@nitzspace.com
>
>
> ########################
> $xxx = "global $joe global";
>
> nest();
> exit;
>
> sub nest {
> $joe = "local";
> print $xxx;
> }
> ########################
>
>
When you're assigning to $xxx, $joe hasn't been initialized... $xxx will
not get updated every time you change $joe. The interpolation is only
done once, and at that one time, $joe has never been used before. Try
running perl -w, it would've given you a warning.
------------------------------
Date: 29 Jan 1999 08:42:36 +0100
From: Gisle Aas <gisle@aas.no>
Subject: Re: Reading headers & LWP
Message-Id: <m3n232ed8z.fsf@furu.g.aas.no>
moseley@best.com (Bill Moseley) writes:
> A feature of LWP is 'Transparent redirect handling'
>
> Is there a way to disable this?
Calling $ua->simple_request instead of $ua->request does the trick.
--
Gisle Aas
------------------------------
Date: Fri, 29 Jan 1999 06:24:23 GMT
From: marcia.vigar@reed.co.uk
Subject: Rename is intermittently deleting my file...
Message-Id: <78rk6i$pjl$1@nnrp1.dejanews.com>
I am running a discussion page, which gets a lot of use, but occasionally the
text file vanishes. I use a temporary file for additions, then renaming this
to become the main file again. I lock the files too. Can anyone help?
thanks... snip======= open (DB, $file) or die "Error opening file: $!\n";
flock DB, 2; open (TEMP, ">$tempfile") or die "Error opening file: $!\n";
flock TEMP, 2; print TEMP $record; while(<DB>) { print TEMP
$_; } rename($tempfile,$file) or die "Error renaming file! $!\n"; flock DB,
8; flock TEMP, 8; close(TEMP); close(DB); snip=======
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 29 Jan 1999 09:49:49 +0100
From: Michael <michael.preminger@jbi.hioslo.no>
Subject: Re: The behaviour of split()
Message-Id: <36B1762C.20E154D9@jbi.hioslo.no>
Michael wrote:
> Hello!
>
> I have encountered difference in behaviour of the split function that
> I do not understand:
>
> In two different scripts I have strings like:
> "0.01 -5.24 ...."
>
> Those I split into an array using split(/\s+/, $string )
>
> In one script the first element is found in the array, and in the other
> it is not.
> Any explanation?
>
> Michael
I have looked at the two scripts again (using exactly the same string).
One of them uses a package (wrapped with SWIG from a C library).
When I comment away the use and package directives then the problem
disappears.
This package has apparently nothing to do with split, USE'ing it changes
the
behaviour of this function. This is abit scaring.
------------------------------
Date: Fri, 29 Jan 1999 10:12:45 +0100
From: "Dieter M|cke" <dieter.muecke@wueba.de>
Subject: Re: Visual Perl?
Message-Id: <36B17B8D.6DBE54B9@wueba.de>
Hi Gil,
Perl has many graphical frontends.
Under Win32 there is a lot of non-free IDE's.
Or use (X)Emacs on Win32 or Unix as IDE, DDD or ptkdb as debugger.
For Application use Perl/Tk, Perl/Qt or Perl/X.
Regards
--
Dieter M|cke e-mail: Dieter.Muecke@wueba.de
www: http://www.wueba.de
,,,^..^,,,
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4777
**************************************