[12853] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 263 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 26 17:17:19 1999

Date: Mon, 26 Jul 1999 14:10:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 26 Jul 1999     Volume: 9 Number: 263

Today's topics:
    Re: Replacing and Stripping HTML <keithmur@mindspring.com>
    Re: Screen addressing (Abigail)
    Re: Screen addressing <Robert.Rawlinson@worldnet.att.net>
        Server 500 error? <Stuart@worm.globalnet.co.uk>
    Re: Server 500 error? <jbc@shell2.la.best.com>
    Re: Server 500 error? (Abigail)
    Re: SSI command in Perl script problem (Abigail)
    Re: Stock Options are there to keep you working there f <tony@alicea.org>
        stopping email overflow on failure (Steve .)
    Re: stopping email overflow on failure (brian d foy)
    Re: stopping email overflow on failure (Abigail)
        vote.pl assistance dbrodigan@my-deja.com
    Re: Which group is appropriate? <keithmur@mindspring.com>
    Re: Which group is appropriate? <toby@venice.cas.utk.edu>
    Re: Why use /s in Cookbook recipe 20.6? <dgris@moiraine.dimensional.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 26 Jul 1999 15:33:01 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Replacing and Stripping HTML
Message-Id: <379CC5FD.6C64A697@mindspring.com>

Abigail wrote:
> 
> Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCLIV September
> MCMXCIII in <URL:news:7netc9$5hs$1@lublin.zrz.tu-berlin.de>:
> () Faisal Nasim <swiftkid@bigfoot.com> wrote in comp.lang.perl.misc:
> () >: Here is what I am trying to do:
> () >:
> () >: 3.  Strip remaining HTML from the file
> () >
> () >look at HTML::Parser
> ()
> () ...which may or may not work after the </FONT> thingies (are those tags?)
> () have been replaced.
> 
> Oh, sure it will. Don't forget HTML::Parser doesn't parse, and has no
> HTML knowledge. 
Well, HTML::TreeBuilder, which is built on it and what you'd actually
want to use, has *some* HTML knowledge.
> Penguin::BBQ would have been a less confusing name.
You mean it will roast my Linux system?  I'll get it off of there
immediately.  Either that, or apply a good sauce.
> 
> HTML::Parser tokenizes something. It has knowledge of tags with TAGO = '<',
> ETAGO = '</', TAGC = '>', and it knows how to deal with comments. But that's
> about it. It doesn't know about marked sections, nettags, and not even CDATA
> marked sections.
Marked sections?  Nettags?  CDATA marked sections?  Is this part of HTML
4.0?
> 
OK, I'll bite.  Are you working on something better?  I'd like to have
it in my hot little hands.  :-)


------------------------------

Date: 26 Jul 1999 15:53:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Screen addressing
Message-Id: <slrn7ppikr.lg7.abigail@alexandra.delanet.com>

Robert Rawlinson (Robert.Rawlinson@worldnet.att.net) wrote on MMCLV
September MCMXCIII in <URL:news:379C8261.1C2F53F8@worldnet.att.net>:
!! I need to address area's on a terminal screen. I want to put up a form
!! and then one by one address the area on the screen and get entries. I
!! seem to be unable to find anything in the CAMEL or LAMA books on doing
!! this. Could someone point me to a man page or a book to get me started?


Look for the curses modules on CPAN.


Abigail
-- 
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))


  -----------== 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: Mon, 26 Jul 1999 16:59:27 -0400
From: Robert Rawlinson <Robert.Rawlinson@worldnet.att.net>
Subject: Re: Screen addressing
Message-Id: <379CCC2F.B324FAF1@worldnet.att.net>

Thanks. I looked it up and I think its what I need.

Abigail wrote:

> Robert Rawlinson (Robert.Rawlinson@worldnet.att.net) wrote on MMCLV
> September MCMXCIII in <URL:news:379C8261.1C2F53F8@worldnet.att.net>:
> !! I need to address area's on a terminal screen. I want to put up a form
> !! and then one by one address the area on the screen and get entries. I
> !! seem to be unable to find anything in the CAMEL or LAMA books on doing
> !! this. Could someone point me to a man page or a book to get me started?
>
> Look for the curses modules on CPAN.
>
> Abigail
> --
> sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
> f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
> f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))
>
>   -----------== 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 ==-----

