[10895] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4496 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 25 22:07:17 1998

Date: Fri, 25 Dec 98 19:00:16 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 25 Dec 1998     Volume: 8 Number: 4496

Today's topics:
    Re: a nicer way? (Jason Costomiris)
    Re: a nicer way? (Andrew M. Langmead)
    Re: a nicer way? <tchrist@mox.perl.com>
        Artistic License question (Lindsey Dubb)
        Best Perl Book for a "Not Yet" Perl Programmer (KJPhilbr13)
    Re: Best Perl Book for a "Not Yet" Perl Programmer (brian d foy)
    Re: challenge: 99 bottles of perl (was Re: The quine pa <uri@sysarch.com>
    Re: challenge: 99 bottles of perl (was Re: The quine pa <uri@sysarch.com>
    Re: challenge: 99 bottles of perl (was Re: The quine pa (Ronald J Kimball)
    Re: challenge: 99 bottles of perl (was Re: The quine pa <uri@sysarch.com>
    Re: challenge: 99 bottles of perl (was Re: The quine pa (Damian Conway)
        Convert textarea line wraps to print mcwebber@my-dejanews.com
    Re: Convert textarea line wraps to print (brian d foy)
    Re: Convert textarea line wraps to print <mcwebber@my-dejanews.com>
    Re: Perldoc problem w. Perl for Win32 <jeff@vpservices.com>
    Re: Regex question - removing HTML tags.... (David Formosa)
    Re: Regex question - removing HTML tags.... (GiLLY)
    Re: Regex question - removing HTML tags.... (GiLLY)
    Re: Regex question - removing HTML tags.... (GiLLY)
    Re: Regex question - removing HTML tags.... (Ronald J Kimball)
    Re: Retrospective on comp.lang.perl.moderated? <preilly@isoquantic.com>
    Re: Stock Quotes via CGI Scripts dturley@pobox.com
    Re: The quine page <rra@stanford.edu>
        where to download the perl 5.0052.zip for win32 ?? thankyouverymuch@my-dejanews.com
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 25 Dec 1998 16:30:50 GMT
From: jcostom@madcow.jasons.org (Jason Costomiris)
Subject: Re: a nicer way?
Message-Id: <slrn787fdq.aa5.jcostom@madcow.jasons.org>

On 25 Dec 1998 00:22:06 GMT, Tom Christiansen <tchrist@mox.perl.com> wrote:
: You seem to have stealth-CC'd me.  That's not very nice.

Had I stealth-CC'd you, yes indeed, it would not have been nice.  However,
my newsreader is configured to generate strings in the mailed copy.

Perhaps your mail system removed it.  Perhaps sunspots caused my copy
of slrn to go temporarily insane.  Perhaps it's a secret government 
plot.  Perhaps.. oh, to hell with it.  Get over it.

: 		    I've heard about you people.  See perltoot.

I've read it.  Nice tone.  I got the distinct feeling from reading
it that you'd have us go back to line numbers, goto's, and all global 
variables.  That's probably not the reality of how you feel, but your 
tutorial on perl's oop capabilities sure sounds that way.

: Don't be a nut.  The OO way is completely ridiculous for 99% of the
: CGI.pm applications.  And OO in general is silly for a good bit of what
: it gets used for.

Sheesh, you make it sound as if it will cause the downfall of civilization.
What happened to your "TMTOWTDI" attitude?  Was my OO way somehow less
valid than what you wrote?  Nope.  Or does TMTOWTDI not apply when one
disagrees with you? :-)

-- 
Jason Costomiris <><            | Linux...
jcostom@jasons.org              | "Find out what you've been missing 
http://www.jasons.org/~jcostom/ | while you've been rebooting Windows NT."
#include <disclaimer.h>         |         --Infoworld


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

Date: Fri, 25 Dec 1998 17:52:46 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: a nicer way?
Message-Id: <F4J8By.Fv4@world.std.com>

jcostom@madcow.jasons.org (Jason Costomiris) writes:

>On 25 Dec 1998 00:22:06 GMT, Tom Christiansen <tchrist@mox.perl.com> wrote:
>: Don't be a nut.  The OO way is completely ridiculous for 99% of the
>: CGI.pm applications.  And OO in general is silly for a good bit of what
>: it gets used for.

>Sheesh, you make it sound as if it will cause the downfall of civilization.
>What happened to your "TMTOWTDI" attitude?  Was my OO way somehow less
>valid than what you wrote?  Nope.  Or does TMTOWTDI not apply when one
>disagrees with you? :-)

I wouldn't say less valid, but on the otherwhat does OOP in this
application really buy you? Few people sublcass the CGI class (after
all, its bloated enough to everything for everyones needs) and few
people create multiple CGI objects in one script (where OOPs
encapsulation, the close ties between code and data are helpful.)

So all you seem to get is the method call overhead. And in perl, its
pretty significant.

Since Tom Christiansen posted a perfectly valid procedural code
snippet, and you "corrected" him with the OOP example. I think the
burden of proof is on you to explain why your example was in any form
an improvement.

-- 
Andrew Langmead


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

Date: 26 Dec 1998 01:22:04 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: a nicer way?
Message-Id: <761dns$235$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, jcostom@madcow.jasons.org (Jason Costomiris) writes:
:What happened to your "TMTOWTDI" attitude?  Was my OO way somehow less
:valid than what you wrote?  Nope.  Or does TMTOWTDI not apply when one
:disagrees with you? :-)

You remind me of the person who said that awk was no longer useful
because it wasn't object-oriented.

There are an infinite number of ways to do anything, but many of them
are overkill.  We don't need any more code that is needlessly redundant
or gratuitously complex.

Please compare the severely unidiomatic:

LOOP: while (1) { 
	$line = <FH>;
	if (!defined($line)) { last LOOP; }
	chomp($line);
	$line =~ s/foo/bar/;
	$line =~ y/a-z/A-Z/;
	print($line);
    } 

With the more maintainable version, which is simpler, clearer, and
more idiomatic:

    while (<FH>) {
	chomp();
	s/foo/bar/;
	y/a-z/A-Z/;
	print;
    } 

Don't try to use TMTOWTDI to make it appear that all ways are equally
desirable.  They aren't.  Down that road lies the horror from CS 101
classes:

    for($array_index = 0; $array_index < @array; $array_index++) {
	$array[$array_index]++;  # add one to array_index element of array
    } 

TMTOWTDI doesn't say that *all* ways are good, or desirable.  
Circumstances vary.

Objects don't *always* suck, but a slaving obedience to them does.
``Real programmers can write FORTRAN in any language'' has many variants.
Try to avoid subjecting Perl to too many of them, because the result is
unnatural at best.

In the case of the overwhelming majority of uses of CGI.pm, the object
interface produces annoyingly repetitive code that is harder to read
and thus maintain than what the procedural interface generates.  It's a
waste of your time and the time of those who come after you -- as well
as those who would like to, like me.

Eschew obfuscation.

--tom
-- 
Ask Ken.  He hates Everything.


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

Date: Sat, 26 Dec 1998 02:31:20 GMT
From: ldubb@home.com (Lindsey Dubb)
Subject: Artistic License question
Message-Id: <ldubb-2512981831210001@c36852-a.sttln1.wa.home.com>

I haven't been able to track this down in any of the FAQs, so I thought
it would be worth asking you all for a bit of legal advice. ;)

I've written a small regexp/grep program for the Mac, based on Henry
Spencer's '86 regexp program.  In doing so, I made alterations to allow
special character classes, backreferences in the search pattern, and
the like.

A couple of days ago I noticed that Perl likewise uses a (much more)
modified version of Spencer's regexp.  I've apparently been reinventing
the wheel!  Rather than continue to do so, I'd like to make use of the
Perl source, specifically the regexp and regcomp files.

How does the Artistic License apply to the use of a small part of the
Perl distribution?  As I read it, the License talks in detail about
modifications to the package as a whole, but does not explain the reuse
of a small number of files.

Would I be required to include the source of the complete Perl
distribution in order to use just a few files from it?  That would
increase the size of the distribution tenfold!  Or would it be kosher
to include just the altered files, along with acknowledgements and
comments on any alterations?

Thanks for any help you can give,
-- 
9:)      Lindsey Dubb     ldubb@u.washington.edu


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

