[17755] in Perl-Users-Digest
Perl-Users Digest, Issue: 5175 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Dec 21 21:05:32 2000
Date: Thu, 21 Dec 2000 18:05:11 -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: <977450711-v9-i5175@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 21 Dec 2000 Volume: 9 Number: 5175
Today's topics:
ANNOUNCE: Inline version 0.30 <ingy@ActiveState.com>
ANNOUNCE: Inline::C version 0.30 <ingy@ActiveState.com>
ANNOUNCE: Inline::CPR version 0.10 <ingy@ActiveState.com>
Re: automatic FAQ answerer idea (Steven Smolinski)
Re: automatic FAQ answerer idea miko@idocs.com
CLPM and novices <jboes@eoexchange.com>
Re: CLPM and novices <harrisr@bignet.net>
command to print embedded man page <replytousenet@usenet.com>
Re: command to print embedded man page <elijah@workspot.net>
Re: command to print embedded man page (Tom Christiansen)
Re: h4x0r vNought (Steven Smolinski)
how to change permissions (not the owner) davidchew@my-deja.com
Re: how to change permissions (not the owner) <rc@telus.net>
Re: how to change permissions (not the owner) (Brian Pontz)
Re: HTML parse nodo70@my-deja.com
Re: HTML parse (Jerome O'Neil)
Re: Is there a standard, current Perl for Win32 (withou <camerond@mail.uca.edu>
Re: Is there a standard, current Perl for Win32 (withou <nagle@animats.com>
Re: matching the previous line <jboes@eoexchange.com>
Re: matching the previous line <tinamue@zedat.fu-berlin.de>
Re: Need help with substitution: $HTML =~ s/\$(\w+)/${$ <tinamue@zedat.fu-berlin.de>
Re: Net::SNMP/POSIX namespace probs (Chris Fedde)
Re: netiquette checking script <revjack@revjack.net>
Re: netiquette checking script <mjcarman@home.com>
Re: Perl on Win32 from a unix guy. <peter.sundstrom@eds.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 21 Dec 2000 20:46:01 GMT
From: Brian Ingerson <ingy@ActiveState.com>
Subject: ANNOUNCE: Inline version 0.30
Message-Id: <t457fjeqiubk35@corp.supernews.com>
Inline version 0.30 is a major release. See the FEATURES list below.
Inline and Inline::C have changed from ALPHA to BETA status.
It is available at http://search.cpan.org/search?dist=Inline
Inline also has a new mailing list:
inline@perl.org
inline-subscribe@perl.org (to subscribe)
The Inline README says:
INTRODUCTION:
Inline.pm - Write Perl subroutines in other programming languages.
Inline lets you write Perl subroutines in other programming languages
like C. You don't need to compile anything. All the details are
handled transparently so you can just run your Perl script like normal.
Example:
use Inline C => <<'END';
SV* JAxH(char* x) {
return newSVpvf ("Just Another %s Hacker",x);
}
END
print JAxH('Inline'), "\n";
When run, this complete program prints:
Just Another Inline Hacker
The one line version is:
perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf("Just
Another %s Hacker",x);}};print JAxH+Inline'
-------------------------------------------------------------------------------
FEATURES:
Inline version 0.30 is a major upgrade from previous verions. It includes:
+ Integrated support for typemap files in C.
+ All the recognized types now come *only* from typemaps.
+ The default types come from the default typemap installed with
core Perl.
+ Typemaps are used to modify the Parse::RecDescent grammar for
parsing C.
+ This means you can easily use your existing typemaps.
+ Language support completely separated from base Inline code.
+ Beta supoort for C (Inline::C, included)
+ Alpha support for C++ (Inline::CPP, available separately)
+ Alpha support for Python (Inline::Python, available separately)
+ Support for 'embedding' Perl in C with my new programming
language, CPR.
(Inline::CPR, available separately) This one may warp your mind :^)
+ Simple API for adding your own language support.
+ Write your own Inline::Foo
+ Write your own implementation of Inline::C, or just modify
Inline::C::grammar.
+ Support for interpreted languages in addition to compiled ones.
+ Autodetection of new Inline language modules.
+ Much easier and more powerful configuration syntax.
+ More XS and MakeMaker features exposed for configuration (for C
and C++).
+ Flexible new syntax for specifying source code.
+ Use DATA section for AutoLoader, Inline, and POD simultaneously.
+ Support for using Inline 'with' other modules.
+ "use Inline with 'Event';" lets Event.pm pass config info to Inline.pm.
+ Event.pm 0.80 has built in support for Inline.pm 0.30 and higher.
+ Write Event callbacks in C with extreme ease.
+ More documentation
+ perldoc Inline
+ perldoc Inline-FAQ
+ perldoc Inline-API
+ perldoc Inline::C
+ perldoc Inline::C-Cookbook
+ Better error messages and easier debugging.
+ Mailing list: inline@perl.org
Other features of Inline.pm include:
= Automatically compiles your source code and caches the shared object.
= Automatically DynaLoads the shared object and binds it to Perl.
= Recompiles only when the C code changes.
= Changing the Perl code will not cause a recompile of the C code.
= Support for writing extension modules, suitable for distributing to
the CPAN.
= Support for generating and binding Inline subs at run time. <bind()>
= Works on all Unix and MS Windows configurations.
-------------------------------------------------------------------------------
INSTALLATION:
This module requires the Digest::MD5 and Parse::RecDescent modules. It
also requires the appropriate C compiler. (Where appropriate means the
one referred to in your Config.pm)
To install Inline do this:
perl Makefile.PL
make
make test
make install
On ActivePerl for MSWin32, use nmake instead of make. Or just use:
ppm install Inline
For convenience, Inline::C is packaged with Inline, and will be
automatically installed as well.
-------------------------------------------------------------------------------
INFORMATION:
= For more information on Inline, see 'perldoc Inline' and 'perldoc
Inline-FAQ'
= For information about Inline::, see 'perldoc Inline::C' and
'perldoc Inline::C-Cookbook'
= For information on writing your own Inline extension see 'perldoc
Inline-API'
= For information about the Perl5 internal C API, see 'perldoc
perlapi' or try http://www.perldoc.com/perl5.6/pod/perlapi.html
= The Fall 2000 edition of The Perl Journal has an article about Inline
The Inline.pm mailing list is inline@perl.org. Send email to
inline-subscribe@perl.org to subscribe.
Please send questions and comments to "Brian Ingerson" <INGY@cpan.org>
Copyright (c) 2000, Brian Ingerson. All Rights Reserved.
------------------------------
Date: Thu, 21 Dec 2000 20:46:57 GMT
From: Brian Ingerson <ingy@ActiveState.com>
Subject: ANNOUNCE: Inline::C version 0.30
Message-Id: <t457fr7ggif53c@corp.supernews.com>
Inline::C is a new module. It contains all of the C specific code from
earlier releases of Inline.pm. Inline::C is distributed with Inline
version 0.30.
It is available at http://search.cpan.org/search?dist=Inline
Please see the Inline announcement for more info.
------------------------------
Date: Thu, 21 Dec 2000 21:21:46 GMT
From: Brian Ingerson <ingy@ActiveState.com>
Subject: ANNOUNCE: Inline::CPR version 0.10
Message-Id: <t457g0tc9a6j40@corp.supernews.com>
Inline::CPR (C Perl Run) is the kind of the opposite of Inline::C. It
lets you call Perl from your C program. And, since this is Inline, the
compilation is transparent.
This is the first release. It is ALPHA status, and only works on Unix
platforms for now.
It is available at http://search.cpan.org/search?dist=Inline-CPR
Inline also has a new mailing list:
inline@perl.org
inline-subscribe@perl.org (to subscribe)
The Inline::CPR README says:
INTRODUCTION:
CPR - C Perl Run
A Perl interpreter 'embedded' in your C?
A C interpreter using Perl?
A new API for the Perl5 internals?
Welcome to the wacky world of CPR!
To take a test drive, just put a CPR hashbang at the top of your C
program and run it like a Perl script.
Here is an example:
#!/usr/bin/cpr
/* hello.cpr - Just say "Hello" */
int main(void) {
printf("Hello, world\n");
return 0;
}
Or (if your chitty hashbang is out for repairs) just run:
cpr hello.cpr
After a few seconds, your CPR program will greet the Earth in the
standard fashion. Run it again for a faster response.
-------------------------------------------------------------------------------
INSTALLATION:
This module requires Inline.pm version 0.30 or higher, and the
appropriate C compiler. (Where appropriate means the one referred to in
your Config.pm)
To install Inline::CPR do this:
perl Makefile.PL
make
make test
make install
(On ActivePerl for MSWin32, use nmake instead of make.)
This will not only install Inline::CPR, but will also install a binary
program: 'cpr'. This is the CPR interpreter. Inline::CPR is just a
support module for the CPR interpreter. (You don't actually use it
directly.)
The installation process will also generate a sample CPR program:
./examples/synopsis.cpr
You have to 'make install' before you can run it successfully.
-------------------------------------------------------------------------------
INFORMATION:
- For more information on CPR, see 'perldoc Inline::CPR'.
- For information about Inline.pm, see 'perldoc Inline'.
- For information about the Perl5 internal C API, see 'perldoc perlapi'
or try http://www.perldoc.com/perl5.6/pod/perlapi.html
The CPR mailing list is inline@perl.org. Send mail to
inline-subscribe@perl.org to subscribe.
Please send questions and comments to "Brian Ingerson" <INGY@cpan.org>
Copyright (c) 2000, Brian Ingerson. All Rights Reserved.
------------------------------
Date: Fri, 22 Dec 2000 00:56:45 GMT
From: sjs@yorku.ca (Steven Smolinski)
Subject: Re: automatic FAQ answerer idea
Message-Id: <slrn945dgi.ja.sjs@ragnar.stevens.gulch>
Logan Shaw <logan@cs.utexas.edu> wrote:
> I'm perfectly happy if the prevailing opinion is that people don't
> want an FAQ robot, but I'm not too happy when people say "we don't
> want an FAQ robot because of <problem with trivial solution>". I
> don't mean to be a pain, but that is what is happening so far.
I don't want to repeat the arguments from all the other times this has
come up, but I do want to offer a suggestion.
If you think you can come up with a nontrivial solution, then do so.
Write a program that takes a newsgroup posting from stdin and print
out the corresponding FAQ entry on stdout.
Circulate that program; let people test it. If it is brilliant,
people will admire the work and hasten to use it.
Or better, yet, make a module, say AI::AutoFAQ or something. Submit
it to CPAN.
I've yet to see anyone who raises a bot as a solution do anything
other than produce a 'trivial' solution, i.e., one that didn't address
the concerns previously posted here.
Steve
--
Steven Smolinski => http://www.steven.cx/
------------------------------
Date: Fri, 22 Dec 2000 01:22:45 GMT
From: miko@idocs.com
Subject: Re: automatic FAQ answerer idea
Message-Id: <91uad0$6qk$1@nnrp1.deja.com>
In article <91te60$iuh$1@boomer.cs.utexas.edu>,
logan@cs.utexas.edu (Logan Shaw) wrote:
> Also, the robot limits itself to M postings per day as a failsafe.
>
> I'm perfectly happy if the prevailing opinion is that people don't
> want an FAQ robot, but I'm not too happy when people say "we don't
> want an FAQ robot because of <problem with trivial solution>". I
> don't mean to be a pain, but that is what is happening so far.
There's a lot of merit to your idea, Logan, although it may well be that
the group simply doesn't want a robot posting messages (exceptions
having been noted earlier).
Here are some possible modifications to your idea:
1) If you want to try to implement it for the sheer darn fun of it,
consider sending the responses to a mailing list of volunteers instead
of posting to the group. The volunteers can eyeball the responses (send
the original postings also, of course) and give feedback on the
accuracy. I'll volunteer myself.
2) Maybe the responses could be emailed to the person posting the
message instead of posted publicly.
3) Perhaps you could coordinate with Nathan Torkington to add a "If your
question was about [whatever] see [whatever FAQ]" section to his
automatic emails to first-timers.
-miko
--
Miko O'Sullivan
Author of The Mikodocs Guide to HTML
http://www.mikodocs.com/tags/
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 21 Dec 2000 16:46:45 -0500
From: "Jeff Boes" <jboes@eoexchange.com>
Subject: CLPM and novices
Message-Id: <3a429051$1$36809$bbae4d71@news.net-link.net>
Unless my newsreader has been taken over by the Illuminati, I think "AvA"
<a.v.a@home.nl> babbled:
> If you permit me one comment: this newsgroup acts as a huge source of
> knowledge for alot of novices (like me) for whom reading the man pages
> seem difficult. Not everyone has the ability to be a master in
> computerscience, but still like to play with perl on a lower level. That
> sometimes gives stupid questions for the guru's im sure. So be patient
> with us please.
The problem is that the newsgroup is a terrible source of knowledge for
novices. No, really. I've seen novice posts here that go unanswered, some
that get five snippy remarks to the tune of 'RTFM, dammit', and some that
get outright WRONG answers (stated with the same authority and conviction
as the RIGHT answer!). A novice is ill-equipped to wade through that.
Better you should struggle with the perldoc pages until you get familiar
with them, and how to turn hints there into solutions. Because in the
long run, that's all the intermediate, advanced, and "guru" Perlers have
to go on, too.
--
Jeff Boes <jboes@eoexchange.com> Tel: (616) 381-9889 x.18
Sr. Software Engineer, EoExchange, Inc. http://www.eoexchange.com/
Search, Monitor, Notify. http://www.eomonitor.com/
------------------------------
Date: Thu, 21 Dec 2000 19:11:50 -0500
From: "Randy Harris" <harrisr@bignet.net>
Subject: Re: CLPM and novices
Message-Id: <t4571gheveh7d4@corp.supernews.com>
Jeff Boes <jboes@eoexchange.com> wrote in message
news:3a429051$1$36809$bbae4d71@news.net-link.net...
> Unless my newsreader has been taken over by the Illuminati, I think
"AvA"
> <a.v.a@home.nl> babbled:
>
> > If you permit me one comment: this newsgroup acts as a huge source
of
> > knowledge for alot of novices (like me) for whom reading the man
pages
> > seem difficult.
[snip]
> The problem is that the newsgroup is a terrible source of knowledge
for
> novices. No, really. I've seen novice posts here that go unanswered,
some
> that get five snippy remarks to the tune of 'RTFM, dammit', and some
that
> get outright WRONG answers (stated with the same authority and
conviction
> as the RIGHT answer!). A novice is ill-equipped to wade through that.
> Better you should struggle with the perldoc pages until you get
familiar
> with them, and how to turn hints there into solutions. Because in the
> long run, that's all the intermediate, advanced, and "guru" Perlers
have
> to go on, too.
>
I disagree. I certainly wouldn't suggest that CLPM is a substitute for
perldoc but it is still a valuable learning resource. Perldoc is a fine
reference but a poor tutorial. I read CLPM, when I encounter code
samples I don't understand, I look them up in perldoc. I find structure
and style very hard to learn from perldoc because there are few
examples, but they are plentiful here. Even some very fundamental
concepts such as using warnings and strict are emphasized here but
easily missed in perldoc.
Randy Harris
------------------------------
Date: Thu, 21 Dec 2000 17:47:05 -0600
From: Bob Smiton <replytousenet@usenet.com>
Subject: command to print embedded man page
Message-Id: <kd554tciopc4rjc3sgulo4tu08s3f902r4@4ax.com>
what command do I use to generate the man page for a perl script which
has the embedded man page for itself at the top of the script,
contained within the same file?
thanks!
------------------------------
Date: 22 Dec 2000 00:05:47 GMT
From: Eli the Bearded <elijah@workspot.net>
Subject: Re: command to print embedded man page
Message-Id: <eli$0012211903@qz.little-neck.ny.us>
In comp.lang.perl.misc, Bob Smiton <replytousenet@usenet.com> wrote:
> what command do I use to generate the man page for a perl script which
> has the embedded man page for itself at the top of the script,
> contained within the same file?
Perl scripts often have embeded 'pod' documentation. These can be
read with 'perldoc' or turned into [nt]roff man pages with
'pod2man'.
Does that help?
Elijah
------
sub S(){@s=caller($/);$s[3]=~s s\w+:+ss&&print$s[3].q. .}$/=$^=~s/\S+/\n/;
$_="Just (eli) Another (the) Perl (bearded) Hacker";sub s($){eval shift;$/
}while(s&&&&& &s(qq&sub$^&.$&.q&{\&S}&)&& &{$&}&&s&&&){$/}$\=$^;print q &&
------------------------------
Date: 21 Dec 2000 17:13:50 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: command to print embedded man page
Message-Id: <3a429cbe@cs.colorado.edu>
In article <eli$0012211903@qz.little-neck.ny.us>,
Eli the Bearded <elijah@workspot.net> wrote:
>In comp.lang.perl.misc, Bob Smiton <replytousenet@usenet.com> wrote:
>> what command do I use to generate the man page for a perl script which
>> has the embedded man page for itself at the top of the script,
>> contained within the same file?
>
>Perl scripts often have embeded 'pod' documentation. These can be
>read with 'perldoc' or turned into [nt]roff man pages with
>'pod2man'.
>
>Does that help?
Er, no; the right answer is probably "pod2text", but see below:
From the Camel's pod chapter:
+-----------------------------+
| Pod Translators and Modules |
+-----------------------------+
Several pod translators bundled with Perl that convert pod
documents (or the embedded pod in other types of documents)
into various formats. All should be 8-bit clean.
*pod2text*
converts pod into text. Normally this is 7-bit ASCII, but
it's 8-bit if it had 8-bit input, or specifically into
ISO-8859-1 if you use sequences like `LE<uacute>thien' for
*Lúthien* or `EE<auml>rendil' for *Eärendil*.
If you have a file with pod in it, the easiest (although
perhaps not the prettiest) way to view just the formatted
pod would be:
% pod2text File.pm | more
Then again, pod is supposed to human readable without formatting.
*pod2man*
converts pod into Unix manpage format suitable for viewing
through *nroff*(1) or creating typeset copies via *troff*(1).
For example,
% pod2man File.pm | nroff -man | less
or
% pod2man File.pm | troff -man -Tps -t > tmppage.ps
% ghostview tmppage.ps
and to print:
% lpr -Ppostscript tmppage.ps
*pod2html*
converts pod into HTML for use with your favorite viewer.
% pod2html File.pm > tmppage.html
% lynx tmppage.html
% netscape -remote "openURL(file:`pwd`/tmppage.html)"
That last one is a *netscape* hack that works if you already
have *netscape* running somewhere to tell that incarnation
to load the page. Otherwise, just call it as you did *lynx*.
*pod2latex*
converts pod into LaTeX.
Note especially: "pod is supposed to human readable without formatting".
--tom
------------------------------
Date: Fri, 22 Dec 2000 00:35:02 GMT
From: sjs@yorku.ca (Steven Smolinski)
Subject: Re: h4x0r vNought
Message-Id: <slrn945c7r.ja.sjs@ragnar.stevens.gulch>
Tom Christiansen <tchrist@perl.com> wrote:
> #!/usr/bin/perl -p
[... snip program that turns perfectly good english into some dialect
of script kiddie ...]
Tom, if your post was an answer on Jeopardy, I'd have to guess that
the reply, properly phrased in the form of a question, is:
"What output would prove that a man had altogether too much spare
time?"
Steve
------------------------------
Date: Fri, 22 Dec 2000 00:19:31 GMT
From: davidchew@my-deja.com
Subject: how to change permissions (not the owner)
Message-Id: <91u6me$3u0$1@nnrp1.deja.com>
How to change permissions of a file
using perl script ?
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Fri, 22 Dec 2000 00:54:54 GMT
From: Rob Carraretto <rc@telus.net>
Subject: Re: how to change permissions (not the owner)
Message-Id: <3A42A65D.F29A6EF1@telus.net>
davidchew@my-deja.com wrote:
>
> How to change permissions of a file
> using perl script ?
>
perldoc -f chmod
------------------------------
Date: Fri, 22 Dec 2000 01:15:22 GMT
From: pontz@NO_SPAM.channel1.com (Brian Pontz)
Subject: Re: how to change permissions (not the owner)
Message-Id: <3a42aaa1.175875960@news.ne.mediaone.net>
>How to change permissions of a file
>using perl script ?
chmod
But it wont help if your not the owner or have the correct perms on
the server to do so.
Brian Pontz
comp.lang.perl.misc Searchable archive
http://www.axehind.com/complangperl.html
------------------------------
Date: Thu, 21 Dec 2000 23:30:24 GMT
From: nodo70@my-deja.com
Subject: Re: HTML parse
Message-Id: <91u3qh$1j2$1@nnrp1.deja.com>
In article <3A426584.B675DABF@wsb.com>,
Jeff Helman <jhelman@wsb.com> wrote:
> nodo70@my-deja.com wrote:
> >
> > I have read HTML::LinkExtor but it only extract the links. I also
need
> > to store the text which is for the link. So I write my own script
> > below would do that. However, in some case it doesn't handle all
so I
> > ask if anyone can point it out.
>
> Note that I agree with other posters that you should probably be using
> the HTML::* family of packages, but if you really want to shoot
yourself
> in the foot, far be it from me to deny you the shotgun. :)
>
that's what I inted to do, learning and practice since I am a newbie in
PERL
>
> while ($Body =~ m!<A[^>]+HREF=(['"])([^\1]+?)\1[^>]*>(.+?)</A>!sig) {
> my ($link, $text) = ($2, $3);
> my $linkText = sprintf ("%-60s %-s\n",$link,$text);
> print $linkText;
> }
>
But if $Body = "<a href="http://www.yourname.com"><font size=3>Your
Name</font></a> then it would print
http://www.yourname.com <font size=3>Your Name</font>
I just add:
$text =~ s/\<.+\>(.+)\<\/.+\>/$1/gsi if ($text =~ m/\>/);
text =~ s/<\/.+\>//g;
Do you think it's a good coding?
Thanks for your help.
Nodo
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Fri, 22 Dec 2000 01:59:44 GMT
From: jerome@activeindexing.com (Jerome O'Neil)
Subject: Re: HTML parse
Message-Id: <kAy06.2261$lU6.419837@news.uswest.net>
nodo70@my-deja.com elucidates:
>> in the foot, far be it from me to deny you the shotgun. :)
>>
> that's what I inted to do, learning and practice since I am a newbie in
> PERL
It would seem also that you are a newbie to development and programming
in general. When you are no longer a newbie, you will know that
re-inventing a wheel (especialy a hard wheel) is rarely good programming
practice.
> $text =~ s/\<.+\>(.+)\<\/.+\>/$1/gsi if ($text =~ m/\>/);
> text =~ s/<\/.+\>//g;
>
> Do you think it's a good coding?
No. If your goal is to learn about manipulating HTML, then use the
tools available to you to do so. If your goal is to learn about
regular expressions, there are better academic excercises than
parsing HTML.
--
If men could learn from history, what lessons it might teach us! But
passion and party blind our eyes, and the light which experience gives
is a lantern on the stern, which shines only on the waves behind us.
--Samuel Taylor Coleridge, "Recollections"
------------------------------
Date: Thu, 21 Dec 2000 17:09:37 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: Is there a standard, current Perl for Win32 (without ActivePerl?)
Message-Id: <3A428DB1.10E7D2BE@mail.uca.edu>
John Nagle wrote:
>
> Is there a current, standard version of Perl for Win32? By this I
> mean one without all the "ActivePerl/Active-X/Internet Explorer
> scripting" crap in it? The only non-ActivePerl binary distributions
> at CPAN seem to be either old versions or have a built-in Apache server.
What's wrong with ActivePerl? If you don't want to install PerlScript or
something else in addition to the core Perl (plus the Win32 modules),
you don't have to. Maybe there's a reason that the other binaries at
CPAN are not up to date, they just aren't really needed.
You _could_ always compile your own, if you wanted to specify exactly
what to include.
Cameron
--
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu
------------------------------
Date: Thu, 21 Dec 2000 16:43:11 -0800
From: John Nagle <nagle@animats.com>
Subject: Re: Is there a standard, current Perl for Win32 (without ActivePerl?)
Message-Id: <3A42A39F.AE1DE430@animats.com>
Cameron Dorey wrote:
>
> John Nagle wrote:
> >
> > Is there a current, standard version of Perl for Win32? By this I
> > mean one without all the "ActivePerl/Active-X/Internet Explorer
> > scripting" crap in it? The only non-ActivePerl binary distributions
> > at CPAN seem to be either old versions or have a built-in Apache server.
>
> What's wrong with ActivePerl? If you don't want to install PerlScript or
> something else in addition to the core Perl (plus the Win32 modules),
> you don't have to. Maybe there's a reason that the other binaries at
> CPAN are not up to date, they just aren't really needed.
Well, for one thing, ActivePerl isn't entirely open source.
There are redistribution restrictions. Read the license at
http://www.activestate.com/Products/ActivePerl/redistribution_info.html
Whether those restrictions violate the GPL is a good question.
Some companies prohibit all "Active-X" related material because
of security problems. Also, to install ActivePerl, you have to obtain
and install a new version of Internet Explorer and an NT service pack,
always risky activities. It makes a new Perl much harder to install.
Perl used to have a consistent, platform-independent installation
process; now it requires Microsoft software just to install.
ActivePerl also encourages the development of future Perl
packages which have undesirable Windows dependencies, which was
probably Microsoft's intention when they put money into ActiveState.
> You _could_ always compile your own, if you wanted to specify exactly
> what to include.
I encourage someone to do this, possibly through SourceForge.
It would build the reputation of whomever did that job.
John Nagle
Animats
------------------------------
Date: Thu, 21 Dec 2000 16:41:54 -0500
From: "Jeff Boes" <jboes@eoexchange.com>
Subject: Re: matching the previous line
Message-Id: <3a429051$0$36809$bbae4d71@news.net-link.net>
Unless my newsreader has been taken over by the Illuminati, I think
nobull@mail.com babbled:
>
> if ( my $seq = /start/ .. /finish/ and $seq !~ /E/ )
>
>
Did you mean
if ( my $seq = /start/ .. /finish/ and $seq !~ /finish/ )
?
To the OP: another approach is
if (/start/ .. /finish) {
last if /finish/;
...
}
--
Jeff Boes <jboes@eoexchange.com> Tel: (616) 381-9889 x.18
Sr. Software Engineer, EoExchange, Inc. http://www.eoexchange.com/
Search, Monitor, Notify. http://www.eomonitor.com/
------------------------------
Date: 22 Dec 2000 00:48:41 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: matching the previous line
Message-Id: <91u8d9$53ukk$6@fu-berlin.de>
hi,
Jeff Boes <jboes@eoexchange.com> wrote:
> Unless my newsreader has been taken over by the Illuminati, I think
> nobull@mail.com babbled:
>> if ( my $seq = /start/ .. /finish/ and $seq !~ /E/ )
> Did you mean
> if ( my $seq = /start/ .. /finish/ and $seq !~ /finish/ )
> ?
i don't think so. read about .. in the perlop
manpage yourself. $seq will never contain "finish" but
it will contain "xE0" (x is the xth line)
at the last line ("finish").
or print $seq at every iteration, then you'll see how it works.
btw, for me it works only if i define $seq before the if(),
otherwise it's always one behind:
01:45am tina@linux:~/perl 1115> perl -e'
open FH, "testdatei";
while (<FH>) {
if (my $seq = /start/ .. /ende/ and ($seq !~ /E/)) {
print "$seq $_";
}
}'
1 start
2 123
3 dumdidum
4E0 ende
01:45am tina@linux:~/perl 1116> perl -e'
open FH, "testdatei";
while (<FH>) {
my $seq = /start/../ende/;
if ($seq and ($seq !~ /E/)) {
print "$seq $_";
}
}'
1 start
2 123
3 dumdidum
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: 22 Dec 2000 00:27:54 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Need help with substitution: $HTML =~ s/\$(\w+)/${$1}/g;
Message-Id: <91u76a$53ukk$5@fu-berlin.de>
hi,
Summers, Bob [FITZ2:8m81:EXCH] <bobsummers@americasm97.nt.com> wrote:
> The guts of the my script uses:
> $HTML =~ s/\$(\w+)/${$1}/g;
> to change all "$"variables into their corresponding values (eg, $subject
> is changed into VALUE for $subject). This works great if the
> "Template" subroutine is IN THE SAME cgi file so that the variables are
> locally scoped.
> However, I've been trying unsuccessfully to put the "Template"
> subroutine into a common package but I can't seem to find the proper way
> to reference the variables in the "main" cgi (eg, $main'subject). I
> think I need something like:
> $HTML =~ s/\$(\w+)/$main'{$1}/g;
> but this doesn't work (gives me: '{subject}. Other variations give me
> errors) If I just use the original substitution line with ${$1}, the
> "value" of the variable $1 is not known.
try
s/\$(\w+)/${$main::{$1}}/g;
but it would be even better to put all your values in
a hash.
then you can do:
s/\$(\w+)/$main::hash{$1}/g
hth,
tina
--
http://tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx
------------------------------
Date: Fri, 22 Dec 2000 01:46:06 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Net::SNMP/POSIX namespace probs
Message-Id: <yny06.400$B9.189122048@news.frii.net>
In article <Pine.GSO.4.21.0012211552290.741-100000@rac4.wam.umd.edu>,
missing <missing@wam.umd.edu> wrote:
>The following pgm generates the listed errors. This is perl version
>5.005_03 running on rh linux. Seems like I've got a namespace collision
>w/ Exporter::import and POSIX::import both importing POSIX but I'm not
>sure how to correct this since Net::SNMP doesn't 'use POSIX' and I'm
>using POSIX in other pgms.
>
>any hlp apprec.
>
POSIX is a big fat module. If you just 'use POSIX;' it puts
everything it can export into your namespace. I prefer to limit
it rather drasticly. For example
use POSIX qw( setsid chown fstat );
will only import those three functions into my name space.
good luck
chris
--
This space intentionally left blank
------------------------------
Date: 21 Dec 2000 23:14:22 GMT
From: revjack <revjack@revjack.net>
Subject: Re: netiquette checking script
Message-Id: <91u2se$5fp$3@news1.Radix.Net>
Keywords: Hexapodia as the key insight
Richard Zilavec <rzilavec@tcn.net> wrote:
: On 21 Dec 2000 13:13:34 -0700, tchrist@perl.com (Tom Christiansen)
: wrote:
:>We really need shared or cooperative {score,kill}files. I'm thinking
:>of some dynamic solution to the noiseboxes, maybe reminiscent of
:>Greg Bacon's periodic stats postings. I'll likely start with
:>something like this.
: I'm not totally sure what the killfile is, however I'm sure I don't
: want to be on it. I'm still very new to posting in newsgroups, I do
: my best, take advise from others but I'm still learning and will make
: mistakes. I really like this group and hope others like myself are
: not penalized for trying.
I'd suggest testing your answers before posting them. Never,
ever say "try this code, it might work".
--
___________________
revjack@revjack.net
------------------------------
Date: Thu, 21 Dec 2000 17:46:40 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: netiquette checking script
Message-Id: <3A429660.75BA23F9@home.com>
Richard Zilavec wrote:
>
> Tom Christiansen wrote:
>
>> We really need shared or cooperative {score,kill}files.
>
> I'm not totally sure what the killfile is, however I'm sure I don't
> want to be on it.
A killfile is a set of instructions for your newsreader which basically
say "If a message matches X, then I don't want to even see it" where X
could be a particular sender, domain, subject, etc. It's a way for
people to filter out the noise. And no, you don't want to be on one,
especially if it belongs to one of the more knowledgeable people in this
newsgroup.
A scorefile is a less all-or-nothing approach. It allows you to raise or
lower the "score" for messages and thus prioritize which ones you read.
Having a low score in someone's scorefile doesn't mean that they *won't*
read your message, just that they probably won't get around to it.
> I'm still very new to posting in newsgroups, I do my best,
> take advise from others but I'm still learning and will make
> mistakes. I really like this group and hope others like
> myself are not penalized for trying.
Don't worry. So long as you make an effort to get along here, nobody is
going to killfile you. It's the people who refuse to play nice who get
blacklisted.
So when you have a problem, hit the docs first. Search the FAQ. Search
Deja. Then post here. Don't jeapordy-quote. Trim quoted material. Have a
bit of a thick-skin and don't get into a flame-war if someone corrects
some aspect of your message or chides you for not doing the prerequisite
checks before posting.
If you just lurk for a while, you'll pick up on everything pretty
quickly. Also, Tad has been working on a "Posting Guidelines" primer for
getting along in this ng. He's still soliciting comments on it, but it
should be usable by newbies now. The message ID for the most recent
thread is <slrn942go9.3mb.tadmc@magna.metronet.com>
-mjc
------------------------------
Date: Fri, 22 Dec 2000 12:00:50 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Perl on Win32 from a unix guy.
Message-Id: <91u233$738$1@hermes.nz.eds.com>
<dnay@vbs.net> wrote in message news:91tmke$lrq$1@nnrp1.deja.com...
>
>
> Hey All, This is most likely a VERY easy question but it's been giving
> me a headache for the last couple of hours. :)
>
> I usually program with perl on unix and enable to get the date I just
> call /usr/bin/date with the format that I want and use the results from
> STDOUT as my value. The problem is that I am attempting to write a
> perlscript on Windows 2000 server now using ActiveState perl and there
> obviously is no /usr/bin/date command.
>
> So, what I want to know is what is the best way to get the date/time on
> Win32 with ActiveState perl?
The same way you get the date/time on a Unix server.
perldoc -f localtime
------------------------------
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 5175
**************************************