[14035] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1445 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 20 18:10:14 1999

Date: Sat, 20 Nov 1999 15:05:20 -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: <943139119-v9-i1445@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 20 Nov 1999     Volume: 9 Number: 1445

Today's topics:
    Re: "The Art of Perl" (was Re: Perl programming sytle) <rothd@roth.REMOVE.net>
    Re: [JOB]: Web Developer/Senior Web Developer: SGML, XM <digitalsorceress@d1g1t4!$0rc3$$.com>
    Re: alias a mailer <gellyfish@gellyfish.com>
    Re: binary database (Kragen Sitaker)
        Can Perl Answer Prompts <gebhardt@erinet.com>
    Re: Can Perl Answer Prompts (Mark-Jason Dominus)
    Re: Can Perl Answer Prompts lee.lindley@bigfoot.com
    Re: Defeating web-based http proxies <rootbeer@redcat.com>
        dynamic perl (Les Neste)
    Re: file descriptors already used when perl starts (Ilya Zakharevich)
    Re: file descriptors already used when perl starts (Abigail)
    Re: file descriptors already used when perl starts (Ilya Zakharevich)
    Re: file empty? <flavell@mail.cern.ch>
    Re: file empty? (Abigail)
    Re: file empty? <uri@sysarch.com>
    Re: Fork Children w/ Expect <rootbeer@redcat.com>
    Re: Generating pi <jarrowwx@NOSPAM.home.com>
    Re: Generating pi (Mark-Jason Dominus)
    Re: Generating pi (Ilya Zakharevich)
    Re: Getting HTML tags via regular expression (Abigail)
    Re: Getting HTML tags via regular expression <uri@sysarch.com>
    Re: Getting HTML tags via regular expression (Abigail)
    Re: Help with understanding syntax (Mark-Jason Dominus)
    Re: How do I set up a cgi-bin on Windows NT Server 4 <jeff@vpservices.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sat, 20 Nov 1999 11:36:37 -0800
From: "Dave Roth" <rothd@roth.REMOVE.net>
Subject: Re: "The Art of Perl" (was Re: Perl programming sytle)
Message-Id: <UMCZ3.62501$5W2.1736624@news6.giganews.com>


"Scott McMahan" <scott@aravis.softbase.com> wrote in message
news:Y7gZ3.277$AQ2.22013@newshog.newsread.com...
> > I was recently "chastised" by someone for programming perl on  WinNT
> > like I program C on UNIX. He insisted that I should programm more
> > "perl-like" and many of the constructs he suggested as changes were
> > definately not C-like, and were definately harder to read. (IMO)
>
> My opinion is that he needs something better to worry about.  I write
> in about 5 languages, and if I can get it to compile at all, I'm
> happy. I write C-like Perl, Java-like C++, Delphi-like Java and so on;
> use the best way of expressing the problem you can, and it should be
> something that anyone else can follow. A solution should be obvious
> enough for a competent programmer to follow (and usually a multi-line
> C-ish construction is easier to follow than a super-dense Perl one-liner
> that uses operators in weird ways to achieve some effect). Some things
> are more "Perlish" and need regexes and stuff, but other things are more
> "algorithmal" or "procedural" and can be expressed in any of the valid
> alternatives.

Well agreed. When we code for our clients we run into a problem that they
may have only C or VB experience. If we were to cop an attitude that we
program in a Perlish way this would make it difficult for them to modify the
code once the project is completed.
Personally I find if fun to obfuscate however when others have to sort
through my code they find it easier and quicker I use something like
Hungarian notation or at least break it out is an easier to follow format.
Even when I have to revise scripts that I have forgotten about it is easier
for me if the code is easy to follow.
If anyone gives you crap for your coding style they are probably not
considering others needs.

dave
--
===============================================================
Dave Roth                              ...glittering prizes and
Roth Consulting                    endless compromises, shatter
rothd@roth.remove.net                        the illusion of integrity
http://www.roth.net
Win32, Perl, C++, ODBC, Training

To send email remove the 'REMOVE.' from my reply address.

Our latest Perl book is now available:
"Win32 Perl Programming: The Standard Extensions"
http://www.roth.net/books/extensions/




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