Date: 25 Dec 1998 17:45:03 GMT
From: kjphilbr13@aol.com (KJPhilbr13)
Subject: Best Perl Book for a "Not Yet" Perl Programmer
Message-Id: <19981225124503.21535.00001412@ng-fp1.aol.com>

Background in C, C++, Visual Basic, sh, ksh, etc...

What is the best book to start?  Need to understand program structure, language
references, hints/examples, etc.

Thanks in advance...Kevin P. in Charlotte, NC


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

Date: Fri, 25 Dec 1998 19:13:55 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Best Perl Book for a "Not Yet" Perl Programmer
Message-Id: <comdog-ya02408000R2512981913550001@news.panix.com>

In article <19981225124503.21535.00001412@ng-fp1.aol.com>, kjphilbr13@aol.com (KJPhilbr13) posted:

> Background in C, C++, Visual Basic, sh, ksh, etc...
> 
> What is the best book to start?

Learning Perl by Randal L. Schwartz et al.

-- 
brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
remove NOSPAM or don't.  it doesn't matter either way.


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

Date: 25 Dec 1998 13:43:30 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: challenge: 99 bottles of perl (was Re: The quine page)
Message-Id: <x7pv98hxkd.fsf@sysarch.com>

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

  A> Here's one that prints 'no more bottles of beer' at the end:

  A> #!/usr/local/bin/perl -wis
  A> use strict; chomp $/;
  A> print map {<<EOT
  A> $_ Bottle$^I of beer on the wall,
  A> $_ bottle$^I of beer,
  A> Take one down and pass it around,
  A> ${\do {($^I,$/) = ($/,$^I) if -- $_ < 2; $_ || "no more"}} bottle$^I of beer.

  A> EOT
  A> } reverse 1 .. shift || 99;
  A> __END__

