[9946] in Perl-Users-Digest
Perl-Users Digest, Issue: 3539 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 25 16:07:37 1998
Date: Tue, 25 Aug 98 13:01:32 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 25 Aug 1998 Volume: 8 Number: 3539
Today's topics:
Re: Perl compiler (Abigail)
Re: Perl compiler (Abigail)
Re: Perl compiler (Craig Berry)
Re: Perl compiler (William D. Reardon)
Re: Perl compiler (Craig Berry)
Re: Perl compiler (Craig Berry)
Re: Perl documentation (Abigail)
Re: Perl documentation (Gary L. Burnore)
Re: PERL environment/shell execution? <JKRY3025@comenius.ms.mff.cuni.cz>
Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFO (Norman UNsoliciteds)
Perl Telnet Server <jpm@iti-oh.com>
Re: Perlscript: where is documentation <JKRY3025@comenius.ms.mff.cuni.cz>
Re: Reading binary data... (brian d foy)
Re: Regex question - removing HTML tags.... (brian d foy)
Re: Regex question - removing HTML tags.... (Larry Rosler)
Re: Regex question - removing HTML tags.... (Norman UNsoliciteds)
Re: Scheduling Perl with Win NT AT Svc <antoy@cs.pdx.edu>
Re: Search and replace (Craig Berry)
Re: Taint checking in NT (Marc Haber)
Re: Why dont people read the FAQs (Arved Sandstrom)
Win32 Command Line Pass? <stepherd@gusun.georgetown.edu>
Re: Y2K Date Support (I R A Aggie)
Re: Y2K Date Support (Michael J Gebis)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 25 Aug 1998 18:51:19 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl compiler
Message-Id: <6rv137$a81$2@client3.news.psi.net>
Lily Y. Fu (lily@tigr.org) wrote on MDCCCXX September MCMXCIII in
<URL: news:35E2D81F.4702@tigr.org>:
++ I'd like to thank everyone replied my seeking for help email!
++
++ But, I still need furthur help. Here is my situation:
++
++ We have a webserver running on a host outside the firewall
++
++
++ We want to give all staff A, B, C a homepage
++ on the host outside the firewall,
Why don't you give yourself a better setup? A proxy for instance.
Better firewall software. NFS.
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]'
------------------------------
Date: 25 Aug 1998 18:56:14 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl compiler
Message-Id: <6rv1ce$a81$3@client3.news.psi.net>
yong (yong@shell.com) wrote on MDCCCXX September MCMXCIII in
<URL: news:35E2EAEF.6B9E6443@shell.com>:
++ I don't know why everybody assumes Lily's hiding source code is because
++ she doesn't want to let others pirate her "property of knowledge". One
++ can also hide the source code for security reason since it may contain
++ passwords.
Which is the case, and which is bad as well.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
------------------------------
Date: 25 Aug 1998 19:08:43 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl compiler
Message-Id: <6rv23r$bdj$2@marina.cinenet.net>
Andrew Johnson (ajohnson@gpu.srv.ualberta.ca) wrote:
: the thing about morals is that there isn't any *inherency* about
: them ... but, I don't find any 'inherent' hypocricism(?) in Tom
: making a living teaching and consulting; and also giving away software
: and documentation; and also stating that he's morally opposed to
: proprietary sources ... and hypocracy seemed to be the accusation
: you were making.
No, not even as strong as hypocrisy. Rather, inconsistency. I'm betting
that Tom C hasn't thought through the full implications of his position,
and that perhaps he will wish to reevaluate it. Or not. I'm eagerly
awaiting his commentary.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Tue, 25 Aug 1998 18:59:46 GMT
From: wdr1@pobox.com (William D. Reardon)
Subject: Re: Perl compiler
Message-Id: <Ey9E3M.4En@midway.uchicago.edu>
In article <35E2C8C5.6E49C1C4@dial.pipex.com>,
Dean Darlison <dean_darlison@dial.pipex.com> wrote:
>compiling the perl script would be no help as the password would still be
>readable
>using strings for instance !
Just an innocent question, but assuming she's on unix, wouldn't
compiling help in that she could then set it to be executable, but
unreadable?
-Bill
--
William Reardon wdr1@pobox.com
Hold fast to dreams, for if dreams die, life is a broken bird that cannot fly.
-Langston Hughes
------------------------------
Date: 25 Aug 1998 19:27:13 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl compiler
Message-Id: <6rv36h$bdj$4@marina.cinenet.net>
[clp.modules dropped from followups]
I R A Aggie (fl_aggie@thepentagon.com) wrote:
: In article <6rtt3h$59r$2@marina.cinenet.net>, cberry@cinenet.net (Craig
: Berry) wrote:
: + Abigail (abigail@fnx.com) wrote:
: + : Then don't come here for free advice on hiding your petty source code.
: + : That makes you into a selfish person.
: + Note that I never asked for such advice, nor would I do so; I understand
: + the consensus ethic of this community well.
: You didn't. The original poster did.
True. Merely wanted to clarify that, as Abigail's use of 'you' in her
response implied the opposite.
: + I'm merely attempting to
: + inject a note of realisim into all the high-flown 'morality' rhetoric
: + being flung wildly about by some zealots. Providing a balancing
: + perspective, as it were.
:
: Not that I can tell. You're playing devil's advocate, at best, and only
: in a theoretical sense.
While I have been known to play the devil's advocate role on occasion, in
this debate I'm quite seriously advancing my true position. Which, to
reiterate, can be summed up as:
* Free software has many advantages
* Proprietary software has many differing advantages
* Neither is morally superior to the other.
The last assertion is the key, of course.
: The correct advice is: you want to protect your software against
: unauthorized use? go talk to a contract lawyer and have him/her draw
: up a licensing agreement.
Do I want to protect my home against burglary? Leave the door unlocked,
and count on the police to recover my possessions if I'm robbed. Same
argument, essentially. I repeat: Many small businesses do not have the
resources to successfully pursue an IP infringement case; most can be
bankrupt and out of business before such a case reaches court, if it ever
does.
: Matters little if your code is perl (and thus readable as-is) or a binary
: distribution (which can be reverse engineered, and made readable).
Yes, and locks on doors can be picked or broken. The idea is that if my
code/possessions are *harder* to steal, the odds go down that they will be
stolen.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: 25 Aug 1998 19:16:30 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Perl compiler
Message-Id: <6rv2ie$bdj$3@marina.cinenet.net>
[clp.modules dropped from followups]
Lily Y. Fu (lily@tigr.org) wrote:
: Thank you Tom, after being on this news group one day,
: I got nothing but a taste of your personnality.
: That is plenty.
While Tom C can at times be a bit abrasive, you do understand that he's
desperately trying to protect you from hurting yourself, right? You're
holding a loaded gun to your head and claiming that the safety is on as
you begin to squeeze the trigger. He's noticing that the safety is *not*
on, and shouting "Put that f*cking thing down, *now*!" In such
circumstances, politeness must yield to urgency. :)
To reiterate: Embedding password data in your programs is a Bad Thing.
If unencrypted, the data may be trivially extracted via (e.g.) the unix
'strings' command. If encrypted, any one person who obtains the password
will have broken security on all instances of the application, everywhere.
Put password data in external, trapdoor-encrypted files, and let the user
set the password.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: 25 Aug 1998 19:09:24 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl documentation
Message-Id: <6rv254$agi$1@client3.news.psi.net>
Russ Allbery (rra@stanford.edu) wrote on MDCCCXX September MCMXCIII in
<URL: news:m3emu573ip.fsf@windlord.Stanford.EDU>:
++
++ *shrug* I'm only getting 10-20 spam messages a week and you're getting
++ ten times that. I'm doing *something* right. ;)
It's odd. People that I know have been around on Usenet for ages and
still post a lot seem to get less spam than others. I get around 50
spams a week, but that's before filtering. 80% gets filtered; 95% after
I update the filters. And from what ends up in my mailbox, 90% I can
kill just based on the subject/sender. Which leaves me with seeing about
1 spam a day.
I get on average 150 other emails a day. That one extra message I spend
3 seconds on aren't worth complaining about. I lose more time by replying
to someone who Cc's me something that's posted as well - but not marked so.
Maybe it's that the people who complain the most don't get any mail but spam.
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")\n-> define ("foldoc", "perl")) [0] -> print'
------------------------------
Date: Tue, 25 Aug 1998 19:30:15 GMT
From: gburnore@databasix.com (Gary L. Burnore)
Subject: Re: Perl documentation
Message-Id: <35f010a3.56422939@nntpd.databasix.com>
On 25 Aug 1998 19:09:24 GMT, in article <6rv254$agi$1@client3.news.psi.net>,
abigail@fnx.com (Abigail) wrote:
>Russ Allbery (rra@stanford.edu) wrote on MDCCCXX September MCMXCIII in
><URL: news:m3emu573ip.fsf@windlord.Stanford.EDU>:
>++
>++ *shrug* I'm only getting 10-20 spam messages a week and you're getting
>++ ten times that. I'm doing *something* right. ;)
>
>
>It's odd. People that I know have been around on Usenet for ages and
>still post a lot seem to get less spam than others. I get around 50
>spams a week, but that's before filtering. 80% gets filtered; 95% after
>I update the filters. And from what ends up in my mailbox, 90% I can
>kill just based on the subject/sender. Which leaves me with seeing about
>1 spam a day.
It's not odd. It's the newsgroups you post to and or crosspost too. Some
groups are more likely to get culled for names than others.
--
I DO NOT WISH TO RECEIVE EMAIL IN REGARD TO USENET POSTS
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
DOH! | ][3:]3^3:]33][:]3^3:]3]3^3:]3]][3
| ][3 3 4 1 4 2 ]3^3 6 9 0 6 9 ][3
Special Sig for perl groups. | Official Proof of Purchase
===========================================================================
------------------------------
Date: Tue, 25 Aug 1998 20:47:12 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
Subject: Re: PERL environment/shell execution?
Message-Id: <35E38540.70CB@comenius.ms.mff.cuni.cz>
Daphna wrote:
>
> Hi all,
>
> I was wondering if it is possible to run PERL as an "environment"
> much like CShell on UNIX. Can I enter a PERL "session" and from
> that point on proceed to enter PERL commands/statements interactively ?
>
> Thanks in advance,
>
> Daphna
> Ex Libris.
Apart from the
perl -de 0
solution, it's pretty easyto write a script that reads lines and
calls eval() for the lines read. You may try to write it yourself :-)
Something like:
print "perl$ ";
while (<STDIN>) {
eval($_);
print "ERROR: $@\n" if $@;
print "perl$ ";
}
would do in most cases.
I have written a bit more complex script that allows you to call
external
commands if you prepend them by "!", reads the perl code until you
end the line by a semicolon, reads a .psh.profile file from the current
directory
at startup etc.
Ex:
c:\> psh
Welcome to psh 0.2 by Jenda@Krynicky.cz
perl$ print 2+3;
5
perl$ !notepad
perl$ @a = qw(asd tre oiu);
perl$ foreach $item (@a) {
perl> print '###',$item,"###\n"; #
perl> };
###asd###
###tre###
###oiu###
perl$ exit;
c:\>
It's not online now and I cannot get to it from where I am, but I will
post it to http://jenda.krynicky.cz/perl/psh.pl.txt tomorrow morning
(GMT - 1 hour).
Jenda
------------------------------
Date: Wed, 26 Aug 1998 05:02:01 +0900
From: No.unsoiliciteds@dead.end (Norman UNsoliciteds)
Subject: Re: Perl FAR version 1.1.1 MAKE SURE YOU READ THIS BEFORE POSTING
Message-Id: <No.unsoiliciteds-2608980502010001@cs11i11.ppp.infoweb.or.jp>
In article <fl_aggie-2508981047060001@aggie.coaps.fsu.edu>,
fl_aggie@thepentagon.com (I R A Aggie) wrote:
> You mean like my father, when I did something dunderheaded? no, I didn't
> like getting chewed out in public. Did I do the same thing again? no.
> Why? because I was embarrassed. I understood that *I* had crossed the
> line, and that it was up to me to learn from it and avoid it.
umm - I don't let total strangers treat me like a five year old, but if
you're happy with being treated like that it does explain why you seem to
side with the Frequent Newbie Abusers.
> Then they should learn how first, don't you think? I mean before jumping
> into perl,
Oh dear - did I read about Perl being discussed as a possible language to
get kids interested in learning programming, something to do with it being
easier than say C or Pascal. O did I just use the word "learn" again,
terribly sorry I meant to say "spontaneaously absorb from the atmosphere
by osmosis".
> and *especially* before putting stuff in /cgi-bin/. Or do you
> not care if their slip-shod programming practices (because they don't
> know any better, and haven't seen the CGI Security FAQ) may compromise
> your web server's security?
Actually I don't own a web server, but if I did I would make sure it had a
cgi wrapper, limiting the possible damage to the users home directory. Or
is that not being security conscious?
--
The Dinosaurs were so stupid, they couldn't
even devise the means of thier own extinction,
they had to wait for Nature to do it for them.
------------------------------
Date: Tue, 25 Aug 1998 15:15:00 -0400
From: Joshua Marotti <jpm@iti-oh.com>
Subject: Perl Telnet Server
Message-Id: <35E30D34.423E7579@iti-oh.com>
I'd like to try and make a perl telnet server. Is this possible? Does
anyone have any examples of this? I'm not a good socket programmer yet,
but I hope to be. :-)
--
Regards,
Josh Marotti
===============================================
Computer Engineer
International TechneGroup Inc.
"Black holes are where God divided by zero"
-----------------------------------------------
"Do you expect me to talk, Goldfinger?"
"No, Mr. Bond, I expect you to die."
>From the James Bond movie 'Goldfinger'
===============================================
------------------------------
Date: Tue, 25 Aug 1998 21:02:10 -0700
From: Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz>
Subject: Re: Perlscript: where is documentation
Message-Id: <35E388C2.37EB@comenius.ms.mff.cuni.cz>
Mosl Roland wrote:
>
> Jan Krynicky <JKRY3025@comenius.ms.mff.cuni.cz> wrote in message
> 35E22CE2.3FE8@comenius.ms.mff.cuni.cz...
> >BTW: For those that do not know what is the difference.
> >PerlScript is a scripting engine made by ActiveState Tool corp.
> >This engine allows you to use Perl in ASP pages, in HTML pages instead
> >of JavaScript or VBScript, in Windows Scripting Host (I don't know why
> >would anyone want to do this) and in a growing list of applications.
>
> Because it's not possible to write files in JavaScript.
> Because I developt a Web Site Compiler in Perl and
> now I want to add a graphic user interface to it.
>
> Most easy way to add a graphic user interface to
> a perl progam is to put the perl in a html page and
> make some changes. After this, it's PerlScript
>
> Mosl Roland
I think you misunderstood what I wanted to say.
Probably my fault :-)
I meant that I didn't find any reason to use PerlScript
with WSH when I can use it without.
I find ordinary perl scripts more readable and easier to debug.
And if I want to use the OLE/ActiveX objects provided by WSH
I can do it from an ordinary perl script as easily as from
WSH/PerlScript.
It's a matter of personal taste.
And BTW, I seldom use ASP. Again I find ordinary CGI scripts better.
And if I use PerlIS.dll they are probably even quicker than
ASP/PerlScript.
The only reason for ASP would be if I wanted to use some WYSIWYNG HTML
editor
to write the pages. Then it would be easier to write the code into HTML
instead HTMP into code. With qq{}, q{} operators and here-doc construct
both ways are easy.
Jenda
------------------------------
Date: Tue, 25 Aug 1998 14:26:35 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Reading binary data...
Message-Id: <comdog-ya02408000R2508981426350001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35E2F485.589E186D@mail1.stofanet.dk>, "Henrik Jxrgensen" <hekke@mail1.stofanet.dk> posted:
>I'm a newbie to perl, and I can't find anything in my 'Learning
>PERL'-book about reading binary data from files.
>Could anyone help?
you read it in as any other data. your system might need binmode()
to handle it correctly.
perhaps you also want to see read(), seek(), tell(), and friends.
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>
------------------------------
Date: Tue, 25 Aug 1998 14:35:22 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <comdog-ya02408000R2508981435220001@news.panix.com>
Keywords: from just another new york perl hacker
In article <MPG.104c920dc17158389897e8@nntp.hpl.hp.com>, lr@hpl.hp.com (Larry Rosler) posted:
>In article <comdog-ya02408000R2508981200250001@news.panix.com> on Tue, 25
>Aug 1998 12:00:25 -0400, brian d foy <comdog@computerdog.com> says...
>...
>> to answer the HTML question: this regex will fail for common cases
>> such as
>>
>> <img src="foo.gif" alt="<Image>">
>> <!-- Here is my <a href="mailto:...">address</a> -->
>> <script> if( a < b ) ... </script>
>>
>> and so on and so on.
>
>Are any of these "common cases" valid HTML?
they make it through the strict validators without errors. obviously,
the <SCRIPT> stuff is an extension, but scripts typically live in
comments.
>I just spent some time pondering the HTML 3.2 spec
><URL:http://www.w3.org/TR/REC-html32.html> and found many references to
>syntactic categories CDATA and PCDATA, but couldn't find their
>definitions. My understanding is that characters that have syntactic
>significance in HTML tags (specifically including < > " and &) may not
>appear in CDATA
i'm not sure why you think that, but quoted attribute values may contain
any character other than the delimiter for the value (" or ') [1].
additionally, comments may contain any characters as well. inattention
to that detail leads many "parsers" to prematurely end a comment
at the first > [2].
>The purpose and effect of this is to make HTML tags parsable
>by regexes.
is this a conjecture on your part? i haven't seen anything to
suggest that HTML is designed to be parsed with regex.
[1]
http://www.w3.org/MarkUp/html-spec/html-spec_3.html#SEC3.2.4
[2]
<URL:http://www.w3.org/MarkUp/html-spec/html-spec_foot.html#FOOT10>
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>
------------------------------
Date: Tue, 25 Aug 1998 12:14:24 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <MPG.104caceed9cea17e9897e9@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <comdog-ya02408000R2508981435220001@news.panix.com> on Tue, 25
Aug 1998 14:35:22 -0400, brian d foy <comdog@computerdog.com> says...
> In article <MPG.104c920dc17158389897e8@nntp.hpl.hp.com>, lr@hpl.hp.com (Larry Rosler) posted:
...
> >... My understanding is that characters that have syntactic
> >significance in HTML tags (specifically including < > " and &) may not
> >appear in CDATA
>
> i'm not sure why you think that, but quoted attribute values may contain
> any character other than the delimiter for the value (" or ') [1].
> additionally, comments may contain any characters as well. inattention
> to that detail leads many "parsers" to prematurely end a comment
> at the first > [2].
...
> [2]
> <URL:http://www.w3.org/MarkUp/html-spec/html-spec_foot.html#FOOT10>
In this reference [2], footnote 7 reads as follows:
Some historical implementations consider any occurrence of the `>'
character to signal the end of a tag. For compatibility with such
implementations, when `>' appears in an attribute value, it should be
represented with a numeric character reference. For example, `<IMG
SRC="eq1.jpg" alt="a>b">' should be written `<IMG
SRC="eq1.jpg" alt="a>b">' or `<IMG SRC="eq1.jpg" alt="a>b">'.
And the following is the definition of 'should':
should
If a document or user agent conflicts with this statement,
undesirable results may occur in practice even though it conforms to this
specification.
So in some sense each of us is correct. '>' *may* appear within quoted
attributes or within comments, but *should* not, because processors are
permitted to 'get it wrong'. I was incorrect to describe this as
'invalid HTML', but nevertheless it is somewhat tainted.
> >The purpose and effect of this is to make HTML tags parsable
> >by regexes.
>
> is this a conjecture on your part? i haven't seen anything to
> suggest that HTML is designed to be parsed with regex.
I should more accurately have said that the purpose 'seems to be' to make
HTML parsable by regexes; with the looseness implied by 'undesirable
results *may* occur in practice' and hence the vague aspersions cast on
documents that *require* more sophisticated parsing, the use of regexes
seems to me to be appropriate.
Thank you for adding to my understanding of this issue. I think the
programmer's choice of regex vs. parser may depend on the needs of the
situation -- speed/simplicity/looseness of the regex approach vs.
precision of the parsers in the HTTP modules. (I have not benchmarked
anything, so please accept 'speed' as a conjecture, not a measurement.
However, for the typical CGI application, time to load and compile the
module should be included in the speed analysis, which Benchmark will
not tell you.)
--
(Yet Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 26 Aug 1998 05:00:20 +0900
From: No.unsoiliciteds@dead.end (Norman UNsoliciteds)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <No.unsoiliciteds-2608980500210001@cs11i11.ppp.infoweb.or.jp>
In article <MPG.104c920dc17158389897e8@nntp.hpl.hp.com>, lr@hpl.hp.com
(Larry Rosler) wrote:
>. My understanding is that characters that have syntactic
> significance in HTML tags (specifically including < > " and &) may not
> appear in CDATA, but must be replaced by their representations (< >
> " &) or by their equivalent numerical escapes (&#decimal-
> integer;). The purpose and effect of this is to make HTML tags parsable
> by regexes.
However if the intention is to deHTMLize a hyper text document, the
"<"">""&" won't be escaped (<) this would mean as a HTML document it
would be useless - a browser would show the document as it actually
was(showing the tags as text) instead of formatting the text according to
the tags. This approach would mean having to parse the existing document
so that the offending character entities could be substituted for their
escaped versions to then re parse them with the regexp to remove them
--
The Dinosaurs were so stupid, they couldn't
even devise the means of thier own extinction,
they had to wait for Nature to do it for them.
------------------------------
Date: Tue, 25 Aug 1998 12:35:48 -0700
From: Sergio Antoy <antoy@cs.pdx.edu>
To: scott@softbase.com
Subject: Re: Scheduling Perl with Win NT AT Svc
Message-Id: <35E31214.2432DF79@cs.pdx.edu>
scott@softbase.com wrote:
>
> Alex Tatistcheff (alext@cri-boi.nospam.com) wrote:
>
> > Rather than run my NT Perl script as a service I'd like to run it using
> > the NT Scheduler Service (AT service).
>
> Better yet, go to http://www.skwc.com/essent and scroll down
> until you get to my free cron reimplementation in Perl.
> It's like having a real job scheduler on NT! :)
> I use this for backups.
>
> Scott
> --
> Look at Softbase Systems' client/server tools, www.softbase.com
> Check out the Essential 97 package for Windows 95 www.skwc.com/essent
> All my other cool web pages are available from that site too!
> My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
404 Not Found
The requested URL /essent/cron.txt was not found on this server.
Sergio Antoy
------------------------------
Date: 25 Aug 1998 19:40:14 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Search and replace
Message-Id: <6rv3uu$bdj$5@marina.cinenet.net>
ABeldowi@newyorklife.com wrote:
: i am trying to go through file, and everytime i come accross a url
:
: (defined as =~ /http:\/\/.*\..*\.com/ )
Note that that can be rewritten so as to avoid LTS (Leaning Toothpick
Syndrome:
m!http://.*\..*\.com/!
Note also that those greedy .* matches will eat up everything on the line,
then grudgingly backtrack far enough for the remainder of the regex to
match. This will trash attempts to get more than one url from the same
line, as you mention below. Further, your url pattern doesn't allow for
anything following the domain part (no path/file part, that is). Is this
intentional? Ditto on disallowing any top-level domain part other than
.com?
: I want to basically add html <a href..> tags to it. so replace url with <a
: href..>url</a> would be helpful. I spent some time on this, and had the
: following problems using various methods:
This was actually covered quite recently on this group; you might try
Deja-ing it on relevant keywords.
: - while reading a file (one line at a time up to \n), a line with more than 1
: url would only replace the last one.
I don't believe this, with what you have above. It should actually grab
everything between the first 'http://' and the last '.com' and treat that
as one big url.
: - could not grab the matched url. the file may have many different urls, so
: I can't just replace with a static value...I need to capture the current
: match to insert it between the <a href..>, then continue to the next unique
: url.
See the sections on capturing parens and the s/// operator in perlre.
Also, showing your actual code is considered good form.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Tue, 25 Aug 1998 19:28:13 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Taint checking in NT
Message-Id: <6rv3ad$22j$4@nz12.rz.uni-karlsruhe.de>
"John Call" <johnc@interactive.ibm.com> wrote:
>I like to develop on Unix but have been asked to develop my current project
>on NT. I want to enable taint checking. I left in the the shebang line as
>follows:
>
>#!/usr/bin/perl -w -T
>
>Perl seems to be performing as asked. My question, is this the proper way to
>turn on warnings and taint checking on NT systems or is there a more proper
>way that is preferred by Perl?
The Shebang line is a comment for perl [1] and ignored by NT. You are
presumably calling your script by calling "perl scriptname". Make that
"perl -wT scriptname" instead.
Greetings
Marc
[1] unless there is some magic happening that I am not aware of
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: 25 Aug 1998 18:04:10 GMT
From: Arved_37@chebucto.ns.ca (Arved Sandstrom)
Subject: Re: Why dont people read the FAQs
Message-Id: <6ruuaq$ek1$1@News.Dal.Ca>
Richard Proctor (Richard@waveney.demon.co.uk) wrote:
: 8) I am not sure that Hubris comes into it though, with Hubris you solve
: the problem without the FAQ, or CPAN or clp.misc ...
Larry Wall is an aficionado of the language, and when he mentioned Hubris
I trust he liked the word, but really just meant confidence. Someone with
hubris is, by definition, an asshole.
: NB Abigails posts may be curt, but are generaly right and often amusing,
: and there is an awfull lot of perl to be learnt from her sigs.
Curt is a generous description. Sarcastic and obnoxious might be more
accurate. It struck me when I read one of her replies that she had better
be perfect (I guess this is where the Hubris comes in), because she's sure
cutting down on the list of people that might answer a request of hers.
There are a few people on this group I regard as experts - they also
display courtesy and restraint. All hallmarks of being professionals.
Arved Sandstrom
: --
: Richard Proctor Richard@waveney.demon.co.uk
------------------------------
Date: Tue, 25 Aug 1998 14:42:07 -0400
From: Dave Stephens <stepherd@gusun.georgetown.edu>
Subject: Win32 Command Line Pass?
Message-Id: <35E3057F.17DF5DA1@gusun.georgetown.edu>
Perhaps I can solicit some advice from the Perl digerati:
If I want to pass a command to another application I have been using
either
print `ping 141.161.1.2\n`;
or something like this:
open(MAIL,"|wsendmail.exe -CGI -f($ident) -s($subject) $send
email.txt");
close (MAIL);
First, which is the preferred method? Any differences? My perl
education has
consisted primarily of browsing through other people's code and an
occasional
scan of the camel book, thus I sometimes end up with quirky
methodologies.
Second, let's say I wanted to check the output of such a command. For
example,
if I call print `ping 141.161.1.2\n`; how can I check if the response
is "Reply from
141.161.1.2: bytes=blah blah blah" or "Request timed out." ???
For some context, I'm supposed to write a script that occasionally pings
a set
of IPs to confirm that they are still on-line. . .hence the need.
Any advice appreciated. Please CC my e-mail when replying. . .Thanks!
Dave Stephens
stepherd@gusun.georgetown.edu
------------------------------
Date: Tue, 25 Aug 1998 13:56:26 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Y2K Date Support
Message-Id: <fl_aggie-2508981356260001@aggie.coaps.fsu.edu>
In article <6rujil$8vg$1@rand.dimensional.com>, Daniel Grisinger
<dgris@rand.dimensional.com> wrote:
+ In the year 2000 it will report the wrong result, that sure sounds
+ like a bug to me.
Ah, well, yes, I see your point. Sorry, must not had enough caffiene this
morning...
Just a reminder for all you listening, handle the return value for the year
from localtime() and friends as:
$year=$year+1900;
and you'll be just fine thru the Y2K problem.
James
------------------------------
Date: 25 Aug 1998 18:17:22 GMT
From: gebis@fee.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Y2K Date Support
Message-Id: <6ruv3i$1gm@mozo.cc.purdue.edu>
fl_aggie@thepentagon.com (I R A Aggie) writes:
}Just a reminder for all you listening, handle the return value for the year
}from localtime() and friends as:
}$year=$year+1900;
}and you'll be just fine thru the Y2K problem.
That is, assuming you survive the C.H.U.D.s.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3539
**************************************