Date: Sat, 20 Nov 1999 17:53:35 -0500
From: "DigitalSorceress" <digitalsorceress@d1g1t4!$0rc3$$.com>
Subject: Re: [JOB]: Web Developer/Senior Web Developer: SGML, XML, PERL5, LINUX
Message-Id: <qCFZ3.6186$dq4.259681@ndnws01.ne.mediaone.net>

Yeah, Good luck getting anyone to work for those kind of wages.

The Digital Sorceress


Echo the Wonder Tube wrote in message ...
>On Fri, 19 Nov 1999 12:29:44 +0000, Richard Padley
><richard@semantico.com> wrote:
>>Semantico Limited
>>Web Developer/Programmer
>>
>>The salary range for the right person is dependent on your experience
>>but will be in the range of 22-26K for a developer at the intermediate
>>level and up to 35K for a senior developer.
>
>Even in UK pounds, that's pretty light on the salary.
>




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

Date: 20 Nov 1999 18:15:15 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: alias a mailer
Message-Id: <816ofj$853$1@gellyfish.btinternet.com>

On Sat, 20 Nov 1999 17:02:56 GMT Kragen Sitaker wrote:
> In article <38376aee.997048@news.bentium.com>, Fox <hry@163.net> wrote:
>>On 20 Nov 1999 02:29:41 GMT, mgjv@wobbie.heliotrope.home (Martien
>>Verbruggen) wrote:
>>>On Fri, 19 Nov 1999 22:01:49 GMT,
>>>	Fox <hry@163.net> wrote:
>>>> hi all:
>>>> i got a problem....
>>>> in my /etc/aliases
>>>> i definded :
>>>> 
>>>> aaa:|/www/fox/test.pl
>>>> 
>>>> in /www.fox/test.pl i wrote:
>>>
>>>That's not the same thing.
>>then ,how can i  do that ?
>>>That's an error from your MTA, not from perl
>>where to change to slove this error?
> 
> "slove"?
> 

Its a kind of handwarmer made from the fur of a tree living amazonian
mammal ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sat, 20 Nov 1999 21:32:13 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: binary database
Message-Id: <xrEZ3.31655$YI2.1521218@typ11.nn.bcandid.com>

In article <812jri$bfr$1@ultra.sonic.net>,
Steven Lybeck <alanis@softhome.net> wrote:
>The reason I want to use something written completely in perl is because I
>use a host where compiled implementations of databases are not, and can not
>be installed. The only CGI that can be supported is perl.

I'll take your word for it.  Sounds like a shitty job.

>You mentioned using pack() and unpack(). I was wondering what the use of
>this would be? Would it be to shorten the number of read()'s necessary on
>the file by reading many records with one read, and then splitting them?

Oh, traditionally databases like to store things in fixed-length
records, so they can do random access and update.  Traditionally
fixed-length records are made up of fixed-length fields, which work
beautifully for things like binary numbers and dates, but less well for
text, but RDBMS guys don't care.  pack() and unpack() are very handy
for extracting the data from a record made up of fixed-length fields.

You could also use them to do big reads and then extract records, but I
doubt that would make anything faster.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Sat, 20 Nov 1999 12:14:00 -0500
From: JG <gebhardt@erinet.com>
Subject: Can Perl Answer Prompts
Message-Id: <3836D6D8.D3BBEB3E@erinet.com>

Can perl answer prompts similar to the way expect does? If so, any
special moduals needed? An exmple available?


Thanks

J Gebhardt



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

Date: Sat, 20 Nov 1999 17:27:35 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Can Perl Answer Prompts
Message-Id: <816lkp$p6r$1@monet.op.net>

In article <3836D6D8.D3BBEB3E@erinet.com>, JG  <gebhardt@erinet.com> wrote:
>Can perl answer prompts similar to the way expect does? If so, any
>special moduals needed? 

The Expect.pm module might be handy.

> An exmple available?

There's probably an example in the Expect.pm documentation.



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

Date: 20 Nov 1999 19:03:33 GMT
From: lee.lindley@bigfoot.com
Subject: Re: Can Perl Answer Prompts
Message-Id: <816ra5$7p6$2@rguxd.viasystems.com>