nice one abby, but you forgot the 'on the wall' at the end of the last
line. but the swap at 1 is cute. so this gets an B-.

and it is much longer than ronald's or my solution.

:-)

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: 25 Dec 1998 13:45:53 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: challenge: 99 bottles of perl (was Re: The quine page)
Message-Id: <x7lnjwhxge.fsf@sysarch.com>

>>>>> "AL" == Andre L <alecler@cam.org> writes:

  AL> In article <MPG.10eca1c54b46bfe1989979@nntp.hpl.hp.com>, lr@hpl.hp.com
  AL> (Larry Rosler) wrote:

  >> 0 bottle of beer?  Uri had this one right!  Burp...

  AL> I wasn't aware that "0 bottles" was plural. :-/
  AL> I reckon ma English ain't no better than ma Perl.

well, both languages are melanges of several others without any rigorous
rules. that is why both are so rich and expressive as well as
maddeningly tricky and frustrating.

compare to german and c++!

:-)

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Fri, 25 Dec 1998 13:50:11 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: challenge: 99 bottles of perl (was Re: The quine page)
Message-Id: <1dkkkcq.1mr67hm1f01jlsN@bay1-285.quincy.ziplink.net>

Uri Guttman <uri@sysarch.com> wrote:

> >>>>> "RJK" == Ronald J Kimball <rjk@linguist.dartmouth.edu> writes:
> 
>   RJK> How about this?
> 
>   RJK> $_=shift||99;$b='"$_ bottle$s[$_==1] of beer"';$w=' on the
>   RJK> wall';@s='s';print eval$b,"$w, ",eval$b,"!\nTake one down, pass
>   RJK> it around,\n",eval'$_--;'.$b,$w, "!\n\n"while$_
> 
> i reduced mine to the same length (i think) as yours. i stole your @s
> trick which is cool. but i like my style better as i don't need no
> stinkin' evals!

