[7808] in Perl-Users-Digest
Perl-Users Digest, Issue: 1433 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Dec 7 14:17:39 1997
Date: Sun, 7 Dec 97 11:00:40 -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 Sun, 7 Dec 1997 Volume: 8 Number: 1433
Today's topics:
Re: <select multiple> data using CGI module in PERL (Jeremy D. Zawodny)
Re: <select multiple> data using CGI module in PERL <rootbeer@teleport.com>
awk to perl <tim@doulos.co.uk>
Re: Dates and forms <rootbeer@teleport.com>
Re: Help with flatfile database <rootbeer@teleport.com>
Re: How to signal end of output in CGI script? <rootbeer@teleport.com>
Re: html generator question (Jeremy D. Zawodny)
Re: Inserting only the unique elements into an array .. <rootbeer@teleport.com>
Re: MS IE 3.03 File Uploading (Jeremy D. Zawodny)
Re: Need to open/close an Excel97 workbook scott@softbase.com
pattern matching (s. morgan friedman)
Re: PERL Frusterations (semi-newbie) (Clay Irving)
Re: PERL Frusterations (semi-newbie) <rootbeer@teleport.com>
Re: Perl script! <rootbeer@teleport.com>
Re: perl tutorails (Clay Irving)
Re: perl tutorails (Jeremy D. Zawodny)
Re: Perl web chatroom, Chinese and Japanese code conver (Clay Irving)
Perl,select and mrtg <ohp@pyrenet.fr>
Re: Perl4 is not Y2K (was Re: Forced to use brain-dead (Clay Irving)
Re: Perl4 is not Y2K (was Re: Forced to use brain-dead (Clay Irving)
Re: Pls that run as root <rootbeer@teleport.com>
Re: POP3 Module (Jeremy D. Zawodny)
Re: POP3 Module <rootbeer@teleport.com>
selective web search indexer <dbrignon@ac-nice.fr>
Re: Sending mail out 1 hour later? (Jeremy D. Zawodny)
Re: Sending mail out 1 hour later? <rootbeer@teleport.com>
Re: smarter way of doing this? <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Re: Tracing memory usage & related questions <rootbeer@teleport.com>
Re: where is info-mode Perl documentation? (Martin Vorlaender)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 07 Dec 1997 17:35:57 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: <select multiple> data using CGI module in PERL
Message-Id: <348dde49.86409380@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On Sun, 07 Dec 1997 01:01:57 -0500, Joel Haspel <jeh2z@virginia.edu>
wrote:
>Hi guys! I'm using the "use CGI;" command in my script, and I've got a
><select multiple name=parts> box that I want to get ALL of the data out
>of. Basically, I'm using Javascript to put lines of text in the box
>according to user clicks of <-- and --> buttons, and when they submit, I
>need to get all of the lines in the box. Does anyone know how to do
>that?
>
>Something about $www->param('parts') (if $www = new CGI) would be my
>guess, but I'm having trouble getting it to work. Any help would be
>most appreciated.
Sounds like you need to read the documentation a bit.
This is well explained in the section which describes how to use the
$query->param() and $query->params() methods.
Good Luck,
Jeremy
--
Jeremy D. Zawodny jzawodn@wcnet.org
Web Server Administrator www@wcnet.org
Wood County Free Net (Ohio) http://www.wcnet.org/
------------------------------
Date: Sun, 7 Dec 1997 10:04:22 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Joel Haspel <jeh2z@virginia.edu>
Subject: Re: <select multiple> data using CGI module in PERL
Message-Id: <Pine.GSO.3.96.971207100022.21262J-100000@user2.teleport.com>
On Sun, 7 Dec 1997, Joel Haspel wrote:
> I'm using the "use CGI;" command in my script, and I've got a <select
> multiple name=parts> box that I want to get ALL of the data out of.
> I need to get all of the lines in the box. Does anyone know how to do
> that?
Well, you could use the method documented in the CGI manpage. :-) The
command 'perldoc CGI' should show you. But if you would rather see an
example, point your form at this URL. It will report back to you all of
the variables that your browser has sent it, and it'll even let you see
its source so you can tell how it's done. Enjoy!
http://www.teleport.com/cgi-bin/custom/rootbeer/form-vars
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Fri, 5 Dec 1997 17:25:37 +0000
From: Tim Pagden <tim@doulos.co.uk>
Subject: awk to perl
Message-Id: <zDxJuFARkDi0QAXQ@doulos.co.uk>
Well...
I've tried search engines, browsing (and text-searching) the key Web
pages (anything linked to from www.perl.com) and the FAQs - just about
everything in fact - but can I find the ftp site or URL for downloading
the awk2perl utility? Nope.
So come on chaps, someone please advise...
--
Tim Pagden, Tel: +44 1425 471 223
DOULOS, Fax: +44 1425 471 573
Church Hatch, Email: tim@doulos.co.uk
22 Market Place, Web: www.doulos.co.uk
Ringwood,
BH24 1AW ** Visit The Winning Edge **
Hampshire ** www.doulos.co.uk **
UK ** for many tips and models **
** for VHDL and Verilog **
------------------------------
Date: Sun, 7 Dec 1997 10:16:09 -0800
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Dates and forms
Message-Id: <Pine.GSO.3.96.971207101431.21262O-100000@user2.teleport.com>
On Mon, 8 Dec 1997, NEWS wrote:
> From: NEWS <a@b.c>
Fix that. (You're not helping anyone, even yourself, by putting your email
address in the body of your message and not properly in the headers.)
> What i need to do is to do something with sprintf but the syntax has got
> be stuffed.
Some people say that the syntax of sprintf is already stuffed, but I don't
know whether they mean what you mean. What _do_ you mean?
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sun, 7 Dec 1997 09:44:31 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Robert A. Weeks" <robert@woozy.com>
Subject: Re: Help with flatfile database
Message-Id: <Pine.GSO.3.96.971207094316.21262E-100000@user2.teleport.com>
On Sat, 6 Dec 1997, Robert A. Weeks wrote:
> I need to change the $notice="on" to $notice="off"
Can't you just store the string 'off' into $notice?
> Is there a simple way to just delete that one line and rewrite it??
The FAQ talks about changing one line of a file. Is that what you need?
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sun, 7 Dec 1997 10:24:15 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Bart Lateur <bart.mediamind@tornado.be>
Subject: Re: How to signal end of output in CGI script?
Message-Id: <Pine.GSO.3.96.971207102054.21262Q-100000@user2.teleport.com>
On Sun, 7 Dec 1997, Bart Lateur wrote:
> How can I signal the server that "that was it, there ain't no more"?
Tell it that there's nothing to wait for by closing the standard IO
streams. Of course, there's nothing Perl-specific about that; this should
be clearly explained in the FAQ for a newsgroup about CGI.
> > =70= open STDIN, "</dev/null";
> > =71= open STDOUT, ">/dev/null";
>
> Say what?
Opening a filehandle to a new filename (even /dev/null) will autoclose it.
> This must be some Unix idiosyncrasy, but why can't we just use
>
> close(STDOUT);
You can confuse Perl if you open new files after you've closed one of the
standard filehandles. It's better, but not required, to simply re-open the
standard one.
> Second, as the CGI script does a fork, from which of the two instances,
> the parent or the child, does the server expect the data from?
Either or both. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sun, 07 Dec 1997 17:34:03 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: html generator question
Message-Id: <348cdded.86317227@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On Sun, 07 Dec 1997 03:21:13 +0100, Conny de Groot <c.degroot@wxs.nl>
wrote:
>I am looking for a script that creates simple html
>documents off-line. One must be able to add ones own
>images, and links to other pages.
Sounds like Perl is the tool for you.
Have you begun writing the script? Is there anything you're having
trouble with?
Jeremy
--
Jeremy D. Zawodny jzawodn@wcnet.org
Web Server Administrator www@wcnet.org
Wood County Free Net (Ohio) http://www.wcnet.org/
------------------------------
Date: Sun, 7 Dec 1997 09:59:55 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Creede Lambard <fearless@io.com>
Subject: Re: Inserting only the unique elements into an array ...
Message-Id: <Pine.GSO.3.96.971207095537.21262I-100000@user2.teleport.com>
On Sat, 6 Dec 1997, it was written:
> why is modifying @_ a bad idea? It doesn't seem to be any big deal to
> modify $_ so long as you're careful where you do it; I would think you
> could modify @_ in a similar way.
There's some extra overhead to using @_ which doesn't happen if you use
@temp. And, of course, it's a bad idea to change @_ in most cases within a
subroutine. This is one of the reasons that scalar split is deprecated.
Also, in a future version of Perl, @_ may be lexically scoped, which could
make it usable only within subroutines. Although (mis-)usages may be
grandfathered.
In any case, making a temp variable (via my) is easy to do and free of
unwanted ugly side-effects. Cheers!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sun, 07 Dec 1997 17:23:34 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: MS IE 3.03 File Uploading
Message-Id: <348ada0e.85326943@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On Sat, 06 Dec 1997 23:09:11 -0600, Brent Michalski
<perlguy@inlink.com> wrote:
>> >I wrote a Perl script on Windoze NT that is supposed to upload a file to
>> >the web server. Everything works fine in Netscape (of course), MS IE
>> >3.02 {with the file upload patch}, MS IE 4.x BUT it does not work with
>> >MS IE 3.03 which touts file uploading as a "new feature"!
>>
>> Uhm, you mean that a web browser is uploading a file to your Perl
>> script, which happens to run on the web server in question?
>>
>> You've made it sound as if the Perl script is doing the upload. That
>> would imply that Perl is on the client, not the server...
>
>I KNOW that the transfer is initiated by the browser BUT without the
>perl script nothing much would happen now would it?
Just making sure. It's hard to tell what people believe anymore,
unless I've had prior experience with them. And more often than not, I
end up overestimating.
Sorry if I offended.
>> >The browser chokes when it gets to these lines:
>
>> The browser doesn't get to any of those lines. They're run on the
>> server.
>
>I know that, and you know that, but the browser doesn't, this is where
>it DIES!
>>
>> >## Open the file and then write to it. This creates the file we are
>> >uploading on the server.
>> >open(TMP,">$target")||die "Error creating file: $!";
>>
>> Does that succeed every time?
>
>No, it FAILS every time.
Again, I ask you: What error message is that generating? The "$!" in
that die statement must produce *something* if it's the culprit.
>> >binmode(TMP);
>> >print TMP $CGI{'UploadedFile'}->{'Contents'};
>> >close(TMP);
>> >
>> >When I say chokes, I mean it goes to a gray screen and the browser
>> >stops. I can't even view the source.
>>
>> What errors are showing up in your error log? If none, then how do you
>> know where it's dying?
>
>I know exactly which lines the program is dying at because I have
>DEBUGGED it and know which lines of my program have executed and which
>lines have not. If I hadn't debugged the crap out of it, I'd have never
>asked this question in the newsgroup.
If you've "debugged the crap out of it", then you've surely got some
idea of what Perl is complaining about when it dies, right?
>> Have I missed something in your description?
>
>Apparently.
What, then?
>> >Has ANYONE found a way to fix this problem?
>> >
>> >The HTML form is ok.
>> >The rights to the area I am uploading to are ok.
>> >The script works fine under all other browsers.
>>
>> Based on your description, the only solution is to not use that one
>> version of the browser.
>
>Anyway, the BROWSER is the problem. Not using that version may be an
>option on a small intranet but I don't have that luxury, I work for a
>large corporation. It is loaded on many machines in my company, we are
>stuck with it.
It sounds like the browser isn't the only problem. The browser is
unaware of your script. Your script [should be] unaware of the
browser. They're just speaking HTTP to each other.
Is the browser doing something out of the ordinary? Something that
your script isn't expecting? If so, you should be able to trap that
and then code around it, right?
>> >Any suggestions, besides switching to Netscape?
>>
>> Jeremy
>
>If you happen to actually have a real solution to this problem, I'd love
>to hear it.
I may not have the solution, but I can help to trace down the nature
of the problem--that's what you claim to be trying to do, but I'm
still not sure exactly what you've uncovered and what you haven't.
A lot rests in the that error message that Perl's die() should be
emitting, and that's the bit you haven't told us yet.
Jeremy
--
Jeremy D. Zawodny jzawodn@wcnet.org
Web Server Administrator www@wcnet.org
Wood County Free Net (Ohio) http://www.wcnet.org/
------------------------------
Date: 7 Dec 1997 16:03:11 GMT
From: scott@softbase.com
Subject: Re: Need to open/close an Excel97 workbook
Message-Id: <66ehbv$pgl$1@mainsrv.main.nc.us>
Uh, oh, the monthly Automation plea for help... I should start
a FAQ web page!
In general, I've found the OLE Automation support half-baked on both
ends. Perl's Automation support is so undocumented it is almost
impossible to use, and Office's Automation support is bizarre and
unpredictable. One big problem is all the Perl Automation documentation
seems to be based on very old versions of Office apps. This stuff
doesn't necessarily work with the newer object models of the later
apps.
VBA, though, has been documented ad nauseum. It is the key.
My advice is to design a VBA macro that does what you need to do in the
Office application, and call it from Perl. The ideas is to minimize
the number of Automation calls. You should be able to get by with
three calls: create the object, run the macro, and destroy the object.
Once you're executing the macro itself, you're in the wonderful land of
VBA, with copious documentation that makes even trivial tasks easy, and
complicated tasks fun. (Compared, of course, to the effort of
coding the tasks using Automation.)
PS: I highly recommend VBA Unleashed, the most comprehensive Office 97
programming book I've found to date.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: 7 Dec 1997 18:40:18 GMT
From: morgan@dept.english.upenn.edu (s. morgan friedman)
Subject: pattern matching
Message-Id: <66eqii$fr6$1@netnews.upenn.edu>
hi: i'm a perl newbie and i'm trying to figure out something
about pattern matching and i'm not sure what i'm doing wrong.
i want to see if there is a smaller string (just an apersand,
"@") within a bigger string, and, if so, to do something. so i
constructed the following:
if ($big_string =~ /[.*]\@[.*]/) {
&do_something;
}
but this doesn't seem to be working. what am i doing wrong?
thank you for the help; it's appreciated!
morgan
--
______________________
steven morgan friedman
http://www.sas.upenn.edu/~smfriedm
"I have always imagined that paradise will be a kind of library."
------------------------------
Date: 7 Dec 1997 11:52:43 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: PERL Frusterations (semi-newbie)
Message-Id: <66ek8r$qlr@panix.com>
In <3488bef9.9286001@nntp.best.com> mocat@NOSPAM.best.com (blacktape) writes:
>I wrote a simple script for my friend, who is creating an extensive
>music database, and doesn't want to type in all of the html for a 1+
>meg file... what it does is this:
>takes a tab delimited file:
>genre group url
>rock aerosmith http://www.aerosmith.com
>etc etc..
>and turns it into this:
><I>genre</I><B>group</B><A HREF="url">url</A>
><I>rock</I><B>aerosmith</B><A
>HREF="http://www.aerosmith.com">www.aerosmith.com</A>
>simple enough.
>what i want to do with this script, is have it add in an <A
>NAME="letter"> for the first occurance of each letter, a-z, in the
>group name.
>ie:
><A NAME="a"><I>rock</I><B>aerosmith</B><A
>HREF="http://www.aerosmith.com">www.aerosmith.com</A>
><I>rock</I><B>anthrax</B><A
>HREF="http://www.anthrax.com">www.anthrax.com</A>
>etc etc for the A's, then onto the B's, C's... etc
>how would i go about doing this? i've tried a do {} until, read the
>perlfaq and manpages, tried everything... but all i come up with is a
>bunch of errors.
It's easy to get the first letter -- try this:
#!/usr/local/bin/perl5.000
while (<DATA>) {
if (uc(substr $_,0,1) eq "A") {
print "It's and \"A\" -- $_\n";
}
}
__DATA__
Aerosmith
U2
Black Sabbath
Now that you have that, why not build a page for all the "A"s?...
--
Clay Irving <clay@panix.com> I think, therefore I am. I think?
http://www.panix.com/~clay/
------------------------------
Date: Sun, 7 Dec 1997 09:48:15 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: blacktape <mocat@NOSPAM.best.com>
Subject: Re: PERL Frusterations (semi-newbie)
Message-Id: <Pine.GSO.3.96.971207094524.21262F-100000@user2.teleport.com>
On Sun, 7 Dec 1997, blacktape wrote:
> open(OUTHTML, ">$ARGV[1]") || die "cannot open $ARGV[1]: $!";
> @outhtml = <OUTHTML>;
You're reading from a filehandle you've opened for output. Why do you
think that should do any good? :-)
> if ( $group =~ /^$letter/i && @outhtml !~
> /<ANAME=\"$letter\">/i) {
The first part of that condition should probably be done with substr, and
maybe lc. The second part doesn't make any sense - I can't tell what it's
trying to do, but it will always be false.
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sun, 7 Dec 1997 09:36:56 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Nander <webmaster@nander.widexs.net>
Subject: Re: Perl script!
Message-Id: <Pine.GSO.3.96.971207093600.21262C-100000@user2.teleport.com>
On Sat, 6 Dec 1997, Nander wrote:
> Subject: Perl script!
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
> Have enybody a perl script for my to send a form?
You may find a useful module on CPAN. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 7 Dec 1997 12:00:43 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: perl tutorails
Message-Id: <66eknr$r3e@panix.com>
In <3489F249.158B@usa.net> JJ <jones-joe@usa.net> writes:
>Doe's anybody know where they have on line perl tutorails
>thank you
The "tutorials" section of Perl Reference, perhaps? :)
http://reference.perl.com/query.cgi?tutorials
--
Clay Irving <clay@panix.com> I think, therefore I am. I think?
http://www.panix.com/~clay/
------------------------------
Date: Sun, 07 Dec 1997 17:32:25 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: perl tutorails
Message-Id: <348bdd78.86200039@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On Sat, 06 Dec 1997 17:48:09 -0700, JJ <jones-joe@usa.net> wrote:
>Doe's anybody know where they have on line perl tutorails
>thank you
There is some good documentation on http://www.perl.com/, but I dunno
what you consider tutorial-level. In any case, there are some good
books available, too--also listed on the Perl web site.
Jeremy
--
Jeremy D. Zawodny jzawodn@wcnet.org
Web Server Administrator www@wcnet.org
Wood County Free Net (Ohio) http://www.wcnet.org/
------------------------------
Date: 7 Dec 1997 11:55:20 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Perl web chatroom, Chinese and Japanese code conversion available
Message-Id: <66ekdo$qpq@panix.com>
In <3489c1b6.1162510@news.kornet.nm.kr> mingtian@hotmail.com (Gil) writes:
>Chat with your honey :)
I prefer talking to my molasses.
--
Clay Irving <clay@panix.com> I think, therefore I am. I think?
http://www.panix.com/~clay/
------------------------------
Date: Sun, 07 Dec 1997 17:59:31 +0100
From: Olivier PRENANT <ohp@pyrenet.fr>
Subject: Perl,select and mrtg
Message-Id: <348AD5F3.5469@pyrenet.fr>
Hi,
Working with perl for sme time now, I had a problem installing mrtg.
When running cfgmaker I ha this message:
select not implemented at SNMP_Session.pm line 126.
I went for perl5.004_04 instead of perl5_004: same thing.
I'm sure HAS_SOCKET is defined and I even made a static link on the
library libsocket.a
Someone help me pleaaase?
TIA
--
Olivier PRENANT Tel: +33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)
31190 AUTERIVE +33-6-07-63-80-64 (GSM)
FRANCE Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)
------------------------------
Date: 7 Dec 1997 10:50:33 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Perl4 is not Y2K (was Re: Forced to use brain-dead perl 4 -- how do I accomplish task that is simple in perl 5 ?)
Message-Id: <66egk9$lu6@panix.com>
In <Pine.GSO.3.96.971205131905.29415Q-100000@usertest.teleport.com> Tom Phoenix <rootbeer@teleport.com> writes:
>On Fri, 5 Dec 1997, Bart Lateur wrote:
>> So what will people think of Perl4 once we get to, say, Perl9?
>That's an idea: Make the next version of Perl have a number that's so
>large that nobody will want to keep using Perl4.
> Perl98!
You'll have to release it in 2001, though...
--
Clay Irving <clay@panix.com> http://www.panix.com/~clay/
------------------------------
Date: 7 Dec 1997 10:52:28 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Perl4 is not Y2K (was Re: Forced to use brain-dead perl 4 -- how do I accomplish task that is simple in perl 5 ?)
Message-Id: <66egns$m9i@panix.com>
In <ebohlmanEKsrB0.H0o@netcom.com> Eric Bohlman <ebohlman@netcom.com> writes:
>Abigail <abigail@fnx.com> wrote:
>: Tom Phoenix (rootbeer@teleport.com) wrote on 1557 September 1993 in
>: <URL: news:Pine.GSO.3.96.971205131905.29415Q-100000@usertest.teleport.com>:
>: ++
>: ++ Perl98!
>: ++
>: ++ Hmmm... On the other hand...
>: On the other hand is Visual Perl ++ with Javabeans!
>You mean "Visual P++"
That sounds too much like what I do at the urinal after several beers...
--
Clay Irving <clay@panix.com> http://www.panix.com/~clay/
------------------------------
Date: Sun, 7 Dec 1997 09:53:41 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Russ <russ@eastland.net>
Subject: Re: Pls that run as root
Message-Id: <Pine.GSO.3.96.971207095020.21262H-100000@user2.teleport.com>
On Sat, 6 Dec 1997, Russ wrote:
> I have set the permissions on a file as -rwsrwxrwx
Eek! Change that at once!
> which is to my understanding is suid which should make the pl run with
> root permissions when called.
Not only that, but it's world-writable. So any user of your machine may be
able to alter it while it remains set-id. Do you really want that? Change
that at once! You probably want -rwsr-xr-x instead.
> But it don't seem to have the ability to do system calls that
> I need it to. Does anyone have any ideas on how to fix this.
Make sure that suidperl (or sperl) is properly installed on your system,
if needed. Your system administrator may have disabled that for security
or other reasons.
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sun, 07 Dec 1997 17:36:58 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: POP3 Module
Message-Id: <348ede9d.86493931@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On Sun, 07 Dec 1997 01:22:54 -0500, "Shawn M. Kelly"
<kellysm@ix.netcom.com> wrote:
>Could someone direct me to a Win32 POP3 module?
There's nothing specific to NT about a POP3 modules. The existing
Net::POP ought to work just fine.
Good Luck,
Jeremy
--
Jeremy D. Zawodny jzawodn@wcnet.org
Web Server Administrator www@wcnet.org
Wood County Free Net (Ohio) http://www.wcnet.org/
------------------------------
Date: Sun, 7 Dec 1997 10:05:50 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: "Shawn M. Kelly" <kellysm@ix.netcom.com>
Subject: Re: POP3 Module
Message-Id: <Pine.GSO.3.96.971207100518.21262K-100000@user2.teleport.com>
On Sun, 7 Dec 1997, Shawn M. Kelly wrote:
> Could someone direct me to a Win32 POP3 module?
All of the really great modules are available on CPAN.
http://www.perl.com/CPAN/
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sun, 07 Dec 1997 18:08:46 +0100
From: daniel <dbrignon@ac-nice.fr>
Subject: selective web search indexer
Message-Id: <348AD81E.4B7B@ac-nice.fr>
Has anybody written or heard of a search engine for indexing some (few)
selected urls whichs doesnt have a search engine
i dont speak about indexing my web pages neither about a robot ..
thanks
Daniel
dbrignon@ac-nice.fr
------------------------------
Date: Sun, 07 Dec 1997 17:42:13 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Sending mail out 1 hour later?
Message-Id: <348fdf71.86705926@woody.wcnet.org>
[original author automagically cc'd via e-mail]
On 7 Dec 1997 11:00:37 GMT, burt@ici.net (Burt Lewis) wrote:
>Hello,
>
>I have a Perl Script that (among other things) takes in an e-mail adress from
>a form and sends out an e-mail. (that works fine!)
>
>My problem is that I need this e-mail to be sent out 1 hour in the future.
>
>I'm told that I need to use the "AT" command but can't seem to get it right.
>
>Do I need to put this part of my script into another seperate script or can I
>do it here?
Sounds like you need 2 scripts. Have one that prepares the e-mail
messages and leaves them somewhere (in a directory, RDBMS, whatever).
A second one which periodically scans that "somewhere" and sends out
messages which are due to go out.
AT is the command-line interface to the Schedule Service in Windows
NT. It's a primitive version of the Unix cron facility.
You could use the Schedule Service to kick off those periodic jobs.
I've been fairly successful in using this approach for other stuff.
Jeremy
--
Jeremy D. Zawodny jzawodn@wcnet.org
Web Server Administrator www@wcnet.org
Wood County Free Net (Ohio) http://www.wcnet.org/
------------------------------
Date: Sun, 7 Dec 1997 10:13:50 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Burt Lewis <burt@ici.net>
Subject: Re: Sending mail out 1 hour later?
Message-Id: <Pine.GSO.3.96.971207101254.21262N-100000@user2.teleport.com>
On 7 Dec 1997, Burt Lewis wrote:
> I'm told that I need to use the "AT" command but can't seem to get it
> right.
If you've read the docs for the 'at' command and still can't get it to
work, the folks in a newsgroup about Unix may be able to help you. Good
luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sun, 7 Dec 1997 08:50:59 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: smarter way of doing this?
Message-Id: <66ek5m$fgk@bgtnsc01.worldnet.att.net>
I'm doing something like this in a script at work. I don't know for sure
whether it's the most efficient, but it is highly useful because it tellms
me which files weren't processed correctly. In my script, each file needs to
have three operations performed on it. If any of those three operations
fails, the error message gets added to the $errormsg string, we print it
out, and then go to the next file.
$errormsg = "";
foreach $online (@myonlines) {
$file_path = "/$online/new_prodfile.html";
unless (-e $file_path) {
$errormsg .= $file_path . "\n"; # or $online if you prefer :D
}
}
unless ($errormsg eq "") {
print "The following files were not found:\n$errormsg";
exit(0);
}
This assuming that in this case, 0 is your system's error code for
"unexpected termination."
Hope this helps,
--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl
snailgem@aol.com wrote in message <348A4F02.7A85@aol.com>...
>I'm using this 'exitflag' kludge to make the program exit if at least
>one of the files in the loop doesn't exist (I can't put the 'die' inside
>the loop because I want to print a complete list of not found files
>before I exit).
>This works OK, but again, I wonder if there is a more elegant way of
>doing it in PERL.
>
>Thanks.
>-------------
>foreach $online (@myonlines) {
> $file_path="/$online/new_prodfile.html";
> unless (-e $file_path) {
> print "$file_path cannot be found\n";
> $exitflag = 1;
> }
>}
>
>die ("\nFile has not been modified\n") if $exitflag == 1 ;
>
>--- ---------
>Will
>
>
>"Take any demand, however slight, which any creature, however weak, may
>make. Ought it not, for its own sole sake, to be satisfied? If not,
>prove why not."
> William James
------------------------------
Date: Sun, 7 Dec 1997 09:42:03 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Boris Statnikov <boris@cs.jhu.edu>
Subject: Re: Tracing memory usage & related questions
Message-Id: <Pine.GSO.3.96.971207094021.21262D-100000@user2.teleport.com>
On Sat, 6 Dec 1997, Boris Statnikov wrote:
> Is there a way to trace memory usage inside my Perl program? Inside the
> (Perl) modules it uses?
You should check out the debugging capabilities of Perl's malloc(). If it
doesn't have what you need, you should hack on it a while. :-)
> Is it possible to kick off the garbage collector on demand?
No, because there isn't one. :-) At least, not in the sense that I think
you mean. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Sun, 07 Dec 1997 15:04:13 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: where is info-mode Perl documentation?
Message-Id: <348aacdd.524144494f47414741@radiogaga.harz.de>
Lynn D. Newton (lnewton@berio.phx.mcd.mot.com) wrote:
: I have seen references in various places to Perl
: documentation in texinfo format for reading in
: info-mode with Emacs or XEmacs. But I have been unable
: to locate it in this format. Can someone give me a
: pointer? Thanks.
The standard way perl documentation is distributed is POD (Plain Old
Doc) format. Also in the standard distribution, there are converter
scripts for HTML, LaTeX, nroff -man, plain text, texinfo, and who-
knows-whatelse. Look for (and into) pod2* scripts in /usr/local/bin,
or wherever your local Perl is installed.
: Email response appreciated.
UseNet is a WORM device. Post here, read the answers here.
: It's very hard to keep up with this group.
It shouldn't be too hard to look for the subject you posted
your request under, even if this is a high-volume newsgroup.
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
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 1433
**************************************