JG <gebhardt@erinet.com> wrote:
:>Can perl answer prompts similar to the way expect does? If so, any
:>special moduals needed? An exmple available?

perldoc -q expect

-- 
// Lee.Lindley   /// I used to think that being right was everything.
// @bigfoot.com  ///  Then I matured into the realization that getting
////////////////////   along was more important.  Except on usenet.


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

Date: Sat, 20 Nov 1999 13:01:16 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Defeating web-based http proxies
Message-Id: <Pine.GSO.4.10.9911201249140.16575-100000@user2.teleport.com>

[ Follow-ups set, in case there's any Perl-related follow-up. ]

On Fri, 19 Nov 1999, Jason wrote:

> I run a website site for an interactive community which has
> unfortunately been plagued over the years by a certain problem user
> who has in the past been responsible for harassing and stalking
> visitors. In spite of my having locked his ISP out of my site from the
> server level, he still frequently attempts to regain access, and on
> occasion succeeds, thanks to web-based proxy http servers like the
> Anonymizer, the number of which rank probably somewhere in the
> hundreds, and then thousands more of the browser-direct proxies.
> 
> I could just update my .htaccess every time I find said user logged,
> but ideally, I shouldn't have to deal with this kind of thing in the
> first place. He may have all day to try and hack his way in. I don't.
> His ISP is of no help, after having sent several e-mails to the
> administrators, and even spending an entire morning on the phone
> talking to a representative. This pretty much leaves me to deal with
> it on my own.

Well, be sure to block all accesses from WebTV, AOL, and other large ISPs.
Also block any public terminals, such as ones in libraries. He may be
using someone else's machine, so you should deny access to anyone who you
can't trust to keep him away.

Okay, I'm not being serious here. But you can't really expect to keep a
forum open to all comers and yet exclude one person. At least, you can't
do this through the net alone - you'll need something out-of-band to
authorize the real folks you want. Perhaps you should issue passwords to
everyone you trust and no one you don't. But you'll still have the
question about every newcomer: Is this him in disguise?

> Ideally, what I am looking for is some means of having the scripts on
> my site automatically reject any kind of web-based proxy server

Of course, this has nothing to do with Perl. Your problem would be the
same if you were coding only in Ada. But if that's possible at all, you
might find something useful if you search for the documentation about
proxy servers. 

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 20 Nov 1999 18:00:14 GMT
From: lesneste@mindspring.com (Les Neste)
Subject: dynamic perl
Message-Id: <3836e159.8103700@news.mindspring.com>

I just downloaded what I think is Perl 5.004 from CPAN and the readme
refers to it as 'dynamic perl'.  Can anyone tell me what is the
relationship between dynamic perl and regular perl, or are they the
same thing?

TIA.
Les Neste
lesneste@atlnewmedia.com


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

Date: 20 Nov 1999 19:19:23 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: file descriptors already used when perl starts
Message-Id: <816s7r$poi$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Mark-Jason Dominus
<mjd@op.net>],
who wrote in article <81584c$f35$1@monet.op.net>:
> `xterm' is analogous to telnetd: It locates a new pseudo-tty device
> and opens 012 onto it.  If you look into the source code for xterm you
> can see this.
> 
> It really isn't a kernel feature; it's more like a giant conspiracy
> between the programs that allocate terminals, the shells, and the C
> standard I/O library.

Thanks, this is how I thought it works (though my choice of C-isms
std* was unfortunate).  The book quoted by Abigail got it hopelessly
wrong by assigning this function to shells.

Ilya


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

Date: 20 Nov 1999 14:07:43 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: file descriptors already used when perl starts
Message-Id: <slrn83e02n.m2v.abigail@alexandra.delanet.com>

Ilya Zakharevich (ilya@math.ohio-state.edu) wrote on MMCCLXXII September
MCMXCIII in <URL:news:816s7r$poi$1@charm.magnus.acs.ohio-state.edu>:
{} [A complimentary Cc of this posting was sent to Mark-Jason Dominus
{} <mjd@op.net>],
{} who wrote in article <81584c$f35$1@monet.op.net>:
{} > `xterm' is analogous to telnetd: It locates a new pseudo-tty device
{} > and opens 012 onto it.  If you look into the source code for xterm you
{} > can see this.
{} > 
{} > It really isn't a kernel feature; it's more like a giant conspiracy
{} > between the programs that allocate terminals, the shells, and the C
{} > standard I/O library.
{} 
{} Thanks, this is how I thought it works (though my choice of C-isms
{} std* was unfortunate).  The book quoted by Abigail got it hopelessly
{} wrong by assigning this function to shells.