Yeah, but I don't need no stinkin' expression interpolation via
dereferencing!

I did try to reduce the number of evals, but it just made the code
longer.  :-O


> $n=shift||99;@s='s';$o=' on the wall';print<<B while$n
> @{[$b="$n bottle$s[$n<1] of beer"]}$o, $b!
                     ^^^^
                     $n==1

> Take one down and pass it around,
> ${\--$n} bottle$s[$n==1] of beer$o!
> 
> B

1 bottles of beer on the wall, 1 bottles of beer!
Take one down and pass it around,
0 bottles of beer on the wall!

:-)

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 25 Dec 1998 14:02:35 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: challenge: 99 bottles of perl (was Re: The quine page)
Message-Id: <x7btkshwok.fsf@sysarch.com>

>>>>> "RJK" == Ronald J Kimball <rjk@linguist.dartmouth.edu> writes:

  RJK> Uri Guttman <uri@sysarch.com> wrote:

  >> $n=shift||99;@s='s';$o=' on the wall';print<<B while$n
  >> @{[$b="$n bottle$s[$n<1] of beer"]}$o, $b!
  RJK>                      ^^^^
  RJK>                      $n==1

my last version fixed that but i must have posted one i was still
playing with. i was testing and cutting and pasting all at once with no
coherency since i was following the song lyrics! :-) burp!!!

was just like a boston pm meeting.

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: 25 Dec 98 22:10:45 GMT
From: damian@molly.cs.monash.edu.au (Damian Conway)
Subject: Re: challenge: 99 bottles of perl (was Re: The quine page)
Message-Id: <damian.914623845@molly.cs.monash.edu.au>

Uri Guttman <uri@ibnets.com> writes:

>i was embarrassed that our lovely language was so poorly represented,
>so i wrote a (almost) one liner. other than the arg handling it is one
>statement. so my xmas eve challenge to all you non-christians and
>get-a-lifers is to write your favorite version to generate this ditty.
>the hardest part is getting the 's' right. any other short ways of
>having 1 or 0 's' based on a boolean are welcome.

Use Lingua::EN::Inflect!

-----------cut-----------cut-----------cut-----------cut-----------cut----------
use Lingua::EN::Inflect 'inflect';
$n=shift||99 and print inflect<<BURP while $n;
NO(bottle of beer,$n) on the wall, NO(bottle of beer,$n)!
Take one down, pass it around,
NO(bottle of beer,@{[--$n]}) on the wall.
BURP
-----------cut-----------cut-----------cut-----------cut-----------cut----------
Damian 


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

Date: Fri, 25 Dec 1998 23:43:30 GMT
From: mcwebber@my-dejanews.com
Subject: Convert textarea line wraps to print
Message-Id: <7617v2$cm0$1@nnrp1.dejanews.com>

Using the following in a script where the $descript is the output of a
textarea. I'd like to have the output match the "returns" entered by the user.
Help would be appreciated:

open(FILE, ">$linkfile") || die "I can't open: $linkfile\n";

		for ($a = 0; $a <= $sizelines; $a++) {

		$_ = $lines[$a];

 	if (/<!--$catagory-->/) {

	print FILE $_;
        print FILE "<table width=\"450\" cellpadding=\"0\" cellspacing=\"0\"
border=\"0\"><tr><td bgcolor=\"#fffff0\">\n";
	print FILE "<font size=\"-1\" face=\"Verdana,Arial,Geneva\"> <a href=
\"mailto:$email\"><strong>$name</strong></a> placed this ad<br>$todaydate
</font></td></tr>\n";
	print FILE "<tr><td bgcolor=\"#FDF5E6\"><font size=\"-1\" face=
\"Verdana,Arial,Geneva\"><b>$sitename</b></td></tr>\n";
	print FILE "<tr><td bgcolor=\"#FFFFFF\"><font size=\"-1\" face=
\"Verdana,Arial,Geneva\"><strong><a href=\"#abbr\">$abbr</a></strong><br>
$descript</font><hr size=4 noshade color=navy></td></tr></table><br>\n";

		} else {
			print FILE $_;
		}
	}