--
Robert A. Rawlinson
E. Eileen Rawlinson          ________
3456 Franklin Road          | [][]    \________________
Felicity, Oh 45120     ___  |_______                   |
(513) 876-3256     ___/___|___+___  |       []  [][]   |
(517) 382-7263    |   |   |       | |                  |
                  =()--------()---= -----------()()----=




------------------------------

Date: Tue, 27 Jul 1999 19:46:33 +0100
From: "Stuart" <Stuart@worm.globalnet.co.uk>
Subject: Server 500 error?
Message-Id: <7nianm$9si$1@gxsn.com>

I am new to cgi programming and have written a script in Perl and placed it
in the CGI-BIN directory in Personal Web Server. When ever running it though
I get a HTTP 500 server error, would anyone be kind enough to explain what
this means as I can't find it in any documentation.
--
 - Stuart
 - Newsgroups@worm.globalnet.co.uk
Turner & King Communications
 - Web Design - takc@worm.globalnet.co.uk





------------------------------

Date: 26 Jul 1999 20:19:28 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: Server 500 error?
Message-Id: <379cc2d0$0$201@nntp1.ba.best.com>

Stuart <Stuart@worm.globalnet.co.uk> wrote:
> I am new to cgi programming and have written a script in Perl and placed it
> in the CGI-BIN directory in Personal Web Server. When ever running it though
> I get a HTTP 500 server error, would anyone be kind enough to explain what
> this means as I can't find it in any documentation.

It probably means the server saw something besides a valid header
(an error message of some sort, most likely) coming back from your
script. You need to locate the server's error log and see what was
reported there. Another useful technique is to run the script manually,
from the command line, to see what happens.

Useful resources for you would be the following documents:

http://language.perl.com/CPAN/doc/FAQs/cgi/perl-cgi-faq.html
http://www.smithrenaud.com/public/CGI_MetaFAQ.html

I was going to refer you to some more documents at www.perl.com, but it
appears to be taking a (most uncharacteristic) powder at the moment,
returning, in fact, 500 errors. Small world, eh?

Anyway, the above should get you started. Also, in the future you
probably will get better responses posting these sorts of questions to
the comp.infosystems.www.authoring.cgi newsgroup.

-- 
John Callender
jbc@west.net
http://www.west.net/~jbc/


------------------------------

Date: 26 Jul 1999 15:55:28 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Server 500 error?
Message-Id: <slrn7ppioi.lg7.abigail@alexandra.delanet.com>

Stuart (Stuart@worm.globalnet.co.uk) wrote on MMCLVI September MCMXCIII
in <URL:news:7nianm$9si$1@gxsn.com>:
^^ I am new to cgi programming and have written a script in Perl and placed it
^^ in the CGI-BIN directory in Personal Web Server. When ever running it though
^^ I get a HTTP 500 server error, would anyone be kind enough to explain what
^^ this means as I can't find it in any documentation.


Try the book "one hundred penguin recipies". It's probably not in there,
but preparing penguins on a stove has as much to do with HTTP as Perl has.

Let me rephrase that: go ask somewhere else.



Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


  -----------== 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: 26 Jul 1999 16:00:05 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: SSI command in Perl script problem
Message-Id: <slrn7ppj19.lg7.abigail@alexandra.delanet.com>

Steven Filipowicz (steven@*REMOVE*filipowicz.com) wrote on MMCLV
September MCMXCIII in <URL:news:933008269.10019.0.pluto.c30bf8a6@news.demon.nl>:
%% 
%% I've tried this :
%% 
%%    @results=system
%% '/opt/guide/www.gebruikte-auto.com/cgi-bin/countit/countit.pl';
%%    print "@results visits.\n";
%% 
%% But doesn't work.