What, you mean shells don't assign stdin/stdout/stderr to fd 0/1/2
when spawning new processes?



Abigail
-- 
$" = "/"; split $, => eval join "+" => 1 .. 7;
*{"@_"} = sub  {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


  -----------== 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: 20 Nov 1999 22:02:16 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: file descriptors already used when perl starts
Message-Id: <8175p8$22a$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Abigail
<abigail@delanet.com>],
who wrote in article <slrn83e02n.m2v.abigail@alexandra.delanet.com>:
> {} Thanks, this is how I thought it works (though my choice of C-isms
> {} std* was unfortunate).  The book quoted by Abigail got it hopelessly
> {} wrong by assigning this function to shells.
> 
> 
> What, you mean shells don't assign stdin/stdout/stderr to fd 0/1/2
> when spawning new processes?

Again: let us be precise: stdin/etc are CRTL-isms.  They have no
relationship whatsoever to spawning.  Kid has no idea whether the
parent is written in C, or in Ada.

But if we translate your question to the relevant stuff (fd's), then
the answer is that shells *do not do anything* with fd 0/1/2 (except
for redirections, of course): whatever these beasts are opened to when
shell process starts, they are still opened to in kids.  That's fd
inheritance.

Ilya


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

Date: Sat, 20 Nov 1999 18:04:46 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: file empty?
Message-Id: <Pine.HPP.3.95a.991120180421.26446L-100000@hpplus01.cern.ch>

On Sat, 20 Nov 1999, Matthew Bafford wrote:

> : Ah, but will it be empty afterwards?
> 
> Once no more bits and bytes fall out, yes.

Does that include the sticky bits?

;-)



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

Date: 20 Nov 1999 11:59:16 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: file empty?
Message-Id: <slrn83dohr.m2v.abigail@alexandra.delanet.com>

Alan J. Flavell (flavell@mail.cern.ch) wrote on MMCCLXXII September
MCMXCIII in <URL:news:Pine.HPP.3.95a.991120180421.26446L-100000@hpplus01.cern.ch>:
$$ On Sat, 20 Nov 1999, Matthew Bafford wrote:
$$ 
$$ > : Ah, but will it be empty afterwards?
$$ > 
$$ > Once no more bits and bytes fall out, yes.
$$ 
$$ Does that include the sticky bits?


They belong to directories, don't they? ;-)



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


  -----------== 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: 20 Nov 1999 13:08:33 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: file empty?
Message-Id: <x7903tox26.fsf@home.sysarch.com>

>>>>> "A" == Abigail  <abigail@delanet.com> writes:

  A> Alan J. Flavell (flavell@mail.cern.ch) wrote on MMCCLXXII September

  A> $$ Does that include the sticky bits?

  A> They belong to directories, don't they? ;-)

well, since perl is a glue language and the duct tape of the net, aren't
all bits sticky in perl's mind?

:-)

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: Sat, 20 Nov 1999 12:41:05 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Fork Children w/ Expect
Message-Id: <Pine.GSO.4.10.9911201239050.16575-100000@user2.teleport.com>

On Fri, 19 Nov 1999, Jim Mosier wrote:

> The children will die but keep coming back.  

That sentence seems meaningless to me.

> Since my parent is spawning a child which spawns a telnet, I'm
> wondering if Perl is loosing it's mind.

Could it be that somehow a child process is running the parent's code?
That could happen if someone forgot to check that an exec succeeded,
and it would probably make your program seriously confused.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sat, 20 Nov 1999 18:42:45 GMT
From: John Arrowwood <jarrowwx@NOSPAM.home.com>
Subject: Re: Generating pi
Message-Id: <3836EBC1.EC8C507E@NOSPAM.home.com>