close(FILE);

Thanks
--
McWebber
http://mcwebber.com/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 25 Dec 1998 19:12:34 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Convert textarea line wraps to print
Message-Id: <comdog-ya02408000R2512981912340001@news.panix.com>

In article <7617v2$cm0$1@nnrp1.dejanews.com>, mcwebber@my-dejanews.com posted:

> Using the following in a script where the $descript is the output of a
> textarea. I'd like to have the output match the "returns" entered by the user.
> Help would be appreciated:

then store the output exactly as entered, and display as stored.  was
there a particular part of the process with which you were having a 
problem?

>         print FILE $_;
>         print FILE "<table width=\"450\" cellpadding=\"0\" cellspacing=\"0\"
> border=\"0\"><tr><td bgcolor=\"#fffff0\">\n";
>         print FILE "<font size=\"-1\" face=\"Verdana,Arial,Geneva\"> <a href=
> \"mailto:$email\"><strong>$name</strong></a> placed this ad<br>$todaydate
> </font></td></tr>\n";
>         print FILE "<tr><td bgcolor=\"#FDF5E6\"><font size=\"-1\" face=
> \"Verdana,Arial,Geneva\"><b>$sitename</b></td></tr>\n";
>         print FILE "<tr><td bgcolor=\"#FFFFFF\"><font size=\"-1\" face=
> \"Verdana,Arial,Geneva\"><strong><a href=\"#abbr\">$abbr</a></strong><br>
> $descript</font><hr size=4 noshade color=navy></td></tr></table><br>\n";

use a here document a to make that easier on the eyes:

print FILE <<"HTML";
<table width=450 cellpadding=0 cellspacing=0 border=0>
<tr>
   <td bgcolor="#fffff0">
      <font size="-1" face="Verdana,Arial,Geneva"> 
      <a href="mailto:$email\"><strong>$name</strong></a> 
      placed this ad<br>$todaydate</font>
   </td>
</tr>

<tr>
   <td bgcolor="#FDF5E6">
      <font size="-1" face="Verdana,Arial,Geneva"><b>$sitename</b>
   </td>
</tr>

<tr>
   <td bgcolor="#FFFFFF">
      <font size="-1" face="Verdana,Arial,Geneva">
      <strong><a href="#abbr">$abbr</a></strong><br>
      $descript</font><hr size=4 noshade color=navy>
   </td>
</tr>
</table>
<br>
HTML

-- 
brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
remove NOSPAM or don't.  it doesn't matter either way.


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

Date: Sat, 26 Dec 1998 01:47:20 GMT
From: "McWebber" <mcwebber@my-dejanews.com>
Subject: Re: Convert textarea line wraps to print
Message-Id: <IeXg2.331$k67.229@news.rdc1.fl.home.com>

brian d foy wrote in message ...
>In article <7617v2$cm0$1@nnrp1.dejanews.com>, mcwebber@my-dejanews.com
posted:
>
>> Using the following in a script where the $descript is the output of a
>> textarea. I'd like to have the output match the "returns" entered by the
user.
>> Help would be appreciated:
>
>then store the output exactly as entered, and display as stored.  was
>there a particular part of the process with which you were having a
>problem?
>
Yes. Currently anything entered in the textarea as:
line 1
line 2
line 3

appears as:
line1 line2 line 3

--
McWebber
Newsgroup postings are not an invitation for mail - Post publicly to reply





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

Date: 25 Dec 1998 19:17:31 GMT
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Perldoc problem w. Perl for Win32
Message-Id: <3683E3DA.3E430FA0@vpservices.com>

Yes, I have noticed some of those same oddities in activestate/prk
perldoc on win95.  One problem is that there are two files - perldoc.exe
and perldoc.bat - and they are in two different directories so the order
of those two diretories in your path is significant.

Other problems with perldoc on win95: you can't redirect from either
perldoc or pod2text so "perldoc -t CGI > cgi.txt" does not create
cgi.txt.  pod2html provides switches to specify input and output files
so it can create file versions of the documentation but neither of the
other two can without fiddling.