That doesn't work... that doesn't work.... Could you please be less
specific? "doesn't work" pinpoints what's going on so precisely, it
becomes too hard to say more about it.


Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


  -----------== 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: Mon, 26 Jul 1999 16:38:00 -0400
From: Tony Alicea <tony@alicea.org>
Subject: Re: Stock Options are there to keep you working there for the "LONG  TERM"
Message-Id: <379CC728.1309B2F5@alicea.org>

Very good point, Mr. Webmaster! :-)

webmaster wrote:
> 
> Excuse me, What do you mean by "LONG TERM"?  In
> Internet TIME, "LONG TERM" IS LESS THAN OR EQUAL
> TO ONE (1) YEAR.
> 

---
Tony Alicea, Software Engineer
Orlando, FL
(USA)


------------------------------

Date: Mon, 26 Jul 1999 19:40:32 GMT
From: syarbrou@nospam.enteract.com (Steve .)
Subject: stopping email overflow on failure
Message-Id: <379cb90c.279163210@news.enteract.com>

I have a program on my unix box that runs every ten seconds.  If it
finds a problem, it emails the owner.  Problem is, every ten seconds
it will send out another message till the problem is rectified.  I'm
trying to work out the logic on how to prevent this.  Something like
if problem found, keep checking, but do not warn again for like
another hour.  Any ideas?  Thanks.

Steve

newsgroup replies preferred.  Remove nospam if responding thru email.


------------------------------

Date: Mon, 26 Jul 1999 16:23:37 -0400
From: brian@pm.org (brian d foy)
Subject: Re: stopping email overflow on failure
Message-Id: <brian-ya02408000R2607991623370001@news.panix.com>

In article <379cb90c.279163210@news.enteract.com>, syarbrou@nospam.enteract.com (Steve .) posted:

> I have a program on my unix box that runs every ten seconds.  If it
> finds a problem, it emails the owner.  Problem is, every ten seconds
> it will send out another message till the problem is rectified.  I'm
> trying to work out the logic on how to prevent this.  Something like
> if problem found, keep checking, but do not warn again for like
> another hour.  Any ideas?  Thanks.

maintain state and act appropriately.  have the program know that it
has already sent mail.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


------------------------------

Date: 26 Jul 1999 16:04:34 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: stopping email overflow on failure
Message-Id: <slrn7ppj9p.lg7.abigail@alexandra.delanet.com>

Steve . (syarbrou@nospam.enteract.com) wrote on MMCLV September MCMXCIII
in <URL:news:379cb90c.279163210@news.enteract.com>:
## I have a program on my unix box that runs every ten seconds.  If it
## finds a problem, it emails the owner.  Problem is, every ten seconds
## it will send out another message till the problem is rectified.  I'm
## trying to work out the logic on how to prevent this.  Something like
## if problem found, keep checking, but do not warn again for like
## another hour.  Any ideas?  Thanks.


Well, you could put two big aquaria in the server room. Put a goldfish
in the right one. If the program finds a problem, it first looks where
the goldfish is; if it's in the right aquarium, it sends out a message,
and puts the goldfish in the left aquarium. If the goldfish is already
in the left aquarium, doesn't do anything else anymore.

If there's no problem to be found, it also checks where the goldfish is.
If it's in the left aquarium, it puts the goldfish back in the right
aquarium.

This is a general coding problem, not a Perl specific one. I assume you
can take the story above, and turn it into a solution more suitable for
a computer. If not, go ask in a general programming group.




Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'


  -----------== 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: Mon, 26 Jul 1999 19:32:28 GMT
From: dbrodigan@my-deja.com
Subject: vote.pl assistance
Message-Id: <7nid4c$s9a$1@nnrp1.deja.com>

I downloaded a script called vote.pl. I configured
it to run on my w32 apache using perl 5.0. It
seems to be running ok, however, when I modified
it by expanding the groups, it displays the
variable as if it was html whereas it should be
interpreted like the other variables. I'm unable
to located where this variable discrepancy is,
could someone help me find it. hit the result html
portion to see what I'm looking at. thanks
http://sxdrb.sons.alaska.edu/specialty/voting/Judg
evote.html


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: Mon, 26 Jul 1999 15:22:48 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Which group is appropriate?
Message-Id: <379CC398.36A64194@mindspring.com>

