[6769] in Perl-Users-Digest
Perl-Users Digest, Issue: 394 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 29 20:07:23 1997
Date: Tue, 29 Apr 97 17:00:23 -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, 29 Apr 1997 Volume: 8 Number: 394
Today's topics:
Re: Automatic NNTP Usenet news reader & posting perl sc <rootbeer@teleport.com>
Re: Can I kill a pipe? (Charles DeRykus)
Re: Die problem (Eric Bohlman)
Re: Evoke one *.pl in another? <rootbeer@teleport.com>
Re: Extracting pseudo HTML from string <ajohnson@gpu.srv.ualberta.ca>
Re: File Copy <rootbeer@teleport.com>
getopts (Tomoo Taguchi)
hashes, -d's "x", and Data::Dumper (G. Del Merritt)
Junk Email Overflow! <trussell@nfinity.com>
Re: Junk Email Overflow! (A. Deckers)
Re: MacPerl <-> text editor? (Michael O'Henly)
Re: Multi line matching problem. Should be simple?!? <fawcett@nynexst.com>
Re: Multi line matching problem. Should be simple?!? (David Alan Black)
Re: Network Programming and Sockets (Chipmunk)
Re: Notice to antispammers <usenet-tag@qz.little-neck.ny.us>
Re: Notice to antispammers <usenet-tag@qz.little-neck.ny.us>
Re: Passing parameters between 2 scripts using Perl 5.0 <td24246@tafmss4.bgm.link.com>
Re: Passwork perl <rootbeer@teleport.com>
Re: Perl auto-replier (A. Deckers)
Re: Perl auto-replier (John Klassa)
Re: Perl auto-replier <usenet-tag@qz.little-neck.ny.us>
Re: Perl auto-replier (Jason Bodnar)
Re: PERL to dBase dbf <brett@speedy.speakeasy.org>
rferraro@ci.rnp.br rferraro@ci.rnp.br
Shared Libs with Compiler (Henry Avatar Chan)
Turn array into hash then import into another namespace (Jason Bodnar)
Re: Turn array into hash then import into another names (David Alan Black)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 27 Apr 1997 10:50:36 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Drake Raft <drake-@email.unc.edu>
Subject: Re: Automatic NNTP Usenet news reader & posting perl scripts.
Message-Id: <Pine.GSO.3.96.970427104744.21809H-100000@kelly.teleport.com>
On 26 Apr 1997, Drake Raft wrote:
> Hello there. I am looking to automate the reading, indexing and posting
> of news to a couple of usenet newsgroups. Would anyone know where I
> might start?
I'd recommend writing something in Perl. Once you've learned Perl (from
the Llama book, or something similar) you can read up on using modules.
There are several available modules on CPAN which can do what you want.
> Where is a good source of perl scripts?
CPAN has more modules than scripts, but here it is...
http://www.perl.com/CPAN/
http://www.perl.org/CPAN/
> If you could please respond to mcgucken@physics.unc.edu, that would be
> great.
Actually, if you want to direct replies to a particular address, you
should use the news headers.
Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Tue, 29 Apr 1997 23:05:57 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Can I kill a pipe?
Message-Id: <E9F9Hx.6BL@bcstec.ca.boeing.com>
In article <5jqg4p$kqq@panix2.panix.com>,
malgosia askanas <ma@panix.com> wrote:
>If my Perl program opens a pipe to "sendmail", is there any way to kill
>this pipe without send out the mail, if in the course of processing
>it turns out that the mail shouldn't be sent out after all? I am hacking
>something that opens a pipe at the very top, and I would love to hack it
>without redesigning the entire logic.
>
The mail won't be sent until there's an eof on the data stream. So you
could kill off the process anytime prior, e.g,
my $pid = open(MAIL,"|/usr/lib/sendmail -t -oi") or
die "can't fork: $!";
print MAIL "Subject: ..."; # start sending mail
...
...
if ( $forget_it) { # whoops, check's not in the mail :)
kill 1, $pid or die "can't abort sendmail\n";
}
...
close MAIL or die "can't close: $!";
HTH,
--
Charles DeRykus
ced@carios2.ca.boeing.com
------------------------------
Date: Tue, 29 Apr 1997 21:51:19 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Die problem
Message-Id: <ebohlmanE9F61J.25J@netcom.com>
Bill Blohm (bblohm@boi.hp.com) wrote:
: Once I had this working, I handed it off to the user that requested
: the program. A few days later he came back, admitted he'd forgotten
: how to use it, and asked how to use it. I explained how, and decided
: to put a usage clue in there for anyone else that wanted to use it,
: (or this user if he forgot again). That's when my problems started.
: I added the die line as shown below, and then found out several
: things:
: #!/usr/local/bin/perl -pi.old
: die "Usage: cradd <filename>\n" if @ARGV < 1;
: s/\n/\n\r/g;
: If it matters, there's a blank line between each line in the real
: file.
It doesn't matter.
The problem is that when you use the -p and -i switches, perl runs your
code inside a loop that basically shifts filenames out of @ARGV, opens
them and reads lines from them. This means that your "die" statement
with its conditional is being executed repeatedly, and the conditional
will become true as soon as the last filename is shifted out of @ARGV
(which will happen *before* the lines from the last file are read).
The following is untested, but might solve the problem:
#!/usr/local/bin/perl -pi.old
die "Usage: cradd <filename>\n" if @ARGV < 1 and !defined $first;
$first=1;
s/\n/\n\r/g;
This will prevent the "die" conditional from ever becoming true if there
were any arguments.
------------------------------
Date: Sun, 27 Apr 1997 10:47:16 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Chris Zeth <cwzeth2@nis.net>
Subject: Re: Evoke one *.pl in another?
Message-Id: <Pine.GSO.3.96.970427104416.21809G-100000@kelly.teleport.com>
On Fri, 25 Apr 1997, Chris Zeth wrote:
> How do I run program.1.pl and have this be a simple call to run
> program.2.pl?
You want one program to do nothing but call another? Why not call the
other in the first place?
If I've misunderstood, and you simply want to call another program within
your main program, you can do that with system, exec, or backticks. Your
favorite perl book or manpages should tell you about those.
If I've still misunderstood, and you're trying to use one .pl (Perl
library) file from another, use require, which is in the perlfunc(1)
manpage. (Although you should really consider converting old libraries
into modules.)
Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Tue, 29 Apr 1997 17:04:21 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Extracting pseudo HTML from string
Message-Id: <33667065.1792567B@gpu.srv.ualberta.ca>
! >I have a string that looks like
! >"asdfafasdf<FNAME>Tom</FNAME>sdfsdfsfsd"
! >and I want to extract the text between the <FNAME>
! >and </FNAME> tags.
!
! Regular expressions are your friend here. :) The following
! code will do what you are asking. (And, yes, I know, there's
! probably several more compact ways of writing it, but this
! way it's (at least, I think) clear what is going on:
!
! #!/usr/bin/perl
! $string = "asdfafasdf<FNAME>Tom</FNAME>sdfsdfsfsd";
! if ($string =~ /<FNAME>(.*)<\/FNAME>/)
! {
! $result = $1;
! }
! print "Result: $result\n" if $result;
!
! Hope this helps.
you'll have to be careful doing it that way because if
there is a second set of <tags> in the same string your $1
will hold everything between the first <FNAME> and the last
</FNAME>...you could use the minimal matching quantifier
if you have perl 5
$string=~/<FNAME>(.*?)<\/FNAME>/;
or a negative character class (which should also be
more efficient) if you never need to allow a less-than
sign in between the <tags>
$string=~/<FNAME>([^<]*)<\/FNAME>/;
regards
andrew
------------------------------
Date: Tue, 29 Apr 1997 14:31:41 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Becky Schonfeld <rebecc60@pobox.upenn.edu>
Subject: Re: File Copy
Message-Id: <Pine.GSO.3.96.970429143024.4859I-100000@kelly.teleport.com>
On Mon, 28 Apr 1997, Becky Schonfeld wrote:
> Can anyone send me or recommend a very simple script to copy file1 to
> file2 except for one line from file1? Any help is much appreciated.
perl -ne 'print unless $. == 17' <file1 >file2
Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 29 Apr 1997 23:37:22 GMT
From: tomoo@sdd.hp.com (Tomoo Taguchi)
Subject: getopts
Message-Id: <5k60ni$2gg@news.sdd.hp.com>
Keywords: getopts
Hi:
I'm trying to write my first perl script and am running into a
problem with getopts. My script bascially reads in a file a line
at a time from STDIN, does some pattern matching substituions using
()'s, and prints out the newly formatted line. This works fine
until I got cute and tried to use getopts. When I include the line
require 'getopts.pl'
My script runs, but everything that I saved using ()'s in pattern
matiching substitution seems to get turned to nulls.
Does anyone know what is going on or seen this behavior?
Thanks,
Tomoo
------------------------------
Date: 24 Apr 97 15:02:13 EDT
From: del@giant.intranet.com (G. Del Merritt)
Subject: hashes, -d's "x", and Data::Dumper
Message-Id: <1997Apr24.150213.17560@giant>
I have just started using Gurusamy Sarathy's Data::Dumper package, Version
2.07, with Perl 5.003_24, and I have noticed the following "anomally".
Given:
use Data::Dumper;
$myhash{'A'}{'0'}{'X'} = "hello";
$myhash{'A'}{'0'}{'W'} = "world";
$myhash{'A'}{'1'} = "now";
$myhash{'A'}{'1'}{'X'} = "is";
$myhash{'A'}{'1'}{'W'} = "the";
$myhash{'B'}{'0'}{'X'} = "time";
$myhash{'B'}{'1'}{'X'} = "for";
$myhash{'B'}{'2'}{'X'} = "all";
$myhash{'B'}{'0'}{'Z'} = "good";
$myhash{'B'}{'1'}{'Z'} = "men";
$myhash{'B'}{'2'}{'Z'} = "to";
$myhash{'B'}{'0'}{'Y'} = "come";
$myhash{'B'}{'1'}{'Y'} = "to";
$myhash{'B'}{'2'}{'Y'} = "the";
print '$myhash{A}{1} = ', $myhash{'A'}{'1'}, "\n",
'$myhash{A}{1}{X} = ', $myhash{'A'}{'1'}{'X'}, "\n",
'$myhash{A}{1}{W} = ',$myhash{'A'}{'1'}{'W'}, "\n";
print Dumper(\%myhash);
When this is run, note that $myhash{A}{1}{X} and $myhash{A}{1}{W}, while
"visible" to Perl (the "print" statements work), don't get picked up by
Dumper. Then, running the script "-d", I tried the "x" command, and lo:
DB<2> x %myhash
0 'A'
1 HASH(0x295d98)
0 => HASH(0x295ee8)
'W' => 'world'
'X' => 'hello'
1 => 'now'
2 'B'
3 HASH(0x295df8)
0 => HASH(0x2e6d74)
'X' => 'time'
'Y' => 'come'
'Z' => 'good'
1 => HASH(0x2e6c90)
'X' => 'for'
'Y' => 'to'
'Z' => 'men'
2 => HASH(0x2e6dc8)
'X' => 'all'
'Y' => 'the'
'Z' => 'to'
DB<3> print $myhash{A}{1}{X}
now
DB<4> print $myhash{A}{1}{W}
is
DB<5> print $myhash{A}{1}{W}
the
So it looks like the debugger's "x" command shares the same anomally.
Is what I'm doing wrong? What is happening that the debugger and Data::Dumper
"lose" these values, yet Perl itself seems to see them?
Thanks. Please feel free to CC: me on any reply/followup you make.
--
Del Merritt del@IntraNet.com
IntraNet, Inc., One Gateway Center #700, Newton, MA 02158
Voice: 617-527-7020; FAX: 617-527-1761 Just say no to Clipper.
You may not add me to a commercial mailing list or send me commercial
advertising without my consent.
NERD PRIDE is a registered trademark of the MIT
------------------------------
Date: Tue, 29 Apr 1997 13:41:54 -0500
From: Tim Russell <trussell@nfinity.com>
Subject: Junk Email Overflow!
Message-Id: <336640F2.749F@nfinity.com>
Hi, I was wondering if anybody can help me out on this.
Has anybody written or know of a perl program that you can use to
validate From: addresses after sendmail receives them, but before the
actual message is delivered to the user? What I'm getting at is that
most mass-mailings have bogus from fields in them, so filtering them
out and sending them to /dev/null would be the easiest fix. Those that
don't use bogus from addresses usually supply a method of removing a
person from a mailing list.
Any help here will be greatly appreciated,
Tim Russell
trussell@nfinity.com
------------------------------
Date: 29 Apr 1997 23:37:13 GMT
From: I-hate-cyber-promo@man.ac.uk (A. Deckers)
Subject: Re: Junk Email Overflow!
Message-Id: <slrn5md1h0.i6j.I-hate-cyber-promo@nessie.mcc.ac.uk>
In comp.lang.perl.misc,
trussell@nfinity.com wrote:
>Hi, I was wondering if anybody can help me out on this.
>
>Has anybody written or know of a perl program that you can use to
>validate From: addresses after sendmail receives them, but before the
>actual message is delivered to the user? What I'm getting at is that
>most mass-mailings have bogus from fields in them, so filtering them
>out and sending them to /dev/null would be the easiest fix. Those that
>don't use bogus from addresses usually supply a method of removing a
>person from a mailing list.
In general, there is no sure-fire way of validating an email address,
short of sending it a message and seeing if someone or something
replies. Any other method will generate some false postives and/or
false negatives. The reasons why this is so have been rehearsed to
death here and in other groups.
Having said that you may be able to weed out some bogus addresses. Tom
Christiansen has recently published a script that attempts to do that.
Check: <URL:http://www.perl.com/perl/scripts/ckaddr.gz>
Alain
--
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl archive: <URL:http://www.perl.com/CPAN/>
>>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<
------------------------------
Date: Tue, 29 Apr 1997 16:32:37 -0700
From: michael@tenzo.com (Michael O'Henly)
Subject: Re: MacPerl <-> text editor?
Message-Id: <19970429163237152213@i2-27.islandnet.com>
Adam Schneider <acs@bitstream.net> wrote:
> I just installed MacPerl 5 (I'd been using version 4). My text editor of
> choice is Tex-Edit 1.8.5, and I'm getting a "Tex-Edit" menu in MacPerl,
> but when I select the items under that menu (Edit... or Update...), all
> that happens is that Tex-Edit is opened. I thought the script I was
> currently working on in MacPerl would be opened in my editor.
>
> I can't find ANY mention of this menu in any of the MacPerl 5 notes, so I
> can't begin to figure out why it doesn't work. I'd love to be able to use
> this Edit/Update feature, because MacPerl's editor leaves a lot to be
> desired.
>
> Thanks in advance for any help!
Pete Keleher's Alpha has a MacPerl mode and is a superb editor for other
uses as well.
http://www.cs.umd.edu/~keleher/alpha.html
If you're interested in a powerful non-WYSIWYG HTML editor, take a look
at our Alpha HTML Mode Intro site...
http://www.tenzo.com/alpha/
Michael O'Henly
Tenzo Design
--
------------------------------
Date: 29 Apr 1997 18:06:39 -0400
From: Tom Fawcett <fawcett@nynexst.com>
Subject: Re: Multi line matching problem. Should be simple?!?
Message-Id: <8jlo61eb68.fsf@nynexst.com>
Pascal Houde <houde@fox.cisti.nrc.ca> writes:
> Here's a small example of what I want to do:
>
> $var="some\nthing"
> $var =~ s/something/blablabla/;
> print $var; # which would print blablabla
>
> But this doesn't work even if I specify $*=1 and/or $/ =""
>
> I don't want to do something like:
> $var =~ s/some\nthing/blablabla/; or $var =~ s/so.*ing/blablabla/s;
> because I never know where the word is cut by a new line and
> I want an accurate search. (so forget about the "." trick and /s)
The best solution is to remove newlines on input, then do the match normally.
If you insist on solving the original problem, you can do:
$var="some\nthing";
$str = "something";
$ugliness = join('\n?', split(//, $str));
$var =~ s/$ugliness/blablabla/;
print $var;
but that's just stupid.
> please email me your reply.
please read the newsgroup you post to.
-Tom
------------------------------
Date: 29 Apr 1997 23:45:47 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Multi line matching problem. Should be simple?!?
Message-Id: <5k617b$8aq@pirate.shu.edu>
Hello -
Pascal Houde <houde@fox.cisti.nrc.ca> writes:
>Here's a small example of what I want to do:
>$var="some\nthing"
>$var =~ s/something/blablabla/;
>print $var; # which would print blablabla
>But this doesn't work even if I specify $*=1 and/or $/ =""
>I don't want to do something like:
>$var =~ s/some\nthing/blablabla/; or $var =~ s/so.*ing/blablabla/s;
>because I never know where the word is cut by a new line and
>I want an accurate search. (so forget about the "." trick and /s)
Perhaps:
$var = "some\nthing something else";
$var =~ s/some\n?thing/blablabla/gs;
even though it uses the dreaded s///s.... :-)
David Black
dblack@icarus.shu.edu
------------------------------
Date: 29 Apr 1997 20:20:35 GMT
From: Ronald.J.Kimball@dartmouth.edu (Chipmunk)
Subject: Re: Network Programming and Sockets
Message-Id: <5k5l6j$5e2$1@dartvax.dartmouth.edu>
In article <5k36a9$8g0@fridge-nf0.shore.net>
nvp@shore.net (Nathan V. Patwardhan) writes:
> : Maybe I'm wrong, but I think that the difference is that defaults are
> : not used as they are elsewhere in Perl.
>
> What defaults are you talking about? Where else are they used in Perl?
Where *aren't* defaults used in Perl?
$_ is the default argument for the lion's share of Perl commands.
print writes to STDOUT by default.
The limit in split is one more than the size of the array being
assigned to, by default.
Permissions in sysopen default to 0666.
The default format for a file is the one with the same name as the
filehandle.
And so it goes...
Chipmunk
------------------------------
Date: 29 Apr 1997 22:36:33 GMT
From: Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
Subject: Re: Notice to antispammers
Message-Id: <5k5t5h$7of$1@news.netusa.net>
Follow-ups redirected.
Rajappa Iyer <rsi@luvent.com> wrote:
> I fail to see why you feel compelled to mail your response. I
> mean, the whole point of the newsgroup is so that all participants can
> discuss relevant topics. Why did people suddenly *have* to send mail?
> Whatever happened to just following up on the newsgroup?
Go to Dejanews. Find articles in news.software.readers with "no-spam"
in the subject. Here is one I posted recently.
------ begin excerpt ------
Subject: Re: Don't use "nospam" address !! Be careful !
lucifer Anonymous Remailer <lucifer@dhp.com> wrote:
>Eli the Bearded <usenet-tag@qz.little-neck.ny.us> wrote:
>> When someone posts with munged
>>headers and says "reply only to the group" I think that is a misuse of
>>usenet.
>How can it be a "misuse" of USENET when that's *precisely* how USENET
>is supposed to be used! Newsgroups are discussion groups: public forums.
Who are you do say how usenet is "supposed" to be used. I, for one,
know of and subscribe to many non-discussion groups on usenet. I even
moderate one. If you tried to post to my group through lucifer, I
would reject your post. rec.arts.erotica used to have that rule (no
postings without a replyable address) as well, but nobody has been
moderating that group for a while.
>When someone POSTS to a newsgroup, respondants POST their reply. (And
>should someone MAIL you, then you MAIL your reply.)
Reminds me of some things Grubor has said.
>Perhaps your provider should subscribe you to news.newusers.questions
>so you can gain a little more understanding of basic netiquette.
I think you meant news.announce.newusers, or didn't you like that
because it is an *announce* group not a *discussion* group.
Anyway, let's go over and look in news.announce.newusers.
: Subject: Rules for posting to Usenet
: From: netannounce@deshaw.com (Mark Moraes)
:
: Original-author: mark@stargate.com (Mark Horton)
: Comment: enhanced & edited until 5/93 by spaf@cs.purdue.edu (Gene Spafford)
: Last-change: 23 Sep 1996 by netannounce@deshaw.com (Mark Moraes)
[some more headers deleted]
: This message describes some of the rules of conduct on Usenet. The rules
: vary depending on the newsgroup.
:
: Some newsgroups are intended for discussions and some for announcements
: or queries. It is not usually a good idea to carry on discussions in
: newsgroups that are designated otherwise. It is never a good idea to
: carry on "meta-discussions" about whether a given discussion is
: appropriate -- such traffic mushrooms until nobody can find articles
: that belong. If you are unhappy with what some user said, send him/her
: mail, don't post it.
Wow. Look at the last sentence in the second paragraph.
Let's look some more.
: From: netannounce@deshaw.com (Mark Moraes)
: Subject: A Primer on How to Work With the Usenet Community
:
: Original-author: chuq@apple.COM (Chuq Von Rospach)
: Comment: enhanced & edited until 5/93 by spaf@cs.purdue.edu (Gene Spafford)
: Last-change: 23 Sep 1996 by netannounce@deshaw.com (Mark Moraes)
[circa 200 lines down]
: Use Mail, Don't Post a Follow-up.
:
: One of the biggest problems we have on the network is that when someone
: asks a question, many people send out identical answers. When this
: happens, dozens of identical answers pour through the net. Mail your
: answer to the person and suggest that they summarize to the network. This
: way the net will only see a single copy of the answers, no matter how many
: people answer the question.
:
: If you post a question, please remind people to send you the answers by
: mail and at least offer to summarize them to the network.
:
: Read All Follow-ups and Don't Repeat What Has Already Been Said.
:
: Before you submit a follow-up to a message, read the rest of the messages
: in the newsgroup to see whether someone has already said what you want to
: say. If someone has, don't repeat it.
:
: Check your return e-mail address and expect responses.
:
: When you post an article, make sure that the return e-mail address in its
: From: or Reply-To: headers is correct, since it is considered
: inappropriate to post an article to which people are unable to respond by
: e-mail. If you are unable to configure your software to include a valid
: return address in your article header, you should include your address in
: a signature at the bottom of your message.
:
: When you post an article, you are engaging in a dialogue, and others may
: choose to continue that dialogue by responding via e-mail. It is not
: courteous to post if you are unwilling to receive e-mail in response.
Gee, that seems to be exactly what I was saying. Hmmm. Maybe if I
look some more I can find someone else that disagrees.
: From: netannounce@deshaw.com (Mark Moraes)
: Subject: Emily Postnews Answers Your Questions on Netiquette
:
: Original-author: brad@clarinet.com (Brad Templeton)
: Last-change: 13 May 1995 by brad@clarinet.com (Brad Templeton)
:
: **NOTE: this is intended to be satirical. If you do not recognize
: it as such, consult a doctor or professional comedian. The
: recommendations in this article should recognized for what
: they are -- admonitions about what NOT to do.
:
[go down around 250 lines]
: Q: What sort of tone should I take in my article?
:
: A: Be as outrageous as possible. If you don't say outlandish things,
: and fill your article with libelous insults of net people, you may not
: stick out enough in the flood of articles to get a response. The more
: insane your posting looks, the more likely it is that you'll get lots
: of followups. The net is here, after all, so that you can get lots of
: attention.
:
: If your article is polite, reasoned and to the point, you may only get
: mailed replies. Yuck!
Well, I can't find any advising that usenet should be posting
only. I conclude that you are either a troll or vastly misinformed.
If you still think you are right, post a reference to exactly what
line or page of what file or book backs up your opinion.
------ end excerpt ------
Elijah
------
suddenly finding archiving all his posts useful for not repeating himself
------------------------------
Date: 29 Apr 1997 22:41:19 GMT
From: Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
Subject: Re: Notice to antispammers
Message-Id: <5k5tef$7p9$1@news.netusa.net>
Paul Ramsey <togtog@writeme.com> wrote responding to Tom:
>> People who use invalid email addresses to thwart spammers have made
>> a decision to shift their problem of wanting to avoid spam from
>> themselves to the persons who want to legitimately correspond with
>> them. They have decided that the inconvenience to spammers
>> outweighs the inconvenience to legitimate users, and they have
>> decided on this without regard to the legitimate users.
>I for one, think Tom is an asshole.
...
>I pay $20 a month for MY eMail, Tom doesn't pay me
>a penny for My eMail address.
How much do you pay Tom for the answers he provides to questions in
this group?
Elijah
------
totally bogus addresses will get your posts rejected in the group I moderate
------------------------------
Date: Tue, 29 Apr 1997 12:40:37 -0500
From: Kerr Tung <td24246@tafmss4.bgm.link.com>
To: "J"V|"i<e BELLET" <jbellet@ifhamy.insa-lyon.fr>
Subject: Re: Passing parameters between 2 scripts using Perl 5.003
Message-Id: <33663295.41C6@tafmss4.bgm.link.com>
Jirtme BELLET wrote:
>
> I have written 2 scripts (that use the CGI module), say one.cgi and
> two.cgi.
>
> In one.cgi, to run two.cgi (that requires an argument), I've included
> the following line :
> exec "two.cgi $my_arg";
>
> In two.cgi, I get the argument in the following line :
> $my_arg=$ARGV[0];
>
> It worked fine with Perl 5.002b, but it doesn't work anymore with Perl
> 5.003 !
>
> Please help !
> ---------------------------
> jbellet@ifhamy.insa-lyon.fr
Try: print `two.cgi $my_arg`;
This worked for me under version 5.003 with EMBED
------------------------------
Date: Sun, 27 Apr 1997 10:53:19 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: cc <tejedor@nauta.es>
Subject: Re: Passwork perl
Message-Id: <Pine.GSO.3.96.970427105200.21809I-100000@kelly.teleport.com>
On 26 Apr 1997, cc wrote:
> Hello, I a program that when you write a work in a form, this program ask
> in a database file and if this work ask right pass you, and is not right
> denied pass, the database file is very little.
I believe you're looking to require a username and a password for access
to a web page. This feature is built into most servers; check your
server's manuals. Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 29 Apr 1997 22:09:26 GMT
From: I-hate-cyber-promo@man.ac.uk (A. Deckers)
Subject: Re: Perl auto-replier
Message-Id: <slrn5mcscd.ba3.I-hate-cyber-promo@nessie.mcc.ac.uk>
In comp.lang.perl.misc,
Ronald.J.Kimball@dartmouth.edu wrote:
[...]
>P.S. I'm afraid I've never seen a posting by Larry - that two week
>thing, again.
That's the point. Tom was trying to explain that the flood of stupid
questions have driven Larry Wall, and others too, away from the
newsgroup. This makes the newsgroup a poorer place than it would
otherwise be, and all because a bunch of morons couldn't be bothered to
do their homework before posting.
In the current circumstances, you will not see a post by Larry Wall in
this group, no matter how long you hang out here.
--
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl archive: <URL:http://www.perl.com/CPAN/>
>>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<
------------------------------
Date: 29 Apr 1997 20:47:43 GMT
From: klassa@gumby.ivc.com (John Klassa)
Subject: Re: Perl auto-replier
Message-Id: <5k5mpf$2j2$1@vortex.ivc.com>
On 29 Apr 1997 16:40:42 GMT, Tom Christiansen <tchrist@mox.perl.com> wrote:
->When >90% of anything you read is dreck, you tire of suffering
->fools gladly. This newsgroup is no longer worth wasting time
->reading, or contributing to.
and then:
->It got to be too much for him. When something's too much for him,
->he bails. I, on the other hand, got pissy and tried to stick with it.
->I was wrong, twice, but I'm through with those mistakes. I go now to
->join Larry in that great Perl heaven far removed from Usenet.
Looks like it's time for a moderated newsgroup... We can't afford to keep
losing demigods. Whatever your personal opinion of Tom might be, he's done
a _lot_ for the perl community, and his posts have been invaluable to many.
So... Are there thoughts on whether to start a moderated group <he says,
ducking...>?
John
--
John Klassa (W) klassa@ivc.com (H) klassa@ipass.net
<>< http://www.ivc.com/~klassa http://www.ipass.net/~klassa
(pgp fingerprint: 3C EE B4 02 40 76 DA 80 F1 96 90 FD 7A 1D 7D 53)
------------------------------
Date: 29 Apr 1997 22:50:04 GMT
From: Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
Subject: Re: Perl auto-replier
Message-Id: <5k5tus$7qr$1@news.netusa.net>
rga <rga@io.com> wrote:
>Ronald.J.Kimball@dartmouth.edu (Chipmunk) wrote:
>>Here's a great idea for a perl script.
> Sure caused a great heat in the news group
Nah. That has been simmering for a while. With Tom gone, the
script will be doubly needed.
> I thought of ... hmmm .. maybe a group
> called <comp.lang.perl.newbie> ..
> But, then who would answer the questions ?
Based on all the newbies who miss comp.unix.shell, etc, and
go straight to alt.unix.wizards, I doubt greenhorns are any good
at not polluting groups with stuff found in the FAQs.
Elijah
------
maybe if they were "starting-out" groups the name would not drive them away
------------------------------
Date: Tue, 29 Apr 1997 22:43:26 GMT
From: jason@cimedia.com (Jason Bodnar)
Subject: Re: Perl auto-replier
Message-Id: <33667915.722187526@news.onr.com>
I-hate-cyber-promo@man.ac.uk (A. Deckers) wrote:
>In the current circumstances, you will not see a post by Larry Wall in
>this group, no matter how long you hang out here.
And that's really too bad. I've been following c.l.p.m. for about two
years and I've never seen a post by Larry. My grandchildren will be
disappointed.
--
Jason C. Bodnar
jason@cimedia.com
Internet Programmer
Cox Interactive Media
------------------------------
Date: 29 Apr 1997 14:19:52 -0700
From: Brett McCormick <brett@speedy.speakeasy.org>
Subject: Re: PERL to dBase dbf
Message-Id: <7vu3kpmsqv.fsf@speedy.speakeasy.org>
You might want to check out the Xbase module on CPAN. It doesn't
write files, but it does read them.
"keys101" <keys101@wgn.net> writes:
> I have got my PERL script up to the point where the form fill in values are
> held by a variable as a line of comma separated text. I need to pass this
> text value from the variable to dBase format output.
>
> Can you offer these few lines of code or code elements or direct me to a
> site that would have an example of PERL script for converting parsed form
> fill in data to dBase II or III file format?
------------------------------
Date: Tue, 29 Apr 1997 16:51:18 -0600
From: rferraro@ci.rnp.br
To: dougm@opengroup.org,rferraro@ci.rnp.br
Subject: rferraro@ci.rnp.br
Message-Id: <862350155.18634@dejanews.com>
Hi Folks,
Is it normal to compile dynaloader static ?
Well, if so, could you please help me to do "make test" without errors ?
Some day I could...
When doing "make test" I receive "failed 9/94 tests, 90,43% okay", and
all the errors looks similar as for example:
--------------------8<-----------------
at ../lib/Fcntl.pm line 67
BEGIN failed--compilation aborted at ./lib/sdbm.t line 16.
FAILED on test 0
lib/socket.....Can't load '../lib/auto/Socket/Socket.so' for module
Socket: ld.so.1: ./perl: fatal: relocation error: symbol not found: main:
referenced in ../lib/auto/Socket/Socket.so at ../lib/DynaLoader.pm line
140.
--------------------8<-----------------
... changing just the lib file.
Other extensions as pg95perl5 and GD-1.14 also couldn't compile because
of similar error messages.
I saw in $INSTALL_DIR/perl5.003/INSTALL that some dynamic problems may
occurr in Sparc (station5 mine) plus Solaris 2.4, and these problems may
be solved checking the LD_LIBRARY_PATH (checked and no results...) or
adding B<-B/usr/ccs/bin> to $ccflags, $ldflags and $lddlflags, but in
which files should I make these changes ?
Doug MacEachern <dougm@opengroup.org> could solve a similar problem
creating a variable called PERL5LIB pointing to his perl5 lib directory, I
tryed this also, but without results.
any suggestion will be appreciated ! thanks !
best regards, Ricardo.
PS: Please send a cc to my mail address because I do not access usenet
easily ok ? thanks.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 29 Apr 1997 22:25:42 GMT
From: q8e192@ugrad.cs.ubc.ca (Henry Avatar Chan)
Subject: Shared Libs with Compiler
Message-Id: <5k5sh6$f94$1@nnrp.cs.ubc.ca>
Has anyone got the Perl compiler to work on Free or NetBSD
using its dynamic lib.
Actually how do I build a dynamic lib in FreeBSD?
thx in advance,
Henry
q8e192@ugrad.cs.ubc.ca
------------------------------
Date: Tue, 29 Apr 1997 21:15:31 GMT
From: jason@cimedia.com (Jason Bodnar)
Subject: Turn array into hash then import into another namespace
Message-Id: <3366630e.716548325@news.onr.com>
I have a list of ordered fieldnames in a array as such:
@fields = qw(name address phone age);
I need to be able to refer to 'name' and know that it is element 0.
Ideally, I'd like to import all this into another namespace so
$Fields::name = 0; $Fields::address = 1.
I thought I could do something with map like:
@junk = map eval 'package Fields;' . "${$_} = ?", @fields;
but I have no idea to get the index of an individual element inside
map. (Plus I'm unsure of the rest of the code.)
Am I on the rigth track? Is there a better way to do this?
--
Jason C. Bodnar
jason@cimedia.com
Internet Programmer
Cox Interactive Media
------------------------------
Date: 29 Apr 1997 23:33:52 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Turn array into hash then import into another namespace
Message-Id: <5k60h0$6t1@pirate.shu.edu>
Hello -
jason@cimedia.com (Jason Bodnar) writes:
>I have a list of ordered fieldnames in a array as such:
>@fields = qw(name address phone age);
>I need to be able to refer to 'name' and know that it is element 0.
>Ideally, I'd like to import all this into another namespace so
>$Fields::name = 0; $Fields::address = 1.
>I thought I could do something with map like:
>@junk = map eval 'package Fields;' . "${$_} = ?", @fields;
>but I have no idea to get the index of an individual element inside
>map. (Plus I'm unsure of the rest of the code.)
A few ideas:
my @fields = qw( name address phone age );
my $count = 0;
foreach (@fields) { ${"Fields::$_"} = $count++ }
# (Note that you can generate the correct expression using
# a symbolic reference, rather than eval.)
# You could also do this, except that it throws away the
# return value of map, which isn't good, so don't do this....
#
# map { ${"Fields::$_"} = $count++ } @fields;
# You could also create a hash, instead of a namespace:
$count = 0;
my %Fields = map { $_, $count++ } @fields;
# Now $Fields{address} is 1, etc.
David Black
dblack@icarus.shu.edu
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
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 394
*************************************