- Jeff

Robert Watkins wrote:
> 
> I was using the stadard port of Perl on my NT box, and had no
> problems. Now, after having installed ActiveState's Perl for Win32 from the Perl
> Resource Kit Win32 Edition, perldoc acts strangely.
> 
> C:> perldoc perlsyn
> produces no output in the NT command shell.
> 
> C:> perldoc -v perlsyn
> shows the path searched and tells me where the .pod file was found
> (referred to below as <path>) but does not produce any output.
> 
> C:> perldoc perlsyn > perlsyn.txt
> creates a text file with the pod data neatly formatted as one would
> have expected it in the shell.
> 
> C:> perldoc -f map
> returns: Can't start filter at !Script at line 403, <PFUNC> chunk 2068
> 
> Line 403 of perldoc.bat is:
> open (FORMATTER, "| pod2text") || die "Can't start filter";
> 
> but
> C:> pod2text <path>\perlsyn.pod
> produces the output I would have expected from "perldoc perlsyn"
> 
> Any suggestions?
> 
> --------------------------------
> Robert Watkins
> r-watkinsNO@SPAMworldnet.att.net
> --------------------------------


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

Date: 25 Dec 1998 13:02:13 GMT
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <slrn78736m.loq.dformosa@godzilla.zeta.org.au>

In article <36857e42.6474464@usenet.kornet21.net>, Gilly wrote:
>abigail@fnx.com (Abigail) wrote:
>

[...]

>:<!-- So, what - - > about this then? -->
>
>if both '- - >' and '-->' are valid then which is the closing tag?

Its not a tag.  The soltion would be for you to read the spicifactions for HTML.

-- 
Please excuse my spelling as I suffer from agraphia. See
http://www.zeta.org.au/~dformosa/Spelling.html to find out more.
How to win arguments on usenet http://www.zeta.org.au/~dformosa/usenet.html



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

Date: Sat, 26 Dec 1998 00:22:08 GMT
From: hklife@soback.kornet21.net (GiLLY)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <36842bf0.2503341@news.snu.ac.kr>

On 24 Dec 1998 22:38:02 GMT, abigail@fnx.com (Abigail) wrote:

>Well, there are no spaces allowed right after the <! or between the '--'
>immediately following the <!.
>
>'- - >' is of course valid. It just doesn't mean what Gilly thinks it means.

  http://www.w3.org/TR/REC-html40/html40.txt

3.2.4 Comments

HTML comments have the following syntax:<!-- this is a comment -->
<!-- and so is this one,    which occupies more than one line -->
White space is not permitted between the markup declaration open
delimiter("<!") and the comment open delimiter ("--"), but is permitted
between the comment close delimiter ("--") and the markup declaration close
delimiter (">"). A common error is to include a string of hyphens ("---")
within a comment. Authors should avoid putting two or more adjacent hyphens
inside comments.
Information that appears between comments has no special meaning (e.g.,
character references are not interpreted as such).



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

Date: Sat, 26 Dec 1998 00:23:24 GMT
From: hklife@soback.kornet21.net (GiLLY)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <36842c44.2587387@news.snu.ac.kr>

>>if both '- - >' and '-->' are valid then which is the closing tag?
>
>Its not a tag.  The soltion would be for you to read the spicifactions for HTML.

delimiter by http://www.w3.org/TR/REC-html40/html40.txt



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

Date: Sat, 26 Dec 1998 00:26:13 GMT
From: hklife@soback.kornet21.net (GiLLY)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <36842cab.2690974@news.snu.ac.kr>

On 24 Dec 1998 17:16:49 GMT, abigail@fnx.com (Abigail) wrote:

>GiLLY (hklife@soback.kornet21.net) wrote on MCMXLI September MCMXCIII in
><URL:news:3681e0f3.25474765@news.snu.ac.kr>:
>++ :<!-- So, what about this? --
>++ :>
>++
>++ s/<!\s*-\s*-.*?-\s*-\s*>//gs;
>
>
><!-- So, what - - > about this then? -->