Craig Berry wrote:

> John Arrowwood (jarrowwx@NOSPAM.home.com) wrote:
> : Cool, and easy (took less than 5 minutes to code), but not very
> : accurate.  I wanted to do a similar thing once, but to one million
> : decimal places.  This only works to about 3 decimal places, then loses
> : out due to rounding errors (most likely).  Any other suggestions?
>
> My implementation of this series yields digits accurate out to at least
> the seventh place, and presumably out to double-precision limits if you're
> willing to wait long enough.  I can't imagine why yours would yield less
> precision.  (My implementation was posted earlier on this thread.)

Oops!  Appologies...  I forgot that I was using my slow computer, so I was
expecting results much faster than I was getting them.  And it had looked as
though it had fallen into a loop, never actually converging.  I changed it to
only print every 10,000 iterations, and it works much better.

Looking at the other implementation, it makes use of a module not included in
the standard distribution.  I'll have to look into that.

Now, does anybody know if this is the same basic method used by people when
they calculate PI to a million decimal places or more?  Or is there yet
another formula that can be used?

--
John Arrowwood




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

Date: Sat, 20 Nov 1999 19:52:33 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Generating pi
Message-Id: <816u4j$rah$1@monet.op.net>

In article <3836EBC1.EC8C507E@NOSPAM.home.com>,
John Arrowwood  <jarrowwx@NOSPAM.home.com> wrote:
>Now, does anybody know if this is the same basic method used by people when
>they calculate PI to a million decimal places or more?  Or is there yet
>another formula that can be used?

They definitely don't use that fomula, because it converges really
really slowly.

A web search turned up a whole lot of relevant material, including

	http://www.cecm.sfu.ca/organics/papers/borwein/paper/html/paper.html 

This is probably more useful than asking the folks in this group.




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

Date: 20 Nov 1999 21:57:21 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Generating pi
Message-Id: <8175g1$1sn$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Simon Cozens
<simon@brecon.co.uk>],
who wrote in article <slrn83c9k6.qud.simon@othersideofthe.earth.li>:
> >This one is almost instantaneous:
> >...308078
> >...307782
> 
> But still imprecise.

Hmm, do you think that if the output were identical, the result would
be precise?  ;-)

Ilya


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

Date: 20 Nov 1999 12:08:55 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Getting HTML tags via regular expression
Message-Id: <slrn83dp40.m2v.abigail@alexandra.delanet.com>

Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCCLXXII September
MCMXCIII in <URL:news:816g1h$7nr$1@gellyfish.btinternet.com>:
%% On 20 Nov 1999 08:22:33 -0600 Abigail wrote:
%% > 
%% > HTML is an SGML application. Parsing SGML is far from trivial. Attempts
%% > to use regexes and HTML::Parser on documents you don't know much about
%% > are hilarious, and will cause more pain than being useful. Only if you
%% > know the document is limited enough, there can be some benefit in giving
%% > it to HTML::Parser. But then, you might as well use what you know about
%% > the document, and use some special purpose regexes or substr/index combos.
%% > 
%% 
%% Fine.  Do you then suggest that for every querent who comes here with a
%% similar request we:
%% 
%%   A) Tell them to learn about SGML, understand the relevant DTD and then
%%      build their own parser.
%% 
%%   B) Tell them to use an external SGML parser with reference to the
%%      appropriate DTD.

There is nsgmls.

%%   C) Tell them to go away because Perl isnt capable of such a thing.

Sure Perl is. IIRC, there's even an nsgmls interface.

%%   D) Go through the usual eternal iterative process of helping them
%%      decompose their HTML using a regex or other language feature.


And yes, I plan to make a real HTML parser in pure Perl. But that
will take a while, because it won't be easy.

%% Bearing in mind that for nearly every request of this type we get here the
%% document *is* of a fairly predictable nature.

But without stating that in the problem. If it's of a fairly predictive
nature, regex usually "work", and HTML::Parser is just a hassle. The
problem is, without knowing what is predictive, a special purpose answer
can't be given. Neither with regexes, nor with HTML::Parser.