John Callender wrote:
> 
> Abigail <abigail@delanet.com> wrote:
> > Kevin Kinnell (kejoki@netdoor.com) wrote on MMCLIV September MCMXCIII in
> > <URL:news:379A7B23.237A5761@netdoor.com>:
> 
> > ** Is there a group where Perl novices--who don't have all of
> > ** the faqs memorized and are just exploring how to get things
> > ** done--should be posting so that they may figure things out
> > ** together instead of pestering the experts and exposing them-
> > ** selves to the inevitable ridicule that attends learning how
> > ** to fit into a new culture?
> 
[cut]
> 
> A group specifically for beginners could help ease some of the cultural
> clashes, I believe. I've heard many of the standard arguments against
> it, but I really think it would be worth a try.
> 
OK, let's try a little thought experiment.  Suppose on *this* NG you
could put something into your subject line, like, oh, "[NR]" for "no
ridicule", and this would tip off Abigail et al. that they needn't
bother looking at the message (in fact, they could just filter them
out).  Only the most tolerant and the newbies would look at the message.

Would you do it?  I wouldn't.  And can't imagine why you would.  And
what's the difference between that and having a newbie newsgroup?  But
if that's really what you want, hell, start it up.  Why would I care? 
I'll never go there.

While you're at it, start a system of roads where beginning motorists
can drive without worrying about being pulled over for reckless
driving.  That would be a pleasant place to be, wouldn't it?  Just where
you'd want your kids learning to drive, eh?  ;-)


------------------------------

Date: Mon, 26 Jul 1999 16:34:22 -0400
From: toby <toby@venice.cas.utk.edu>
Subject: Re: Which group is appropriate?
Message-Id: <379CC64E.2F775254@venice.cas.utk.edu>



Jonathan Stowe wrote:

> No you've just got to read the documentation and then take the
> ridicule just like everyone else ... You'll be better for it in the
> end.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>

Now that's the Socratic Method at work. Please, how does ridicule help anyone?
Does it toughen them up? If so, when exactly does a programmer need to be tough?
Makes me think of Nietzsche's nasty little barb:

'From the military school of life: What does not kill me only make me stronger'
-- Twilight of The Idols.

A cliche (at best), but it illustrates a point: 'Since when is an open society
like the Perl community ordered like some badgering Marine Corps platoon
exercise?'

Hmmm.

Toby



------------------------------

Date: 26 Jul 1999 12:25:05 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Why use /s in Cookbook recipe 20.6?
Message-Id: <m3pv1f5kvy.fsf@moiraine.dimensional.com>

John Callender <jbc@shell2.la.best.com> writes:

<snip>
> {
>     local $/;       # temporary whole-file input mode
>     $html = <FILE>;
>     $html =~ s/<[^>]*>//gs;
> }
> 
> My question is, why is the /s modifier there? 

Good question, it isn't needed.

> My understanding is that that only affects the behavior of . (making
> it match a newline).

Correct.

> Doesn't the negated character class [^>] match \n without the /s
> modifier? 

Yes.

<snip example>

> Am I missing something obvious here? 

No.  It's just an extra flag.

> Is it maybe just a stylistic thing, a clue for the reader of the
> code that the expression is expected to match across multiple lines,
> rather than something that's strictly necessary from perl's point of
> view?

That's sounds reasonable.  I usually add /s to regular expressions
that I expect will be receiving data with embedded newlines, even if
there isn't a `.' in the expression.  It works for me as a reminder
that the data I'm expecting is `unusual' in some way.  It also ensures
that if I add a `.' later that it will probably do what I meant it to.

dgris
-- 
It's good to live in the bleeding edge ;-)


------------------------------

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 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.  

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 V9 Issue 263
*************************************


home help back first fref pref prev next nref lref last post