[18340] in Perl-Users-Digest
Perl-Users Digest, Issue: 508 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 16 18:11:05 2001
Date: Fri, 16 Mar 2001 15:10:26 -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: <984784226-v10-i508@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 16 Mar 2001 Volume: 10 Number: 508
Today's topics:
Re: Godzilla! Do you please your ego by insulting peopl <uri@sysarch.com>
Re: Godzilla! You may be an idiot at Perl and a troll i <uri@sysarch.com>
how can I restart a regex within a substitution without info@java.seite.net
Re: HTTP Client Question <spohn@bigfoot.com>
Re: HTTP Client Question (Anno Siegel)
Re: HTTP Client Question <spohn@bigfoot.com>
many "used only once, possible typo" warnings in CGI.pm <webmaster@webdragon.munge.net>
need a sub print_with_newline(), but what to do with pr <murat.uenalan@gmx.de>
Re: need a sub print_with_newline(), but what to do wit <wuerz@yahoo.com>
Re: need a sub print_with_newline(), but what to do wit <murat.uenalan@gmx.de>
Re: new user <anders.goransson@chello.se>
OT <Petri_member@newsguy.com>
Re: Overloading in OO perl <david@freemm.org>
Re: pattern matching <bart.lateur@skynet.be>
Re: Perl 4 <godzilla@stomp.stomp.tokyo>
Re: Perl 4 <uri@sysarch.com>
PERL and ASP ("rapid_response")
Re: PERL and ASP <shanem@ll.mit.edu>
pretty print cron? jtschetter@nospam.vermeermfg.com
Re: pretty print cron? <tony_curtis32@yahoo.com>
Re: Print own "die" message (Abigail)
Re: Print own "die" message <mischief@velma.motion.net>
queue <michas@nospam.uni-jena.de>
Re: queue (Logan Shaw)
Quick struct question in perl. example code inc <abcd@ntlworld.com>
smtp <jtjohnston@courrier.usherb.ca>
Sol 2.8, Perl 5.6.0 - Bug with getpwent? <dennis.moreno@pop.safetran.com>
Subroutine in separate files <mustang@astekcorp.com>
Re: Subroutine in separate files (Chris Fedde)
Thank you Lou! <kalle@tvettsvamp.a.se>
Re: Thank you Lou! <mjcarman@home.com>
Username/password from an HTML form <mark-lists@webstylists.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 16 Mar 2001 19:52:43 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Godzilla! Do you please your ego by insulting people. You may be god at Perl and a hotshot in this group, but hardly can you have a decent education.
Message-Id: <x7g0gd7aph.fsf@home.sysarch.com>
>>>>> "KA" == Kalle Anka <kalle@tvettsvamp.a.se> writes:
KA> Godzilla! Do you please your ego by insulting people. You may be
KA> god at Perl and a hotshot in this group, but hardly can you have a
KA> decent education.
please, we understand that english is a second language to you, and you
have determined moronzilla is not a nice person. but she is not a perl
god or a hotshot here. she is considered a major idiot and troll
(someone who posts just to annoy others)
KA> Dont disturb yourself with my quests anymore.
and with anyone else's either.
thank you for such a proper rebuke of moronzilla. if more newcomers like you
instantly recognized her as a troll we would have a calmer newsgroup.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Fri, 16 Mar 2001 19:55:40 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Godzilla! You may be an idiot at Perl and a troll in this group, but hardly can you have a decent education.
Message-Id: <x7d7bh7akj.fsf_-_@home.sysarch.com>
>>>>> "G" == Godzilla! <godzilla@stomp.stomp.tokyo> writes:
G> Kalle Anka wrote:
>> Godzilla! Do you please your ego by insulting people.
>> You may be god at Perl and a hotshot in this group,
>> but hardly can you have a decent education.
>> Dont disturb yourself with my quests anymore.
G> I do as I please. However, I shall attempt to please you.
G> Would you like me to call you, Kalle, Lou or Frank?
so how many of us here post under multiple names? do just 3 of us spend
all day posting the 300 messages a day? how would we keep track of all
the personalities? who came up with kalle? is her address and poor
english such so obviously forged?
so, we are all just a handful of people who like to troll just for your
benefit. i think that is a classic sign of paranoia. go see a doctor
already, your meds have run out.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 16 Mar 2001 21:30:23 GMT
From: info@java.seite.net
Subject: how can I restart a regex within a substitution without leaving the /g loop?
Message-Id: <98u0lf$2h1$1@news.netmar.com>
hi...
i want to change the starting regex of a looped substition within the
substitution. here's a code snippet which shows what i mean...
$x="aa..b..a..b...a..a...a.#..b..a..b..b..b..a..a..b.";
$c="a|#";
$x=~ s/($c)/if($1 eq "#") { $c="b|#"; } else { "*"
}/ge;
..which "should" change $x in...
**..b..*..b...*..*...*.#..*..a..*..*..*..a..a..*.
..but of course & unfortunately doesn't work, because the variable $c is
only
checked once at the beginning.
is there a command which tells the regex to "recompile" the regex?
or has anybody any other ideas?
thanx in advance!
best regards,
christoph bergmann
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net
------------------------------
Date: Fri, 16 Mar 2001 13:48:23 -0600
From: Al Spohn <spohn@bigfoot.com>
Subject: Re: HTTP Client Question
Message-Id: <MPG.151c2a0430c3ab65989685@mayonews>
In article <98tkfi$g66$1@mamenchi.zrz.TU-Berlin.DE>,
anno4000@lublin.zrz.tu-berlin.de says...
> According to Bob Dilworth <avast@hortonsbay.com>:
> > On 15 Mar 2001 15:38:51 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
<stuff snipped)
> > Publicly "plonking" them for "jeopardy" posting serves no purpose
> > other than, in my view, arrogance. It is also seems quite mean and
> > intolerant. Why waste all that energy on public humiliation when you
> > can simply ignore the posting?
>
> Because it damages the thread it appears in. Posting style is
> *not* a matter of personal preference.
In my case it was admittedly a case of carelessness that resulted in my
jeopardy posting, i.e., I was using a client at the moment for which that
was the default, and I didn't happen to notice in time. But I have to
confess to having believed that it *was* merely a preference thing
(certainly from a readability standpoint the argument could be made
either way, but I'm happy to comply with whatever standard...). So for
my own edification, what is it about this practice that actually
*damages* the thread?
Thanks in advance...
> [rest of somewhat tiring argumentation snipped]
>
> Anno
>
--
Al Spohn
http://www.bigfoot.com/~spohn
------------------------------
Date: 16 Mar 2001 21:45:41 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: HTTP Client Question
Message-Id: <98u1i5$orq$1@mamenchi.zrz.TU-Berlin.DE>
According to Al Spohn <spohn@bigfoot.com>:
> In article <98tkfi$g66$1@mamenchi.zrz.TU-Berlin.DE>,
> anno4000@lublin.zrz.tu-berlin.de says...
[...]
> > Because it damages the thread it appears in. Posting style is
> > *not* a matter of personal preference.
[...]
> either way, but I'm happy to comply with whatever standard...). So for
> my own edification, what is it about this practice that actually
> *damages* the thread?
I think that's obvious. When both ways are mixed, a thread soon
becomes unreadable. It inhibits communication.
I could argue why top posting is preferable, but we've been through
this too many times. It's enough that the vast majority of Usenet
prefers top posting to make it the standard.
Anno
------------------------------
Date: Fri, 16 Mar 2001 16:16:40 -0600
From: Al Spohn <spohn@bigfoot.com>
Subject: Re: HTTP Client Question
Message-Id: <MPG.151c4ca54f02e434989686@mayonews>
In article <98u1i5$orq$1@mamenchi.zrz.TU-Berlin.DE>,
anno4000@lublin.zrz.tu-berlin.de says...
> According to Al Spohn <spohn@bigfoot.com>:
> > In article <98tkfi$g66$1@mamenchi.zrz.TU-Berlin.DE>,
> > anno4000@lublin.zrz.tu-berlin.de says...
>
> [...]
>
> > > Because it damages the thread it appears in. Posting style is
> > > *not* a matter of personal preference.
>
> [...]
>
> > either way, but I'm happy to comply with whatever standard...). So for
> > my own edification, what is it about this practice that actually
> > *damages* the thread?
>
> I think that's obvious. When both ways are mixed, a thread soon
> becomes unreadable. It inhibits communication.
> I could argue why top posting is preferable, but we've been through
> this too many times. It's enough that the vast majority of Usenet
> prefers top posting to make it the standard.
I'm certainly not one to beat a dead horse (any more than I have already,
at any rate :-), but for me there's a distinction to be made between
damaging a thread and contributing to a potential confusion factor.
Although it's certainly not a point worth belaboring when going with the
flow in this regard makes the most sense for me as well, but I think it
should be a "heavily recommended" vs non-optional item... certainly
nothing worth hanging somebody out to dry for.
--
Al Spohn
http://www.bigfoot.com/~spohn
------------------------------
Date: 16 Mar 2001 22:44:42 GMT
From: "Scott R. Godin" <webmaster@webdragon.munge.net>
Subject: many "used only once, possible typo" warnings in CGI.pm using import_names("UT");
Message-Id: <98u50q$bj5$0@216.155.32.136>
I get a TON of these after using:
import_names('UT');
Diagnostic Output
# [Fri Mar 16 17:12:47 2001] Dev:Pseudo: # Name "UT::mod_type" used only
once: possible typo.
[Fri Mar 16 17:12:47 2001] Dev:Pseudo: File 'Primus 8.5GB:Web
Pages:cgi-scripts:ncrp:testing:UTReadMeTemplate.cgi'; Line 534
# [Fri Mar 16 17:12:47 2001] Dev:Pseudo: # Name "UT::mod_description"
used only once: possible typo.
[Fri Mar 16 17:12:47 2001] Dev:Pseudo: File 'Primus 8.5GB:Web
Pages:cgi-scripts:ncrp:testing:UTReadMeTemplate.cgi'; Line 535
# [Fri Mar 16 17:12:47 2001] Dev:Pseudo: # Name
"UT::difficulty_settings" used only once: possible typo.
[Fri Mar 16 17:12:47 2001] Dev:Pseudo: File 'Primus 8.5GB:Web
Pages:cgi-scripts:ncrp:testing:UTReadMeTemplate.cgi'; Line 466
I've got a LOT of params, so this generates about a page of diagnostic
output.
OTHER than supressing warnings (which I'd rather not do), is there any
other better, more sophisticated way to work around this in Perl?
Basically once the form is submitted and validated, I import the names
into the UT:: namespace and then use them to generate the output of the
template file.
currently I'm using CGI.pm 2.74 although I just noticed that he released
a slight modification recently. (the change notes don't indicate a fix
for this either, so I'm not concerned that I'm missing something with
*this* particular issue by not updating immediately)
Your comments and suggestions would be most helpful.
--
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
# ( damn spammers. *shakes fist* take a hint. =:P )
------------------------------
Date: Fri, 16 Mar 2001 23:36:27 +0100
From: "Murat Uenalan" <murat.uenalan@gmx.de>
Subject: need a sub print_with_newline(), but what to do with print_with_newline STDERR "blabla"; ???????
Message-Id: <98u4in$3n3ba$1@ID-71895.news.dfncis.de>
I simply want to write a print function which automatically prints an
appending \n character, and should be a alternativ to normal print ! It
seems very simple, but it is not !
How to handle this ???
print FILEHANDLE 'outputstring';
My implementation fails:
use subs qw(println);
sub println
{
my $out = shift."\n";
return print $out, @_;
}
And the "use subs" constellation doesn't mimic the insignificance of the
comma after the filehand ?! Eeahh ?!
Thank you in advance !
Murat
------------------------------
Date: Fri, 16 Mar 2001 23:43:02 +0100
From: Mona Wuerz <wuerz@yahoo.com>
Subject: Re: need a sub print_with_newline(), but what to do with print_with_newline STDERR "blabla"; ???????
Message-Id: <160320012343027342%wuerz@yahoo.com>
In article <98u4in$3n3ba$1@ID-71895.news.dfncis.de>, "Murat Uenalan"
<murat.uenalan@gmx.de> wrote:
> I simply want to write a print function which automatically prints an
> appending \n character, and should be a alternativ to normal print ! It
> seems very simple, but it is not !
Oh, but it certainly is. The -l command line switch will do what you
want. Read about it in perlrun.
Nice subject line, btw.
-mona
------------------------------
Date: Fri, 16 Mar 2001 23:56:59 +0100
From: "Murat Uenalan" <murat.uenalan@gmx.de>
Subject: Re: need a sub print_with_newline(), but what to do with print_with_newline STDERR "blabla"; ???????
Message-Id: <98u5p6$3oc2f$1@ID-71895.news.dfncis.de>
Thank you very much ! This is the absolut right answer to my question, but
what i didn't reveal is the fact that i also want to implement text
formating (paragraph, indentation,...) into my own print so i would need to
hand the main problem excplicitly !
how to handle the insignificant comma and the FILEHANDLE during argument
processing ?!
print_with_newline FILEHANDLE 'text';
...my poor implementation
sub print_with_newline
{
my $manip = shift."\n";
return print $manip, @_;
}
Could anyone help again ?!
"Mona Wuerz" <wuerz@yahoo.com> schrieb im Newsbeitrag
news:160320012343027342%wuerz@yahoo.com...
> In article <98u4in$3n3ba$1@ID-71895.news.dfncis.de>, "Murat Uenalan"
> <murat.uenalan@gmx.de> wrote:
>
> > I simply want to write a print function which automatically prints an
> > appending \n character, and should be a alternativ to normal print ! It
> > seems very simple, but it is not !
>
> Oh, but it certainly is. The -l command line switch will do what you
> want. Read about it in perlrun.
>
> Nice subject line, btw.
>
> -mona
------------------------------
Date: Fri, 16 Mar 2001 21:48:52 GMT
From: Anders Goeransson <anders.goransson@chello.se>
Subject: Re: new user
Message-Id: <c625bt41herk8r8tt3oo1tq8nlr2jv2k7t@4ax.com>
On Fri, 16 Mar 2001 15:59:04 GMT, sariq@texas.net (Tom Briles) wrote:
>On Fri, 16 Mar 2001 12:31:09 GMT, Anders Goeransson
><anders.goransson@chello.se> wrote:
>
>>On Fri, 16 Mar 2001 11:28:08 -0000, "Graham Wood"
>><graham.wood@iona.com> wrote:
>>
>>><snipped>
>>>> Global symbol "$in" requires explicit package name at
>>>> C:\Perl\eg\example.pl line
>>>> 20.
>>>> Execution of C:\Perl\eg\example.pl aborted due to compilation errors.
>
>>>If you can find "use
>>>strict;" in the script try commenting it out (#use strict;) and see if this
>>>gets rid of all the error messages.
>>>
>>>Hope this helps
>
>Quite unlikely to "help".
>
>>Thanks a million!
>>It works now. (There were some other fishy things to get rid of
>>too....)
>
>And the furniture burns on...
>
>- Tom
Well, better to burn out than to fade away... The good advice I got
managed to get the result I wanted, new directories with changed
files... what's so bad about that?
So in the CHURCH of PERL this might be unortodox. But eventually
people like me, morons, will adjust to the official version and
everything will be fine, just fine!
regards Anders
------------------------------
Date: 16 Mar 2001 13:57:49 -0800
From: Petri Oksanen <Petri_member@newsguy.com>
Subject: OT
Message-Id: <98u28t0hm7@edrn.newsguy.com>
In article <x7d7bh7akj.fsf_-_@home.sysarch.com>, Uri says...
G>> Kalle Anka wrote:
>>> Godzilla! Do you please your ego by insulting people.
G>> I do as I please.
> who came up with kalle? is her address and poor english such
> so obviously forged?
Check out:
http://www.disney.se/kalleanka/
Quack-quack...
:)
Petri Oksanen
(Aku Ankka)
------------------------------
Date: Fri, 16 Mar 2001 22:10:24 GMT
From: "David M. Lloyd" <david@freemm.org>
Subject: Re: Overloading in OO perl
Message-Id: <Pine.LNX.4.21.0103161603400.13798-100000@homebody.freemm.org>
On 16 Mar 2001, Paul the Nomad wrote:
> I've been through the docs (haven't got that Perl OO book though) and
> I can't see any recommendations for overloading constructors in OO
> Perl. Just so where you know I'm coming from, I have a bit of a Java
> background. In Java overloading constructors is an easy thing to do.
>
> Basically, I want my constructor to behave differently if I pass it
> nothing, an int or an array ref.
>
> Are if...else statements the best way to do this?
Yes, although I would take a slightly different approach:
sub new {
my ($class, $arg) = @_;
my $self = bless ({}, $class);
if (ref($arg)) {
# Treat it like an array ref, because if it
# isn't, it's really the user's fault :)
} elsif (defined($arg)) {
# Treat it like an integer for the same reason
# as above
} else {
# No argument given
}
}
Note the use of 'my'. Variables are global by default which is almost
always not what you want. In fact, undeclared variables will give you a
compile time error if you use strict (which you should really always do).
> So it would end up looking something like this:
>
> sub new {
>
> $class = shift;
> $anArg = shift;
> $self = {};
> bless ($self, $class);
>
> if (ref $anArg eq ARRAY) {
> do something
> }
>
> elsif ($anArg =~ /^\d+$/ ) {
>
> do something else
> }
>
> else {
>
> do something entirely different
> }
>
> }
- D
<david@freemm.org>
------------------------------
Date: Fri, 16 Mar 2001 22:51:30 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: pattern matching
Message-Id: <1665btotfapjtl3glcjklkvccffb50of63@4ax.com>
Milliwave wrote:
>m/^P\s*(\S*)\s*(\S*)\s*(\S*)\s*(\S*)\s*(\S*)\s*(\S*)\s*(\S*)\s*(\d*|-\d*)/)
You don't want a long series of submatches that can allhave zero length!
That will very likely sooner or later end up matching something your
didn't want. Replace most stars by plusses, and you'll be a lot closer
to what you want.
Oh, and (\d+|-\d+) is better written as (-?\d+), where the minus sign is
optional.
--
Bart.
------------------------------
Date: Fri, 16 Mar 2001 11:06:46 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Perl 4
Message-Id: <3AB26446.FC2B49DF@stomp.stomp.tokyo>
Tony L. Svanstrom wrote:
> Bart Lateur wrote:
> > Uri Guttman wrote:
> > > perl4 is buggy
> > > and unsupported. even moronzilla uses perl5 now.
> > And what does that prove? ;-)
> That even trolls and stupid people can learn,
> it just takes a lil longer. =)
Will you look at that! Three trolls in a tub!
Rub-a-dub-dub!
I do hope you boys are practicing safe tub.
Godzilla!
------------------------------
Date: Fri, 16 Mar 2001 19:44:40 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Perl 4
Message-Id: <x7itl97b2v.fsf@home.sysarch.com>
>>>>> "G" == Godzilla! <godzilla@stomp.stomp.tokyo> writes:
G> Tony L. Svanstrom wrote:
>> Bart Lateur wrote:
>> > Uri Guttman wrote:
>> > > perl4 is buggy
>> > > and unsupported. even moronzilla uses perl5 now.
>> > And what does that prove? ;-)
>> That even trolls and stupid people can learn,
>> it just takes a lil longer. =)
G> Will you look at that! Three trolls in a tub!
you do have a warped view as we all know. but if all of us are trolls
but you, does that make any sense? who would be be trolling, just you?
what about the years of this group before you were ever here (blessed
time that was)? were we just trolling each other waiting for you to come
in and save us? the ratio of trolls to normal posters in your addled
brain makes little sense. so you have learned a little perl here and on
a blue moon have even politely asked for help, but when will you finally
realize that you are the troll and not wanted. we are the group - not
you.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: Fri, 16 Mar 2001 20:46:19 +0000 (UTC)
From: rapid_response@memecdesign.com ("rapid_response")
Subject: PERL and ASP
Message-Id: <BIEFIDFMNNNMGFCLKGEOAEEMCAAA.rapid_response@memecdesign.com>
Hello Perl Guru’s
I am new to PERL, however, I have searched endlessly for two days to be in
the know. My search began when my boss handed me a perl file and asked me
to impliment a procedure to unleash its magic on our intranet users. The
procedure requires a data file to be uploaded to the webserver and read by
the perl file to write an fpga (field programmable gate array)graphical
layout onto an html page. The perl file runs appropriately from the command
line. My question is, how can I programmatically launch the perl file from
an active server page after the asp uploads the data file to the webserver.
It seems to me that there ought to be a way to achieve the command line
result with two or three lines of script. I have searched to no avail.
Your assistance would be greatly appreciated in this regard.
I have successfully installed ActivePerl and ActiveScript and am running in
the ISAPI environment.
--
Posted from root@mail.calweb.com [209.210.251.12]
via Mailgate.ORG Server - http://www.Mailgate.ORG
------------------------------
Date: Fri, 16 Mar 2001 16:22:06 -0500
From: Shane McDaniel <shanem@ll.mit.edu>
Subject: Re: PERL and ASP
Message-Id: <3AB283FE.9A9D4123@ll.mit.edu>
Unfortunatly this seems to be and ASP question, ie "How can I run a
command on the server from an ASP". You should probably try to find the
ASP newsgroup and ask there. Good luck.
rapid_response wrote:
>
> Hello Perl Guru’s
>
> I am new to PERL, however, I have searched endlessly for two days to be in
> the know. My search began when my boss handed me a perl file and asked me
> to impliment a procedure to unleash its magic on our intranet users. The
> procedure requires a data file to be uploaded to the webserver and read by
> the perl file to write an fpga (field programmable gate array)graphical
> layout onto an html page. The perl file runs appropriately from the command
> line. My question is, how can I programmatically launch the perl file from
> an active server page after the asp uploads the data file to the webserver.
> It seems to me that there ought to be a way to achieve the command line
> result with two or three lines of script. I have searched to no avail.
> Your assistance would be greatly appreciated in this regard.
>
> I have successfully installed ActivePerl and ActiveScript and am running in
> the ISAPI environment.
>
> --
> Posted from root@mail.calweb.com [209.210.251.12]
> via Mailgate.ORG Server - http://www.Mailgate.ORG
------------------------------
Date: 16 Mar 2001 20:18:33 GMT
From: jtschetter@nospam.vermeermfg.com
Subject: pretty print cron?
Message-Id: <98tsep$pq3$1@news.netmar.com>
Does anyone have or know of a script that will take a crontab as input and
output some format that "user" could understand? It wouldn't really
matter
if it was text or html or whatever.
Just kinda wanted to check and see if there was something there before
reinventing the wheel.
TIA
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net
------------------------------
Date: 16 Mar 2001 14:52:10 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: pretty print cron?
Message-Id: <87k85pxwqt.fsf@limey.hpcc.uh.edu>
>> On 16 Mar 2001 20:18:33 GMT,
>> jtschetter@nospam.vermeermfg.com said:
> Does anyone have or know of a script that will take a
> crontab as input and output some format that "user"
> could understand? It wouldn't really matter if it was
> text or html or whatever.
As always, head straight to http://search.cpan.org/ (do
not pass go) and search for, ooooh, let's say "cron" :-)
Is that what you're after?
hth
t
--
Just reach into these holes. I use a carrot.
------------------------------
Date: 16 Mar 2001 19:09:49 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Print own "die" message
Message-Id: <slrn9b4p7s.g3l.abigail@tsathoggua.rlyeh.net>
Chris Stith (mischief@velma.motion.net) wrote on MMDCCLIV September
MCMXCIII in <URL:news:tb4hpdtf342gd4@corp.supernews.com>:
{} Abigail <abigail@foad.org> wrote:
{} > Chris Stith (mischief@velma.motion.net) wrote on MMDCCLIV September
{} > MCMXCIII in <URL:news:tb2oft11ue6p71@corp.supernews.com>:
{} > || Bart Lateur <bart.lateur@skynet.be> wrote:
{} > || > Chris Stith wrote:
{} > ||
{} > || >>Or even execute a block in which your print() your message then
{} > || >>exit() -- or you can do that inside a die handler...
{} > ||
{} > || > The good thing about the __DIE__ handler is taht it also works on fatal
{} > || > errors that you didn't expect. Assign it in a BEGIN block upfront your
{} > || > script, and it will even catch syntax errors.
{} > ||
{} > || True. I hadn't thought about using DIE to catch syntax errors, though.
{}
{} > Actually, it turns out syntax errors are mere warnings, triggering
{} > $SIG{__WARN__}.
{}
{} Upon testing, $SIG{__WARN__} does not get executed for me
{} during a syntax error under 5.005_03 or 5.6.0 on Linux
{} (RedHat 6.2, kernel 2.2.17, glibc 2.1.3), but $SIG{__DIE__}
{} does. Here's my test script:
{}
{} ###--- _begin_ _code_ ---
{} #!/usr/bin/perl -w
{} use strict;
{}
{} sub BEGIN {
{} $SIG{__DIE__} = sub {
{} print "ARGH!\n";
{} exit(0);
{} };
{} }
{}
{} my $foo = = 3 + 4;
{} print $foo . "\n";
{} ###--- _end_ _code_ ---
{}
{} Do other syntax errors really come up under warn instead of die?
{} Should that be considered a bug (not that it would use warn --
{} although I'd personally consider just a warning on a syntax error
{} a bad idea -- but that it would trigger one or the other)?
The advantage of a warning is that the parser still can continue to
parse the rest - it's considered a benefit for the programmer to get
as many error reported as possible, instead of giving up after the
first bug.
I guess some syntax error are fatal enough to have it give up.
Abigail
--
print v74.117.115.116.32.97.110.111.116.104.101.114.
v32.80.101.114.108.32.72.97.99.107.101.114.10;
------------------------------
Date: Fri, 16 Mar 2001 21:01:17 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Print own "die" message
Message-Id: <tb4votcvurv68c@corp.supernews.com>
Abigail <abigail@foad.org> wrote:
> Chris Stith (mischief@velma.motion.net) wrote on MMDCCLIV September
> MCMXCIII in <URL:news:tb4hpdtf342gd4@corp.supernews.com>:
> {} Abigail <abigail@foad.org> wrote:
> {} Do other syntax errors really come up under warn instead of die?
> {} Should that be considered a bug (not that it would use warn --
> {} although I'd personally consider just a warning on a syntax error
> {} a bad idea -- but that it would trigger one or the other)?
> The advantage of a warning is that the parser still can continue to
> parse the rest - it's considered a benefit for the programmer to get
> as many error reported as possible, instead of giving up after the
> first bug.
I understand the advantage to continuing to parse after an error,
but I usually think of an actual `syntax' error as something that
is invalid code and should be fatal (not allow the compilation
to fully finish and let you try to run the code). Warnings are
usually for logic bugs, such as unitialized values, invalid
subscripts (in languages where such things exist ;-), etc.
I did get a warn handler in a BEGIN block to give me a custom
message upon an unitialized value being used, and then continue
with the program.
> I guess some syntax error are fatal enough to have it give up.
I still think any actual syntax error should be fatal -- not
immediately fatal in that the parser stopos parsing and finding
other errors, but in that it shouldn't try to execute code that
has syntax errors.
Chris
--
Christopher E. Stith
Get real! This is a discussion group, not a helpdesk. You post
something, we discuss its implications. If the discussion happens to
answer a question you've asked, that's incidental. -- nobull, clp.misc
------------------------------
Date: Fri, 16 Mar 2001 21:21:01 +0100
From: Michael Schnupp <michas@nospam.uni-jena.de>
Subject: queue
Message-Id: <3AB275AD.490819E@nospam.uni-jena.de>
How can I build a queue, that can be used by more than one process?
I have a list of values, each of them is the base of some computation.
Now I want to use a few processes to do the work, i.e. get the next
value and do the computation.
Any idea, how to do that? (or a better solution?)
thanks
michas
--
----------------------------------------------
Ehrman's Commentary:
(1) Things will get worse before they get better.
(2) Who said things would get better?
----------------------------------------------
------------------------------
Date: 16 Mar 2001 14:47:24 -0600
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: queue
Message-Id: <98tu4s$b6$1@boomer.cs.utexas.edu>
In article <3AB275AD.490819E@nospam.uni-jena.de>,
Michael Schnupp <michas@nospam.uni-jena.de> wrote:
>How can I build a queue, that can be used by more than one process?
>
>I have a list of values, each of them is the base of some computation.
>Now I want to use a few processes to do the work, i.e. get the next
>value and do the computation.
The easiest way to do this is on disk. Create a file for each job, and
have the worker processes lock the files to prevent simultaneous access
and delete them (or rename them) when finished.
If the jobs are large, this is a good way because it's relatively
scaleable. If the jobs are small, this isn't a good way because of the
relatively large fixed overhead per job. You can get around that by
putting the jobs together as a batch, or you can use another method.
The most obvious other method is to create a server process that
accepts network (or local IPC) connections and on those connections
allows the client to submit work units or to claim them and work on
them. This method has potential, but it's tricky to make it
scaleable. You'd want either a connectionless protocol or persistent
connections and the ability to service several at once. Personally,
I'd go for the connectionless protocol, but then you have to have a way
of transferring the work units over this protocol, which means
implementing a file transfer protocol, in effect. You could also use
shared memory, I guess.
- Logan
--
whose? my your his her our their _its_
who's? I'm you're he's she's we're they're _it's_
------------------------------
Date: Fri, 16 Mar 2001 19:33:56 -0000
From: "Chile" <abcd@ntlworld.com>
Subject: Quick struct question in perl. example code inc
Message-Id: <7Ets6.2207$bL.217777@news6-win.server.ntlworld.com>
Hi,
Can someone tell me if its possible to repreoduce the below c code in perl?
struct File_Info
{
char filename[40];
int filesize;
int nofiles;
char storefilename[40];
};
File_Info filenamedata[20];
i was trying something like this but could not get it working
struct( File_Info => {
filename => '$',
filesize => '$',
nofiles => '$',
storefilename => '$',
});
my @filenamedata = new File_Info;
$fileinfodata[1]->filename('test.bat');
thanks for reading,
Scott
------------------------------
Date: Fri, 16 Mar 2001 15:26:48 -0500
From: jtjohnston <jtjohnston@courrier.usherb.ca>
Subject: smtp
Message-Id: <3AB27708.6ABE30E1@courrier.usherb.ca>
Below is my script.
Below is what my browser spits back at me.
Why does it do that? I just want to print the html I specified. It used
to work fine?
Is there something not configured right in my SMTP.pm?
John
(An email post & reply response is appreciated. I cannot always use my
nntp from work. By the itme i can get back, my posts are erased.)
I'm running from a perl.exe (www.sambar.com) with lib-net installed.
------------------------------------------------------------------------------------------
#!
#../perl/bin/perl.exe -w
#!d:\sambar41\perl\bin\perl.exe -w
$email = "jtjohnston\@courrier.usherb.ca";
$recip = "jtjohnston\@girouard.qc.ca";
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<BODY bgcolor=white>\n";
print "<$ENV{USER}>\n";
print "<hr>\n";
use Net::SMTP;
$smtp = Net::SMTP->new('interlinx.qc.ca', Debug => 1);
$smtp->mail($ENV{USER});
$smtp->to("$email");
$smtp->data();
$smtp->datasend("From: $recip\n");
$smtp->datasend("To: $email\n");
$smtp->datasend("\n");
$smtp->datasend("321 - A simple test message\n");
$smtp->dataend();
$smtp->quit;
print "<P ALIGN=Center>fid\n";
print "</BODY>\n";
print "</HTML>\n";
exit;
------------------------------------------------------------------------------------------
Net::SMTP: Net::SMTP(2.0901) Net::SMTP: Net::Cmd(2.0801)
Net::SMTP: Exporter Net::SMTP: IO::Socket::INET Net::SMTP:
IO::Socket(1.1602) Net::SMTP: IO::Handle(1.1504)
Net::SMTP=GLOB(0x79f278)<<< 220 phyleus.interlinx.qc.ca ESMTP
Sendmail 8.10.1/8.10.1; Fri, 16 Mar 2001 15:21:56 -0500
Net::SMTP=GLOB(0x79f278)>>> EHLO eslcafe.com
Net::SMTP=GLOB(0x79f278)<<< 250-phyleus.interlinx.qc.ca Hello
utc-2-36.interlinx.qc.ca [207.253.146.106], pleased to meet you
Net::SMTP=GLOB(0x79f278)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0x79f278)<<< 250-EXPN
Net::SMTP=GLOB(0x79f278)<<< 250-VERB
Net::SMTP=GLOB(0x79f278)<<< 250-8BITMIME
Net::SMTP=GLOB(0x79f278)<<< 250-SIZE 6000000
Net::SMTP=GLOB(0x79f278)<<< 250-DSN
Net::SMTP=GLOB(0x79f278)<<< 250-ONEX
Net::SMTP=GLOB(0x79f278)<<< 250-ETRN
Net::SMTP=GLOB(0x79f278)<<< 250-XUSR
Net::SMTP=GLOB(0x79f278)<<< 250 HELP
Net::SMTP=GLOB(0x79f278)>>> MAIL FROM:<>
Net::SMTP=GLOB(0x79f278)<<< 250 2.1.0 <>... Sender ok
Net::SMTP=GLOB(0x79f278)>>> RCPT TO:
Net::SMTP=GLOB(0x79f278)<<< 250 2.1.5 ... Recipient ok
Net::SMTP=GLOB(0x79f278)>>> DATA
Net::SMTP=GLOB(0x79f278)<<< 354 Enter mail, end with "." on a line
by itself Net::SMTP=GLOB(0x79f278)>>> From:
jtjohnston@girouard.qc.ca Net::SMTP=GLOB(0x79f278)>>> To:
jtjohnston@courrier.usherb.ca Net::SMTP=GLOB(0x79f278)>>>
Net::SMTP=GLOB(0x79f278)>>> 321 - A simple test message
Net::SMTP=GLOB(0x79f278)>>> . Net::SMTP=GLOB(0x79f278)<<<
250 2.0.0 f2GKM7p24884 Message accepted for delivery
Net::SMTP=GLOB(0x79f278)>>> QUIT
Net::SMTP=GLOB(0x79f278)<<< 221 2.0.0 phyleus.interlinx.qc.ca
closing connection Content-type: text/html <>
fid
------------------------------
Date: Fri, 16 Mar 2001 21:20:13 GMT
From: dennis <dennis.moreno@pop.safetran.com>
Subject: Sol 2.8, Perl 5.6.0 - Bug with getpwent?
Message-Id: <3AB2838A.CCD277C7@pop.safetran.com>
Can someone help with this code?
Solaris 2.8, perl 5.6.0
This code should sequentially read the /etc/passwd file and print out
the gcos field, login name field
and "No", if the password field contains *LK*(which means the account in
disabled), or "Yes" if it doesn't.
It seems like the reading of the /etc/passwd and /etc/shadow by
"getpwent" get out of sync.
Can anyone shed some light on what might be happening?
thanks
Dennis
=================================================================
use strict;
my $tmplist = "members" . ".tmp";
# Open the tmplist file and begin writing
open (TMPLIST, ">$tmplist") || die "cannot open $tmplist for
writing: $!\n";
setpwent();
while ( my @list = getpwent() ) {
my $member = 0;
my $enabled = 'Yes';
my ($name,$passwd,$fullname) = @list[0,1,5];
if ( $passwd =~ /^\*LK\*$/ ) {
$enabled = 'No';
}
printf TMPLIST "%-30s\t%-15s\t%-7s\r\n",
$fullname,$name,$enabled;
}
endpwent();
close (TMPLIST) || die "can't close $tmplist: $!\n";
exit;
------------------------------
Date: Fri, 16 Mar 2001 15:52:57 -0700
From: "Dave Stang" <mustang@astekcorp.com>
Subject: Subroutine in separate files
Message-Id: <pNws6.628$9o.461710@news.uswest.net>
I have a rather large perl script that I have broken into several
subroutines. For manageability, I would like to keep the subroutines in
separate files.
Is there a way to do this without re-making perl? Are there any example to
copy from?
Dave
--
Dave Stang
4615 Northpark Drive, Suite 206
Colorado Springs, CO 80918
(719) 260-1625, ext 101 (voice)
(719) 260-1668 (fax)
mustang@astekcorp.com
www.astekcorp.com
------------------------------
Date: Fri, 16 Mar 2001 22:59:45 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Subroutine in separate files
Message-Id: <BVws6.1046$T3.188680704@news.frii.net>
In article <pNws6.628$9o.461710@news.uswest.net>,
Dave Stang <mustang@astekcorp.com> wrote:
>I have a rather large perl script that I have broken into several
>subroutines. For manageability, I would like to keep the subroutines in
>separate files.
>
>Is there a way to do this without re-making perl? Are there any example to
>copy from?
>
>Dave
>
Read in the perl manual about 'require'.
chris
--
This space intentionally left blank
------------------------------
Date: Fri, 16 Mar 2001 19:19:47 GMT
From: "Kalle Anka" <kalle@tvettsvamp.a.se>
Subject: Thank you Lou!
Message-Id: <nHts6.201$4N4.60204@newsc.telia.net>
Thank you Lou!
The fact that I'm or anyone else who is not very English or have a low
knowledge about Perl, should not restrain anyone to use this group. The
elite in any subject should always act with humility and keep their
testosterterone low to obtain respect from others.
Kalle
Sweden
------------------------------
Date: Fri, 16 Mar 2001 14:17:37 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: Thank you Lou!
Message-Id: <3AB274E1.A6D7964C@home.com>
Kalle Anka wrote:
>
> The fact that I'm or anyone else who is not very English or have a low
> knowledge about Perl, should not restrain anyone to use this group.
No, it shouldn't, and questions are occasionally posted in German,
French, or other languages. However, in an international forum such as
this English is accepted as the "common" tongue. (Thankfully for poor
Americans like myself who were not given a multi-lingual education from
an early age.) There are language-specific versions of this newsgroup in
some regions which may be a better resource for you if you struggle with
English.
> The elite in any subject should always act with humility and keep
> their testosterterone low to obtain respect from others.
Don't flatter Godzilla! by grouping her among the Perl elite -- she has
no place there. She's just a troll who delights in causing arguments.
Most of the regulars here have long since killfiled her. I advise all
others to ignore her as well.
That said, your comment (taken generally) is sound. :)
-mjc
------------------------------
Date: Fri, 16 Mar 2001 12:50:18 -0800
From: Mark Thompson <mark-lists@webstylists.com>
Subject: Username/password from an HTML form
Message-Id: <i0v4bt464aim5fns512h6iuncgfq97c84l@4ax.com>
I've set up a simple password protection system using basic
authentication with an .htaccess file and password file that works.
When someone requests a page that is protected, the browser brings up
a dialog box that asks for the username and password and if they enter
the correct information, it gives them what they're looking for.
What I'd like to do is have username and password fields on an HTML
form with a submit button instead of a popup window that has the same
functionality.
Is this something that is possible? I've spent all evening looking at
FAQs and Perl manuals but haven't been able to find anything that says
this is possible to do (I also haven't seen anything that says it's
not possible either.)
I already posted this in the cgi newsgroup but decided after the fact
to post it here too since if this is possible, it will end up having
to be done in Perl by myself.
------------------------------
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 V10 Issue 508
**************************************