[14040] in Perl-Users-Digest
Perl-Users Digest, Issue: 1450 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 21 12:13:50 1999
Date: Sun, 21 Nov 1999 09:11:27 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <943204252-v9-i1450@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 21 Nov 1999 Volume: 9 Number: 1450
Today's topics:
Re: alias a mailer <lr@hpl.hp.com>
Autoresponder <markh@argolink.net>
Case Change Text UPPER CASE to Title Case? <rjt@dviews.com>
Re: Case Change Text UPPER CASE to Title Case? (Simon Cozens)
Re: Case Change Text UPPER CASE to Title Case? (Abigail)
Re: dynamic perl (Brett W. McCoy)
Re: Help w/ DBI (Adam Levenstein)
Re: Help w/ DBI (Adam Levenstein)
How do I fill in the FW-1 (checkpoint) firewall user/pa <h.hassler@xpoint.at>
Re: How do I take all of the email addresses out of an (Simon Cozens)
Re: How do I take all of the email addresses out of an <lr@hpl.hp.com>
Re: How do I take all of the email addresses out of an (Tad McClellan)
Re: How do I take all of the email addresses out of an <poohba@io.com>
Re: How do I take all of the email addresses out of an <kbandes@home.com>
Re: How to Capitalize the first letter of a word an or (Abigail)
Re: How to Capitalize the first letter of a word an or <lr@hpl.hp.com>
Re: how to send data back and forth over sockets lee.lindley@bigfoot.com
Re: HTML format (Abigail)
Re: New dialect of perl: xperl (or reinventing perl, or (Abigail)
Re: newbie : looking for a script that reads all the f (Simon Cozens)
Re: Perl and Linux (Abigail)
Re: Perl programming sytle <votemand@earthlink.net>
Re: Perl Security <flavell@mail.cern.ch>
Re: Q: How to read command-line arguments. Not in FAQ. <lr@hpl.hp.com>
Re: Q: How to read command-line arguments. Not in FAQ. lee.lindley@bigfoot.com
Re: Q: How to read command-line arguments. Not in FAQ. (Simon Cozens)
Re: sendmail pipe lee.lindley@bigfoot.com
Re: sendmail pipe <dukat@flash.net>
Shared variables between perl and embedded sh scripts ? otrcomm@wildapache.net
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 21 Nov 1999 08:37:29 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: alias a mailer
Message-Id: <MPG.12a1bfa1f417602198a248@nntp.hpl.hp.com>
In article <slrn83fmt1.cna.mgjv@localhost.localdomain> on 21 Nov 1999
11:44:46 GMT, Martien Verbruggen <mgjv@localhost.localdomain> says...
> On Sat, 20 Nov 1999 09:41:30 GMT,
> Fox <hry@163.net> wrote:
...
> > >> 554 |/www/fox/test.pl... unknown mailer error 126
> > >That's an error from your MTA, not from perl
> > where to change to slove this error?
>
> Sorry.. I don't understand. slove is not english, and I can't, even
> trying very hard, come up with a meaning for it, allowing for many sorts
> of typos and/or misspellings. Do you mean 'get rid of'?
How hard is 'trying very hard'? I bet you didn't try creating an
anagram signature, then running it over /usr/dict/words? You might have
come up with a two-letter metathesis such as 'solve'.
Of course, that is nowhere near as imaginative as Jonathan Stowe's
"sl[oth gl]ove.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sun, 21 Nov 1999 08:49:00 -0600
From: Mark Henderson <markh@argolink.net>
Subject: Autoresponder
Message-Id: <3838065B.97FA3364@argolink.net>
Greetings:
I have aa script that gathers information from the user, pokes that info
into a mSQL database and then servers up a confirmation for the user.
Currently, we do not request their email address, but will be adding
that field. I do not know how to write an autoresponder that will mail
the contents of their input back to them upon confirmation.
I would like to write an autoresponder that can accept an array of email
addresses so that I can email the confirmation back to them and send it
on to an administrator in my organization. Any advice, code, or
resources that you know of are greatly appreciated.
Direct replies are greatly appreciated as well mark@sitesolver1.com
Thanks
------------------------------
Date: Sat, 20 Nov 1999 11:55:52 -0600
From: Rick Trankle <rjt@dviews.com>
Subject: Case Change Text UPPER CASE to Title Case?
Message-Id: <3836E0A8.A657D9CF@dviews.com>
Is there a routine for changing uppercase text between two markers to
title case (Upper/Lower)?
ą SOME TEXT TO CHANGE ź
to this:
ą Some Text To Change ź
Rick
--
____________________________________________________
Rick Trankle * DataViews
rjt@dviews.com Information Management
773.777.9296 * Certified Infobase Engineer
FAX 777.9293 Folio Views Consultant
*
____________________________________________________
------------------------------
Date: 21 Nov 1999 16:58:32 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: Case Change Text UPPER CASE to Title Case?
Message-Id: <slrn83g95o.qos.simon@othersideofthe.earth.li>
Rick Trankle (comp.lang.perl.misc):
>Is there a routine for changing uppercase text between two markers to
>title case (Upper/Lower)?
perldoc -q 'capitali(?:s|z)e'
--
"A word to the wise: a credentials dicksize war is usually a bad idea on the
net."
(David Parsons in c.o.l.development.system, about coding in C.)
------------------------------
Date: 21 Nov 1999 11:04:34 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Case Change Text UPPER CASE to Title Case?
Message-Id: <slrn83g9na.m2v.abigail@alexandra.delanet.com>
Rick Trankle (rjt@dviews.com) wrote on MMCCLXXII September MCMXCIII in
<URL:news:3836E0A8.A657D9CF@dviews.com>:
[] Is there a routine for changing uppercase text between two markers to
[] title case (Upper/Lower)?
[]
[] ą SOME TEXT TO CHANGE ź
[]
[] to this:
[]
[] ą Some Text To Change ź
s((?<=ą)(.*?)(?=ź))(local $_ = "\L$1"; s(\b(\w))(\U$1)g; $_)eg;
Abigail
--
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT
-----------== 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, 21 Nov 1999 14:27:54 GMT
From: bmccoy@news.lan2wan.com (Brett W. McCoy)
Subject: Re: dynamic perl
Message-Id: <slrn83g0in.hb7.bmccoy@dragosani.lan2wan.com>
Also sprach Les Neste <lesneste@mindspring.com>:
>I just downloaded what I think is Perl 5.004 from CPAN and the readme
>refers to it as 'dynamic perl'. Can anyone tell me what is the
>relationship between dynamic perl and regular perl, or are they the
>same thing?
I think it refers to how the executable was linked -- dynamically or
statically.
--
Brett W. McCoy
http://www.lan2wan.com/~bmccoy/
-----------------------------------------------------------------------
You will think of something funnier than this to add to the fortunes.
------------------------------
Date: Sun, 21 Nov 1999 15:20:16 GMT
From: che@worker.com (Adam Levenstein)
Subject: Re: Help w/ DBI
Message-Id: <38380d9d.325562561@news.psu.edu>
On 21 Nov 1999 01:29:25 -0600, abigail@delanet.com (Abigail) wrote:
>Adam Levenstein (che@worker.com) wrote on MMCCLXXIII September MCMXCIII
>in <URL:news:3837931e.294422215@news.psu.edu>:
>()
>() Could someone take a look and let me know what's wrong? I'd appreciate
>() it.
>()
>()
>() #!/usr/bin/perl
>
>There's no -w.
>There's no -T.
>There's no use strict;
>There's no use CGI;
>
>
>
>No need to continue.
OK, I put those in, still no dice.
------------------------------------------------------
"You must be in love with the devil. You probably
sold your soul to him to learn how to play the banjo.
May God help you!"
- "Bishop" Norman Boyd
------------------------------
Date: Sun, 21 Nov 1999 15:43:33 GMT
From: che@worker.com (Adam Levenstein)
Subject: Re: Help w/ DBI
Message-Id: <383812d3.326875419@news.psu.edu>
On 21 Nov 1999 12:57:16 -0000, Jonathan Stowe
<gellyfish@gellyfish.com> wrote:
>> $dbh->do("INSERT INTO sublets VALUES ('$loc, $roomies, $ownroom),
>> $rent, $deposit, $utilities, $parking, $pets, $name, $email, $phone,
>> $description')", undef, $dbh->quote("number"), $dbh->quote("name"));
>>
>
>The first parameter to do() does not appear to be a correct SQL statement
>you appear to b trying to inserting a single value your row here - I
>dont understand what those two single quotes and the unmatched ) after
>$ownroom are doing - I would recommend that you check the success of
>the do() and print $dbh->errstr if it fails :
The first ")" is a typo. Basically I'm trying to input a set of values
from the form (hence the $variables) and add it to the db. "undef" and
onward I got from a DBI page; I'm not sure if it's necessary.
Adam
------------------------------------------------------
"You must be in love with the devil. You probably
sold your soul to him to learn how to play the banjo.
May God help you!"
- "Bishop" Norman Boyd
------------------------------
Date: Sun, 21 Nov 1999 17:38:18 +0100
From: Hannes Hassler <h.hassler@xpoint.at>
Subject: How do I fill in the FW-1 (checkpoint) firewall user/passwd with LWP?
Message-Id: <38381FFA.C325B25B@xpoint.at>
Does anybody know how I can handle the user/password authorization
from Checkpoint FW-1 firewall?
As I understand the UserAgent module is
used for filling in forms given in the HTML-document.
However, the checkpoint firewall can be set up that it sends you
(via HTTP) a request to authenthicate in a separate small window.
Any feedback here would be very helpful. (please also email)
cheers
Hannes
--
Hannes Hassler
Brigittenauerlände 164-168/2/74
A-1200 Wien
+43-1-3744227
h.hassler@xpoint.at
------------------------------
Date: 21 Nov 1999 15:02:00 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: How do I take all of the email addresses out of an email? 2 of 2
Message-Id: <slrn83g2b8.qos.simon@othersideofthe.earth.li>
Poohba (comp.lang.perl.misc):
> if($name =~ /@/i) {
And I'll meet you @8pm.
Luser spambot fuckwits.
--
Testing can show the presense of bugs, but not their absence.
-- Dijkstra
------------------------------
Date: Sun, 21 Nov 1999 06:56:47 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: How do I take all of the email addresses out of an email? 2 of 2
Message-Id: <MPG.12a1a806835e1d6798a247@nntp.hpl.hp.com>
In article <Pine.LNX.4.10.9911210635410.24232-100000@fnord.io.com> on
Sun, 21 Nov 1999 06:41:58 -0500, Poohba <poohba@io.com> says...
> #!/usr/local/bin/perl -w
>
> $file = "email.txt";
> $email = "email.dat";
>
> open (FILE, "$file") || die "Can't open $file: $!\n";
> @words = <STDIN>;
> close(FILE);
>
> open (NEWFILE, ">$email") || die "Can't open $email: $!\n";
>
> foreach $word (@words) {
> ($name) = split(/\w/, $word);
> chop($name);
> if($name =~ /@/i) {
> print NEWFILE "$name/n";
> }
> }
> close(NEWFILE);
Even in response to yourself, do you think it appropriate to post code
that you haven't tested? There are two egregious errors here, and a
host of minor ones.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sun, 21 Nov 1999 05:31:02 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How do I take all of the email addresses out of an email? 2 of 2
Message-Id: <slrn83fif6.67i.tadmc@magna.metronet.com>
On Sun, 21 Nov 1999 06:41:58 -0500, Poohba <poohba@io.com> wrote:
>#!/usr/local/bin/perl -w
>
>$file = "email.txt";
>$email = "email.dat";
>
>open (FILE, "$file") || die "Can't open $file: $!\n";
^ ^
^ ^
Those are useless.
>@words = <STDIN>;
>close(FILE);
>
>open (NEWFILE, ">$email") || die "Can't open $email: $!\n";
>
>foreach $word (@words) {
> ($name) = split(/\w/, $word);
^^^^
split() _discards_ the delimiters, so you are ignoring all of the
"word characters". I don't think you want to be doing that...
You are getting a bunch of non-word chars (and probably a bunch of
empty strings too), then throwing away all but the first one.
foreach my $part (split ' ', $word) {
print "'$part' looks like an email address\n" if $part =~ /@/;
}
But it is legal to have spaces in an email address, which will
break that code...
And you can have at-signs that are not part of an email address,
which will break that code...
> chop($name);
chomp($word); # before the split()
> if($name =~ /@/i) {
^
^
That is useless (unless you want to match both an upper and lower
case at-sign...)
> print NEWFILE "$name/n";
> }
>}
>close(NEWFILE);
>
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 21 Nov 1999 10:19:59 -0500
From: Poohba <poohba@io.com>
To: Larry Rosler <lr@hpl.hp.com>
Subject: Re: How do I take all of the email addresses out of an email? 2 of 2
Message-Id: <Pine.LNX.4.10.9911211019440.27355-100000@fnord.io.com>
I have tested this and i get nothing but a hung system.
On Sun, 21 Nov 1999, Larry Rosler wrote:
> In article <Pine.LNX.4.10.9911210635410.24232-100000@fnord.io.com> on
> Sun, 21 Nov 1999 06:41:58 -0500, Poohba <poohba@io.com> says...
> > #!/usr/local/bin/perl -w
> >
> > $file = "email.txt";
> > $email = "email.dat";
> >
> > open (FILE, "$file") || die "Can't open $file: $!\n";
> > @words = <STDIN>;
> > close(FILE);
> >
> > open (NEWFILE, ">$email") || die "Can't open $email: $!\n";
> >
> > foreach $word (@words) {
> > ($name) = split(/\w/, $word);
> > chop($name);
> > if($name =~ /@/i) {
> > print NEWFILE "$name/n";
> > }
> > }
> > close(NEWFILE);
>
> Even in response to yourself, do you think it appropriate to post code
> that you haven't tested? There are two egregious errors here, and a
> host of minor ones.
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com
>
>
* Web Page Designs *
/ poohba@io.com | www.io.com/~poohba\
---------------------------------------
\ For info about me send message with /
* subject "send file help" *
------------------------------
Date: Sun, 21 Nov 1999 16:35:26 GMT
From: Kenneth Bandes <kbandes@home.com>
Subject: Re: How do I take all of the email addresses out of an email? 2 of2
Message-Id: <38381F7B.7459D1C1@home.com>
Poohba wrote:
> I have tested this and i get nothing but a hung system.
>
> On Sun, 21 Nov 1999, Larry Rosler wrote:
>
> > In article <Pine.LNX.4.10.9911210635410.24232-100000@fnord.io.com> on
> > Sun, 21 Nov 1999 06:41:58 -0500, Poohba <poohba@io.com> says...
> > > #!/usr/local/bin/perl -w
> > >
> > > $file = "email.txt";
> > > $email = "email.dat";
> > >
> > > open (FILE, "$file") || die "Can't open $file: $!\n";
> > > @words = <STDIN>;
Did you mean @words = <FILE>? Rather than a hung system, you probably
have a program waiting for input.
> > > close(FILE);
[more stuff]
Ken Bandes
------------------------------
Date: 21 Nov 1999 08:11:38 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: How to Capitalize the first letter of a word an or whole word
Message-Id: <slrn83fvj2.m2v.abigail@alexandra.delanet.com>
Slim (ShadeyGradey@linuxfreak.com) wrote on MMCCLXXIII September MCMXCIII
in <URL:news:3837f85f.33503200@news.inet4u.com>:
<> I finally figured out how to capitalize the whole word I used
<> $word = "myword";
<> $word =~ tr/[a-z]/[A-Z]/;
<> and got ... MYWORD
Yeah, sure. Whatever. Just keep refusing to read the manual.
<> now I need to learn how to change just the first letter to capital...
Don't bother reading the manual or the FAQ. That's for wussies.
Real (wo)men do it the hard way. Of course, they don't ask Usenet
for help either.
s/just the first letter/capital/;
HTH. HAND.
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
-----------== 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, 21 Nov 1999 06:42:22 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: How to Capitalize the first letter of a word an or whole word
Message-Id: <MPG.12a1a4a734ddf29698a246@nntp.hpl.hp.com>
In article <3837f85f.33503200@news.inet4u.com> on Sun, 21 Nov 1999
13:54:24 GMT, Slim <ShadeyGradey@linuxfreak.com> says...
> I finally figured out how to capitalize the whole word I used
> $word = "myword";
> $word =~ tr/[a-z]/[A-Z]/;
> and got ... MYWORD
Do you think it was necessary to translate '[' to '[' and ']' to ']'?
:-)
The uc function does this translation in a locale-dependent way.
> now I need to learn how to change just the first letter to capital...
perldoc -f ucfirst
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 21 Nov 1999 16:24:41 GMT
From: lee.lindley@bigfoot.com
Subject: Re: how to send data back and forth over sockets
Message-Id: <8196c9$qmr$1@rguxd.viasystems.com>
Alan J. Flavell <flavell@mail.cern.ch> wrote:
:>On Sat, 20 Nov 1999, Matthew H. Devlin III blurted out without any
:>referent:
:>> Obviously the code that I need will be seperate from anything that relates to
:>> the tk portion.
:>Oh, obviously. I detected a perity error, too.
What is it with you guys? And what is "perity" error anyway? I
understood his question the first time just like Kraken did. 6
responses now and not one that addresses the request: some examples
of socket communication.
Matthew, it would be worth your while to go buy the Perl Cookbook.
There are some very nice example programs in there that use
socket communication.
You can also read `perldoc perlipc`. There is at least one example
in there of connecting a socket to a port on a remote server.
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: 21 Nov 1999 08:12:54 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: HTML format
Message-Id: <slrn83fvlf.m2v.abigail@alexandra.delanet.com>
Lenny grosso (grossole@slu.edu) wrote on MMCCLXXIII September MCMXCIII in
<URL:news:817kri$368s$1@systems2.slu.edu>:
?? How do i make my perl script send an email in html format instead of text? i
?? am using sendmail and perl 5.003
Instead of printing text, you print HTML.
And consider upgrading your perl.
Abigail
--
tie $" => A; $, = " "; $\ = "\n"; @a = ("") x 2; print map {"@a"} 1 .. 4;
sub A::TIESCALAR {bless \my $A => A} # Yet Another silly JAPH by Abigail
sub A::FETCH {@q = qw /Just Another Perl Hacker/ unless @q; shift @q}
-----------== 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: 21 Nov 1999 08:22:30 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: New dialect of perl: xperl (or reinventing perl, or perl-izing jpython)
Message-Id: <slrn83g07d.m2v.abigail@alexandra.delanet.com>
Conrad Schneiker (schneiker@jump.net) wrote on MMCCLXXIII September
MCMXCIII in <URL:news:818od1$34p$1@news.jump.net>:
\\ Has anyone (in recent times) given any serious thought to what a new
\\ dialect/species of perl ought to look like if (full) backwards compatibility
\\ were not required?
Two things: first class filehandles, and usuable OO.
\\ Of course there should be one exception here: full backwards compatibility
\\ with the perl design philosophy should be required (i.e. make different
\\ things look different, there's more than one way to improve it, try doing
\\ what I might mean, and so on).
\\
\\ For purposes of discussion, let's designate this dialect/species xperl (for
\\ perl based on eXperience with PERL).
\\
\\ If one of the xperl design aims was to facilitate compilation into java byte
\\ codes (like jpython) and to facilitate exploitation of java classes/features
\\ (in particular GUI stuff and bean stuff) then what additional features, if
\\ any, would be desirable? In other words, how could the aims of JPL
\\ (java-perl lingo) be better served if backwards compatibility on one hand
\\ and lack of a first class perl-to-java bytecode compiler on the other had
\\ were not troublesome constraints?
I kind of fail to see the benefits of any perl-to-java bytecode compiler.
What are those platforms that have been running perl for eons, but for
which no Java VM is available going to do?
Not to mention that Perl seems to suffer less from the problem that
programs tend to be VM specific.
Furthermore, Perl is considered to be "slow", and it often is compared
to C (depending on the program). Java certainly ain't fast either.
What good will it be to implement a Perl run-time environment in Java?
You'll end up with the slowness of the opcode dispatching, combined with
the slowness of the Java VM.
\\ I've only seen a fraction of the considerable amount of discussion and
\\ debate about the comparative strengths and weakness of perl relative to
\\ other languages on this newsgroup, but almost nothing about the
\\ possibilities of reinventing an even better perl, which is something that
\\ those involved in such discussions might be able to shed some useful light
\\ on.
Unless you have people who are willing to do the work of reimplementing
Perl, would there be much use in spending time discussing the details
of this hypothetical language?
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== 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: 21 Nov 1999 16:59:39 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: newbie : looking for a script that reads all the file names in the directory
Message-Id: <slrn83g97r.qos.simon@othersideofthe.earth.li>
Slim (comp.lang.perl.misc):
>@files = grep(/\./,readdir(DIR));
What?!
--
> And how are people supposed to find out about man pages?
`man man' ?
- Janet McKnight, IRL.
------------------------------
Date: 21 Nov 1999 08:25:54 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Perl and Linux
Message-Id: <slrn83g0do.m2v.abigail@alexandra.delanet.com>
Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCCLXXIII September
MCMXCIII in <URL:news:818ork$a0k$1@gellyfish.btinternet.com>:
** On Sun, 21 Nov 1999 09:21:13 GMT Henner Graubitz wrote:
** >
** > Is it possible that these people can send me their httpd.conf,
** > srm.conf and access.conf as an attachement to my e-mail address
**
** Tough. Ask in comp.infosystems.www.servers.unix. I am not about to send
** a configuration file from my machine to someone I dont know.
Well, since none of the stuff in the .conf files is OS-specific, and
it all has to do with site politics, you might as well send him the
.conf-dist files.
Of course, it has nothing at all to do with Perl. Not that it's going
to bother anymore, as Henner found a place in my killfile.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
-----------== 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, 21 Nov 1999 11:44:56 -0500
From: Michael Fischer <votemand@earthlink.net>
Subject: Re: Perl programming sytle
Message-Id: <38382163.BCAD6A26@earthlink.net>
Jonathan Stowe wrote:
>
> On Sat, 20 Nov 1999 16:50:35 -0500 Michael Fischer wrote:
> >
> > BTW, despite its reputation, this is one of the most generous
> > and helpful newsgroups around. Thanks to all the regulars.
> >
>
> Mind if we quote you on that ?
Not at all, as long as you live up to it. :-)
--
Michael
------------------------------
Date: Sun, 21 Nov 1999 15:01:48 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Perl Security
Message-Id: <Pine.HPP.3.95a.991121145554.23568D-100000@hpplus01.cern.ch>
On 21 Nov 1999, Jonathan Stowe wrote:
> You will probably want to ask the appropriate comp.infosystems.www.servers.*
Yup, or c.i.w.authoring.cgi. Couldn't resist a quick retort, though...
> alternatively you
> should store the files somewhere where the web server doe not have
> access to.
I think you mean "somewhere that the server would not be willing to
serve out to the WWW" (outside of the server's document root). If
the server doesn't "have access" to it, then it isn't going to be a lot
of use (at least, not unless the server-side process runs in a different
environment than the server itself, which is a whole new topic).
> Either way this is not a Perl issue.
Agreed.
------------------------------
Date: Sun, 21 Nov 1999 06:33:31 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Q: How to read command-line arguments. Not in FAQ.
Message-Id: <MPG.12a1a297b524207b98a245@nntp.hpl.hp.com>
In article <818s3f$6et$1@CC860922-A.home.com> on Sun, 21 Nov 1999
13:33:36 GMT, Phil <flick@CC860922-A.home.com> says...
> You'd think this would be in the documentation or the FAQ, but so far
> as I can tell it isn't:
It probably should be mentionedin perlrun, but I can't find it.
> Question: How do I access the command line arguments?
> They're not in @_.
They are in @ARGV. See perlvar.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 21 Nov 1999 16:12:52 GMT
From: lee.lindley@bigfoot.com
Subject: Re: Q: How to read command-line arguments. Not in FAQ.
Message-Id: <8195m4$pq8$2@rguxd.viasystems.com>
Phil <flick@CC860922-A.home.com> wrote:
:>Question: How do I access the command line arguments?
:>They're not in @_. For instance, this program:
Hmm. I went looking for it and it wasn't all that easy to find.
It is buried in `perldoc perlvar`.
They are in the array @ARGV. Note that $ARGV[0] is the first
argument to the program, not the program name itself which might
be what you would expect coming from C.
You might also want to look at
`perldoc Getopt::Long` and `perldoc Getopt::Std`.
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: 21 Nov 1999 16:57:02 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: Q: How to read command-line arguments. Not in FAQ.
Message-Id: <slrn83g92u.qos.simon@othersideofthe.earth.li>
lee.lindley@bigfoot.com (comp.lang.perl.misc):
>:>Question: How do I access the command line arguments?
>:>They're not in @_. For instance, this program:
>Hmm. I went looking for it and it wasn't all that easy to find.
>It is buried in `perldoc perlvar`.
You realised they were going to be in some internal variable, yes?
Where did you look first, perltoot? perlmodlib?
--
It is illegal to drive more than two thousand sheep down Hollywood
Boulevard at one time.
------------------------------
Date: 21 Nov 1999 15:54:44 GMT
From: lee.lindley@bigfoot.com
Subject: Re: sendmail pipe
Message-Id: <8194k4$pq8$1@rguxd.viasystems.com>
Eric Miller <dukat@flash.net> wrote:
:>lee.lindley@bigfoot.com wrote:
:>>
:>> You should check the return on that close(MAIL) just like
:>> you check the return on the open().
:>Thank you. I can't tell you hoq much your advice is appreciated.
If you are being sincere, then you are welcome. If not, then
respond with more information about what it is in the FAQ that
you find confusing. Quote a line from the FAQ and ask about
it. Otherwise, we are just shooting in the dark about what
you don't understand. The FAQ is clear to me, but I have different
prior knowledge than you do.
My advice was spot-on given the way your question was phrased,
and I did not intend for it to be condescending. You need to
check the return on the close() because of the way pipe opens
work.
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: Sun, 21 Nov 1999 16:39:51 GMT
From: Eric Miller <dukat@flash.net>
Subject: Re: sendmail pipe
Message-Id: <38381F3A.18750FC5@flash.net>
lee.lindley@bigfoot.com wrote:
>
> Eric Miller <dukat@flash.net> wrote:
> :>lee.lindley@bigfoot.com wrote:
> :>>
> :>> You should check the return on that close(MAIL) just like
> :>> you check the return on the open().
>
> :>Thank you. I can't tell you hoq much your advice is appreciated.
>
> If you are being sincere, then you are welcome. If not, then
> respond with more information about what it is in the FAQ that
> you find confusing. Quote a line from the FAQ and ask about
> it. Otherwise, we are just shooting in the dark about what
> you don't understand. The FAQ is clear to me, but I have different
> prior knowledge than you do.
It was sincere. I have a script now that will show the error messages
from sendmail, but only since I wrote header out first. Still trying
to get the output of sendmail written to a file, I thought it would
be something like this:
open(LOG, ">>error.log") or die("Can't open log file, $!");
unless (open STDERR, ">>&" . LOG) {
print "* Can't redirect STDERR: $!\n";
exit;
}
But not sure if that's what I really need to do. I am not sure
if sendmail's output is coming from STDIN or STDERR or what.
The "unless" statement is from a snippet I got somewhere,
and I read the FAQ which said you had to open the filehandle
you wanted to dup in the same mode, hence the ">>&" for appending
to the LOG file.
Haven't had a lot of time recently to fiddle around with this,
so that's why I simply thanked you. I still don't know exactly
what to do to let you know how its going.
Eric Miller
dukat@flash.net
------------------------------
Date: Sun, 21 Nov 1999 16:24:40 GMT
From: otrcomm@wildapache.net
Subject: Shared variables between perl and embedded sh scripts ???
Message-Id: <38381b52.218113640@news.wildapache.net>
Hello,
I have perl scripts that have embedded shell scripts. For example, in
one I call the shell script with a statement like so:
#!/usr/bin/perl -w
... Commented header stuff (who, what, when, why, where)
require "initialize.sub";
$DEBUG = 5;
open (out,"+< /usr/mailscanner/debug.log") if ($DEBUG gt 4);
&Initialize_MailScanner_Variables;
&read_config;
print out "Path to uvscan = $uvscan\n" if ($DEBUG gt 4);
system '/bin/sh', '-c', <<'ShellEnd', $0, @ARGV;
#!/bin/sh
#
... Shell script
ShellEnd
print out "Path to AvpLinux = $AvpLinux\n" if ($DEBUG gt 4);
close(out) if ($DEBUG gt 4);
exit 0
The variables uvscan and AvpLinux are read from a configuration file
(mailscanner.config) by the &read_config statement. These variables
are available in my perl script before the 'system' statement and
after; i.e., both 'print out ...' statements produce the correct data.
However, the variables are not available in the shell script. Is
there a way to have these variables available in my shell script also?
I have some large shell scripts and I am too lazy to translate the
logic to perl (some of it I don't even know how to) and want to just
wrap them in a 'system' function and embed the wrapped logic in perl
scripts that expand the functionality of the original scripts.
Another question! Before I can have access to the routines in
'initialize.sub', I have to copy 'initialize.sub' to
/usr/lib/perl5/5.00503/i386-linux. I believe that this is because I
do not have something setup correctly in my perl installation, but I
do not know what. Any ideas? I want to keep 'initialize.sub' in the
same directory as the perl script
Thanks in advance,
M
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 1450
**************************************