[12546] in Perl-Users-Digest
Perl-Users Digest, Issue: 6147 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 27 18:07:11 1999
Date: Sun, 27 Jun 99 15:01:28 -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 Sun, 27 Jun 1999 Volume: 8 Number: 6147
Today's topics:
Re: How to store hashes (Abigail)
I need help with the Net::FTP module ! o_klaus@my-deja.com
Re: In Mountain View did Larry Wall (Larry Rosler)
Re: In Mountain View did Larry Wall <gellyfish@gellyfish.com>
Re: In Mountain View did Larry Wall <cassell@mail.cor.epa.gov>
Re: Learning Perl exercises using reverse <swiftkid@bigfoot.com>
Re: Learning Perl exercises using reverse <mdichirico@lamotionpictures.com>
Re: Looking for very small, basic bulletin board system <cassell@mail.cor.epa.gov>
Please don't read, test only <cljlk@hotmail.com>
Scoping problem (Ryan Ngi)
Re: spawning on the left side of the assignment, or som <tchrist@mox.perl.com>
Re: Statistics for comp.lang.perl.misc (Abigail)
Trapping validation errors in XML:Parser pelau@my-deja.com
Re: Using BigFloat? (Anno Siegel)
Re: Viral matters [completely off-topic] <tchrist@mox.perl.com>
Re: What's a good BBS cgi program? <dchender@esn.net>
Why is this broken... <portboy@home.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 27 Jun 1999 15:26:43 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How to store hashes
Message-Id: <slrn7nd27m.v72.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCXXVI September MCMXCIII
in <URL:news:3775edbb.357396@news.skynet.be>:
!! Timo Hummel wrote:
!!
!! >I want to store hashes in a file. What's the best way to do this?
!!
!! I would use a tab-delimited file.
That's about the last thing I would do.
Why not use a DBM file? Or, if you plan to read/write the entire hash
at once, something like Data::Dumper, Storable, or FreezeThaw?
!! on one line, value on one line etc., is that when editing the data with
!! an external program, you can easily see the link between key and value.
!! You can even use a spreadsheet (e.g. Excel) to edit the data!
!!
!! write: (print to file; open file and select filehandle yourself)
!! {
!! local($\,$,) = ("\n","\t")
!! foreach (sort keys %hash) {
!! print FILE $_,$hash{$_};
!! }
What if either the key or the value has either a newline, or a tab in it?
Then it would fail, wouldn't it?
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 27 Jun 1999 21:18:16 GMT
From: o_klaus@my-deja.com
Subject: I need help with the Net::FTP module !
Message-Id: <7l64ej$v0n$1@nnrp1.deja.com>
Hi everbody !
I was trying to write a Cgi with perl for having FTP-access !
But I failed....
Is anybody outthere who could send me a detailed description how to use
this module - or does anybody know where I can get a short summary ?
(URL?)
I want to use this modul for login to any FTP - Server and
download/uplod a file !
Please /msg me !
Thx in advance Olaf !
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 27 Jun 1999 12:24:33 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: In Mountain View did Larry Wall
Message-Id: <MPG.11e01a4d4139ec28989c59@nntp.hpl.hp.com>
In article <oeeogi1ebds.fsf@alpha.hut.fi> on 27 Jun 1999 21:39:27 +0300,
Jarkko Hietaniemi <jhi@alpha.hut.fi> says...
> lr@hpl.hp.com (Larry Rosler) writes:
...
> > Kubla Kahn
>
> Kahn?
>
> > (or, A Vision in a Dream)
> >
> > In Xanadu did Kubla Kahn
>
> Kahn?
Cut and pasted, without proofreading. Oh, well.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 27 Jun 1999 19:56:44 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: In Mountain View did Larry Wall
Message-Id: <7l5vls$7c$1@gellyfish.btinternet.com>
On Sun, 27 Jun 1999 07:14:49 -0700 Larry Rosler wrote:
> [Posted and a courtesy copy sent.]
>
> In article <7l3nvc$54t$1@gellyfish.btinternet.com> on 26 Jun 1999
> 23:33:00 -0000, Jonathan Stowe <gellyfish@gellyfish.com> says...
>> On 26 Jun 1999 16:45:41 -0700 Tom Christiansen wrote:
>> > In Mountain View did Larry Wall
>> > Sedately launch a quiet plea:
>>
>> The lawyers of The Estate of Percy Bysshe Shelly will be contacting you ..
>
> Oh, my. What happened to the much-vaunted English education system?
>
> Samuel Taylor Coleridge
>
I'd better hand back the degree ...
I was sitting there thinking thats not right, thats not right, thats not
right - but disturbed as I was by the spectacle of the Morris Dancers
doing the peculiar "Baby wipe dance", disturbed as I was by the lovely
Ook! (please do see the Hall of Flame at <http://www.gellyfish.com/flames>)
I make my recompense:
On London fell a clearer light;
Caressing pencils of the sun
Defined the distances, the white
Houses transfigured one by one,
The 'long unlovely street' impearled,
O what a sky has walked the world!
(I asked Mrs G to bring some poesy from upstairs and thats what she brought).
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sun, 27 Jun 1999 14:41:18 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: In Mountain View did Larry Wall
Message-Id: <37769A7E.B71511BF@mail.cor.epa.gov>
Jarkko Hietaniemi wrote:
>
> lr@hpl.hp.com (Larry Rosler) writes:
>
> > Kubla Kahn
>
> Kahn?
Khan. Moshe 'Kubla' Kahn is my brother-in-law, who is in
dry goods.
> > (or, A Vision in a Dream)
> >
> > In Xanadu did Kubla Kahn
In Xanadu did Kubla Khan
a stately pleasure dome decree...
Considered to be one of Coleridge's best works, he claimed
that the poem was composed in an opium-induced sleep.
Makes one wonder what Tom was using... :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 28 Jun 1999 00:13:40 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Learning Perl exercises using reverse
Message-Id: <7l70d4$1r84@news.cyber.net.pk>
I know, he wanted just an example :)
------------------------------
Date: Sun, 27 Jun 1999 19:52:57 GMT
From: Mike Dichirico <mdichirico@lamotionpictures.com>
Subject: Re: Learning Perl exercises using reverse
Message-Id: <7l5vem$tmg$1@nnrp1.deja.com>
Thanks, Philip. --Mike
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 27 Jun 1999 13:21:45 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Looking for very small, basic bulletin board system
Message-Id: <377687D9.A2C6B13@mail.cor.epa.gov>
Rich Campbell wrote:
>
> heh heh - I think there's a "bot" on here that randomly answers questions
> with
> "try reading PerlFaqXXXX"
And we keep trading off on who gets to use it, too.
> you might try http://www.worldwidemart.com/scripts/wwwboard.shtml
> I've used it and customized it a little (it's sort of plain - but works
> great)
If your definition of 'works great' means "has really dreadful
bugs which I have not noticed yet." Caveat utor.
> ivanhead@my-deja.com wrote in article <7kospg$jos$1@nnrp1.deja.com>...
> > Oh, I'm ecstatic.
> > [snip]
Ivan and I corresponded via private e-mail, and I got him
straightened out on all this stuff.
> > > You'll be happy to know that there's a thousand of these on the
> > > web. Just don't go to Matt's Script Archive. Happy searching!
Notice that I specifically warned him not to use Matt's Scripts.
Why would you want to give someone advice like that? And in
public, too... :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Sun, 27 Jun 1999 17:58:50 -0400
From: "j.k." <cljlk@hotmail.com>
Subject: Please don't read, test only
Message-Id: <37769E9A.55AD7656@hotmail.com>
Please don't read, test only
------------------------------
Date: Sun, 27 Jun 1999 20:02:11 GMT
From: ryanngi@hotmail.com (Ryan Ngi)
Subject: Scoping problem
Message-Id: <377682d0.38572020@news.inet.co.th>
give
$x=10
sub test{
my($x)=3;
return $x+$x; <--- the second x is x that is outside the scope(10)
,how to do that!?
}
------------------------------
Date: 27 Jun 1999 13:09:31 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: spawning on the left side of the assignment, or something like that....
Message-Id: <377676eb@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Shaw Kaake <shaw@active.ch> writes:
:Thank you for the response Tom. I should have been clear on the data
:structure, I put in the parens for the english sentence. The actual data
:structure comes from an Excel spreadsheet in a .csv format called comma
:delimited format by Excel.
Their language is wrong. Apparently, though, some programmer knew
better, since I see "CSV" not "CDV". :-)
:It has no parens and looks like:
:
:intro,france,"French text here"
:intro,italy,"Italian text here"
:intro,usa,"United States text here"
Yup. Separators.
:I will study the FAQ, thanks again.
Don't forget to check for CPAN modules, too. I've heard tell
that M$ never managed to figure out sane quoting strategies.
(You can tell that with their "shell". :-)
--tom
--
Whom computers would destroy, they must first drive mad.
------------------------------
Date: 27 Jun 1999 15:15:44 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <slrn7nd1j3.v72.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCXXVI September MCMXCIII
in <URL:news:3776dcde.1081198@news.skynet.be>:
;; Abigail wrote:
;;
;; >That's not what I said, was it?
;;
;; You said "not TomC's posts, but the posts TomC replies to". In the cases
;; I think you're referring to, TomC replies by quoting whole FAQ and
;; PerlFunc sections.
I said I wasn't thinking about Tom C's posts. That didn't imply that I
think all of Tom C's postings are original content.
Abigail
--
perl -we '$_ = q ;4a75737420616e6f74686572205065726c204861636b65720as;;
for (s;s;s;s;s;s;s;s;s;s;s;s)
{s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 27 Jun 1999 21:38:40 GMT
From: pelau@my-deja.com
Subject: Trapping validation errors in XML:Parser
Message-Id: <7l65kv$vcl$1@nnrp1.deja.com>
I'm tired of seeing "not well-formed at line ..."
errors. I'm using the XL::Parser in Stream mode.
Is there a way to nicely trap those errors and
just move on to the next tag in the file?
Dee
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 27 Jun 1999 19:23:57 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Using BigFloat?
Message-Id: <7l5tod$tes$1@lublin.zrz.tu-berlin.de>
artlore <artlore@sirius.com> wrote in comp.lang.perl.misc:
>I'm getting spurious (to me) error messages from the BigFloat module
>such as as use of an unititialized value on line 78, in the middle of
>the package's regexp stringify routine...
>
>Hmmm.... The documentation is quite scanty for this module.... I've
>followed the syntax recommended in the synopsis and I'm performing
>rather rudimentary division and multiplication, albeit as part of an
>FDE....
>
>Any BigFloat veterans out there who might care to enlighten me?
You don't give us much to work with, do you? Supply a code snippet
that produces that warning and maybe someone can help you out.
Btw, line 78 is where the routine for absolute value is defined.
Anno
------------------------------
Date: 27 Jun 1999 13:11:32 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Viral matters [completely off-topic]
Message-Id: <37767764@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, andy barfoot <gt7202e@prism.gatech.edu> writes:
:Good grief, what's _that_ doing at language.perl.com? Are the perldocs
:turning into the Hitchhiker's Guide to the Galaxy?
It's summer. I'm doing non-serious things. Why aren't you? :-)
Check the Perl News bit for some other non-serious bits.
--tom
--
But you have to allow a little for the desire to evangelize when you
think you have good news.
--Larry Wall in <1992Aug26.184221.29627@netlabs.com>
------------------------------
Date: Sun, 27 Jun 1999 15:29:54 -0700
From: "M.A. Henderson" <dchender@esn.net>
Subject: Re: What's a good BBS cgi program?
Message-Id: <3776A5E1.7A9FA32F@esn.net>
try webbbs at awsd.com/scripts/webbbs
TechGuy wrote:
> I'm currently using UltimateBB(.com) for my BBS program, but have been
> experiencing a lot of problems, some related to reaching 10,000 posts
> in a discussion area. Can someone recommend another, better BBS
> program? I'd like it to be based on some sort of database so that the
> number of posts doesn't make a big difference in performance. I've
> looked at www.wwwthreads.org and it seems to be just what I need, but
> for some reason won't detect MySQL on my server (though other programs
> have no problems), and their support won't answer me. Also, I'm
> looking at DCForum99 (www.dcscripts.com). Any ideas or comments? Any
> suggestions are greatly appreciated.
>
> Also, if this question would be better placed in another forum, please
> point me in the right direction. Thanks!
>
> -Mike
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
------------------------------
Date: Sun, 27 Jun 1999 19:54:54 GMT
From: Mitch <portboy@home.com>
Subject: Why is this broken...
Message-Id: <37768162.7B826BB8@home.com>
I have a subroutine that should search through a file and replace a line
on the given parameters i give it. So, if in the file (/some/file)i
have:
foo bar
tomorrow sucks
yesterday rules
and pass it the parameters:
&replace("tomorrow sucks", "always will", "/some/file");
I keep getting the new file with only:
"always will", everything else has been wiped out. Any suggestions?
The code for &replace is below:
sub replace
{
my($old_line,$new_line,$file) = @_;
my($rep) = 0;
system("chmod +w $file");
open(OUT,">$file.bak") || die "Can't open $file!";
open(FILE,"$file") || die "Can't open $file!";
while(<FILE>)
{
if (/$old_line/)
{
if ($_ eq "$new_line\n")
{
print OUT;
$rep = -1;
}
else
{
print OUT "$new_line\n";
$rep = 1;
}
next;
}
print OUT;
}
close(FILE);
close(OUT);
system("/bin/mv $file.bak $file");
$rep;
}
------------------------------
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 6147
**************************************