now,

s/<!\s*--.*?--\s*>//gs;


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

Date: Fri, 25 Dec 1998 20:47:23 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <1dkm1jl.117r5i31b0byrqN@bos-ip-1-55.ziplink.net>

GiLLY <hklife@soback.kornet21.net> wrote:

> On 24 Dec 1998 17:16:49 GMT, abigail@fnx.com (Abigail) wrote:
> 
> ><!-- So, what - - > about this then? -->
> 
> now,
> 
> s/<!\s*--.*?--\s*>//gs;
      ^^^

According to the excerpt you just posted from the HTML spec, whitespace
is not allowed between the "<!" and the initial "--".  :-)

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Fri, 25 Dec 1998 07:56:14 GMT
From: "IQTech-P.Reilly" <preilly@isoquantic.com>
Subject: Re: Retrospective on comp.lang.perl.moderated?
Message-Id: <yyHg2.6598$5s5.602@news.rdc1.az.home.com>

lr@hpl.hp.com (Larry Rosler) skriver:
>>With year-end-assessment time rapidly approaching, would anyone care to
>>comment on how comp.lang.perl.moderated has performed over its life of
>>six months or so, relative to the hopes and expectations of its
>>proponents?

I am happy with the huge reduction in noise. The low volume might be due to
the number of lurkers (like myself), who prefer to read and learn.

+---------------------------------------------------------------------+
|Patrick L. Reilly, Gen. Mgr. | P.O. Box 6820, Chandler, AZ 85246-6820|
|IsoQuantic Technologies, LLC | V: +1.602.814.8500  F: +1.602.814.7946|
|preilly@isoquantic.com       |              http://www.isoquantic.com|
|---------------------------------------------------------------------|
|  Cellular-GSM-MSS Telecom Network Architecture, Design & Analysis   |
|   Creators of SELDON Decision Support Software for the Macintosh    |
|                    [My alter ego exists at http://www.valpatken.com]|
+---------------------------------------------------------------------+


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

Date: Sat, 26 Dec 1998 01:16:48 GMT
From: dturley@pobox.com
Subject: Re: Stock Quotes via CGI Scripts
Message-Id: <761ddv$gij$1@nnrp1.dejanews.com>

In article <36816C4B.28F73839@wdis.com>,
  S Sharma <webmaster@wdis.com> wrote:

> Does anybody know how I could go about doing this using Perl?  Is there
> a service out there that provides quotes to all those quote sites out
> there?
>

You could make use of the Finance::YahooQuote and
Finance::MoneyNetSymbolLookup modules by Dj Padzensky. See my simple demo at
http://www.binary.net/dturley/ cgi-local/stock_quote.cgi
____________________________________ David Turley dturley@pobox.com
http://www.binary.net/dturley/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 25 Dec 1998 11:38:39 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: The quine page
Message-Id: <yld858ko5c.fsf@windlord.stanford.edu>

Gary Thompson <gthompso@sun.iwu.edu> writes:

> I thought this group might be interested in my new page, The Quine
> Page.  It's a collection of all the self-reproducing programs I've been
> able to find.  I have quite a few in Perl, but I don't know it very
> well.

See my sig.  :)

> I would love some input on which are 'cheats'.

The first two on your page are cheats.  I don't believe any of the rest
are.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


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

Date: Sat, 26 Dec 1998 01:33:39 GMT
From: thankyouverymuch@my-dejanews.com
Subject: where to download the perl 5.0052.zip for win32 ??
Message-Id: <761edk$hba$1@nnrp1.dejanews.com>

Please tell me where can I download the perl 5.0052.zip file for NT4?? I have
been perl.com many times but I cannot found the location.... I just found 
the x86perl50052.tar.gz which is seems not win32 file extension.

I need the original perl not the activestate since I will use it with the
mod_perl apache.

Thank You very much.
BIGJohn

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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

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

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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


------------------------------
End of Perl-Users Digest V8 Issue 4496
**************************************

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