%% But yes I do agree with you about the CDATA, and yes in nearly every place
%% that I have used HTML::Parser I have resorted to some book-keeping scheme.
%% 
%% Anyhow how many of these people will actually see CDATA chunks in the wild -
%% and if they do care about what it contains ? If they do and do then I am
%% fairly certain also that they will be savvy to the issues and wouldnt be
%% asking these types of questions (then they would'nt be one of these people
%% of course DOH!).

It doesn't matter if people care what it contains - the problem is that
HTML::Parser will not take in consideration that certain things look
like tags, but aren't.

%% However, given that most of the querents do have relatively simple needs
%% and given that they most likely dont have the wherewithal to go for options
%% A or B above, C is untrue and we arent going to want to do D then for 
%% all intents and purposes HTML::Parser is the best option.  Sure it doesnt
%% necessarily do what it says on the tin - but unless one of us is going to
%% make something better then most sensible usenauts are going to recommend it.


So, what are you going to suggest if people ask parsing questions about
LaTeX, or DocBook, or Perl for that matter, for which there aren't
modules available which claim to parse it? A, B, C or D?



Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== 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: 20 Nov 1999 13:13:23 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Getting HTML tags via regular expression
Message-Id: <x766yxowu4.fsf@home.sysarch.com>

>>>>> "A" == Abigail  <abigail@delanet.com> writes:

  A> package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
  A>                                       print } sub __PACKAGE__ { &
  A>                                       print (     __PACKAGE__)} &
  A>                                                   __PACKAGE__
  A>                                             (                )

amusing as always. but the s/_/ /g should be a tr/_/ / or to save a golf
stroke ala larry, y/_/ /.

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: 20 Nov 1999 14:10:04 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Getting HTML tags via regular expression
Message-Id: <slrn83e075.m2v.abigail@alexandra.delanet.com>

Uri Guttman (uri@sysarch.com) wrote on MMCCLXXII September MCMXCIII in
<URL:news:x766yxowu4.fsf@home.sysarch.com>:
"" >>>>> "A" == Abigail  <abigail@delanet.com> writes:
"" 
""   A> package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
""   A>                                       print } sub __PACKAGE__ { &
""   A>                                       print (     __PACKAGE__)} &
""   A>                                                   __PACKAGE__
""   A>                                             (                )
"" 
"" amusing as always. but the s/_/ /g should be a tr/_/ / or to save a golf
"" stroke ala larry, y/_/ /.


No, it shouldn't. "g" looks more like "&" then ";" does.



Abigail
-- 
$" = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%_ = (Just => another => Perl => Hacker); &{%_};


  -----------== 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: Sat, 20 Nov 1999 19:19:48 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Help with understanding syntax
Message-Id: <816s7g$qmi$1@monet.op.net>

In article <slrn83dd13.m2v.abigail@alexandra.delanet.com>,
Abigail <abigail@delanet.com> wrote:
>The advantage over the "for" and the "if/else" solutions are that
>if you have 47 cases, it doesn't have to try them all before defaulting
>to default. (Assuming you can easily calculate the correct label).

Yes, but the way `goto' works is by searching the program starting
from the beginning.  So it ends up looking at all the nonmatching
labels anyway.

Whether or not this is a win really isn't clear.


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

Date: 20 Nov 1999 16:27:23 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: How do I set up a cgi-bin on Windows NT Server 4
Message-Id: <3836CB99.A5F93A13@vpservices.com>

Iain D Langridge wrote:

> I now want to go ahead with installing my own server
> ... and I will require the cgi-bin facility 

There are several distinct things you need to take care of: 1)
installing the server, 2) configuring it to run cgi scripts, 3) finding
or 4) writing scripts to do what you want to accomplish.  The Perl
newsgroups might have information helpful for step #4 but the other
parts are best answered in the documentation and newsgroups dealing with
servers, your platform OS, and general cgi.  It sounds like you should
start with the FAQ for the group 
comp.infosystems.www.servers.ms-windows.

-- 
Jeff


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 1445
**************************************


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