[21955] in Perl-Users-Digest
Perl-Users Digest, Issue: 4177 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 26 06:05:49 2002
Date: Tue, 26 Nov 2002 03:05:06 -0800 (PST)
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, 26 Nov 2002 Volume: 10 Number: 4177
Today's topics:
Re: A little help on a regex expression please (Helgi Briem)
Re: Converting UTF-8 to ISO-8859-1 <jurgenex@hotmail.com>
Re: get slow? if constructing html-page from several ht <palladium@spinn.net>
Re: Help writing simple script (Damian James)
Re: Help writing simple script <robertbu@hotmail.com>
Re: Help writing simple script (Tad McClellan)
Re: Help writing simple script <uri@stemsystems.com>
Re: Help writing simple script <ahj6@hotmail.com>
Re: mozilla & netscape. incapable of CSS word-break ? <ahj6@hotmail.com>
Re: mozilla & netscape. incapable of CSS word-break ? (Tad McClellan)
Re: mozilla & netscape. incapable of CSS word-break ? <ahj6@hotmail.com>
Re: mozilla & netscape. incapable of CSS word-break ? <jurgenex@hotmail.com>
Re: mozilla & netscape. incapable of CSS word-break ? <ahj6@hotmail.com>
Re: mozilla & netscape. incapable of CSS word-break ? <ian@WINDOZEdigiserv.net>
Re: my/local Scoping subtlies <s_grazzini@hotmail.com>
Perl Service App? <Bob@holiday.com>
Re: Perl Service App? <BROWNHIK@Syntegra.Bt.Co.Uk>
Re: perlcc and perl modules (Helgi Briem)
Sending NumKeys with Win32::GuiTest <goth1938@hotmail.com>
Re: Sentence splitter (Helgi Briem)
Re: snmptrapd handler in perl? (John Ramsden)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 26 Nov 2002 10:38:18 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: A little help on a regex expression please
Message-Id: <3de34ec0.3569340199@news.cis.dfn.de>
On Mon, 25 Nov 2002 19:08:32 +0100, Jane Doe
<jane.doe@acme.com> wrote:
>Thanks Brian for your help
>
>On 25 Nov 2002 17:59:14 +0000, Brian McCauley <nobull@mail.com> wrote:
>>You should be using an HTML parser then. Trying to parse HTML with
>>simple regex is a lost cause except in very special cases.
>
>Yes, I heard of packages more sophisticated than LWP::Simple, but
>since I don't know much about this, and I'm almost there, I'll take a
>look later if I can avoid it now.
HTML::Parser is not *more sophisticated* than LWP Simple.
It has a completely different purpose. LWP::Simple fetches
documents over the internet, HTML::Parser parses them
afterwards. Apples and oranges. They are often used
together, of course.
--
Regards, Helgi Briem
helgi AT decode DOT is
A: Top posting
Q: What is the most irritating thing on Usenet?
- "Gordon" on apihna
------------------------------
Date: Tue, 26 Nov 2002 05:16:30 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Converting UTF-8 to ISO-8859-1
Message-Id: <OsDE9.28910$hi6.16257@nwrddc02.gnilink.net>
Francesco Moi wrote:
> Does anybody have any routine/function to convert a string from UTF-8
> to ISO-8859-1 by using Perl?
Did you try Text::Iconv?
jue
------------------------------
Date: Mon, 25 Nov 2002 21:59:52 -0700
From: "Palladium Solutions" <palladium@spinn.net>
Subject: Re: get slow? if constructing html-page from several html source files by perl script.
Message-Id: <uu60nh9vg74556@corp.supernews.com>
Why not use a solution like HTML::Mason from CPAN?
Then you could embed the HTML files within others and serve via mod_perl?
"pkent" <pkent77tea@yahoo.com.tea> wrote in message
news:pkent77tea-3C5FEC.02034426112002@news-text.blueyonder.co.uk...
> In article <arui1c$t96$1@news1.kornet.net>,
> "Hyungjin Ahn" <ahj6@hotmail.com> wrote:
>
> > Q: I know mod-perl save compiled script images in memory so that as soon
as
> > requested, mod-perl replies fast. What if I compose a per script which
opens
> > several html tag source files and combines them to build one page to
show?
> > Is it cached, either? So, any speed loss or system-resource loss in
doing
> > so?
>
> The files' contents will be cached if you cache them. They will not be
> cached if you don't cache them. Mod_perl doesn't _automagically_ cache
> anything like that.
>
> The usual way I've seen of caching items in memory under mod_perl is to
> use a package global hash inside a module, keyed on the filename. Of
> course, beware of letting mod_perl children run forever and
> inadvertantly caching your entire filesystem in memory :-) You may want
> to profile your code in some way before bothering with file-contents
> caching - it might not make any difference, or it might.
>
> [ We /do/ have a really nice caching module at work, but it's just not
> quite on CPAN yet :-( ]
>
> P
>
> --
> pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
> Remove the tea to reply
------------------------------
Date: 26 Nov 2002 05:16:51 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: Help writing simple script
Message-Id: <slrnau60u3.ojg.damian@puma.qimr.edu.au>
On Mon, 25 Nov 2002 23:07:45 -0500, Susan G. Conger said:
>...
>I tried this but I am still having problems. There are a couple of
>things that are different. Basially the comment characters are /* */
>not #. So here is what I have in a file that I can call.
>
>#!/usr/bin/perl -pi
> s/^//*# define QE_MAC_GCC310*///# define QE_MAC_GCC310$1/g;s/^# define
>QE_MAC_CW83_102///*# define QE_MAC_CW83_102*// $1/g;
Well, that would be:
#!/usr/bin/perl -lpi
s{^/\*(# define QE_MAC_GCC310)\*/}{$1}g;
s{^(# define QE_MAC_CW83_102)}{/* $1 */}g;
But a real script would be much more verbose/readable :-).
Note that this will fail if the comments go over more than
one line.
--damian
------------------------------
Date: Tue, 26 Nov 2002 05:28:27 GMT
From: "robertbu" <robertbu@hotmail.com>
Subject: Re: Help writing simple script
Message-Id: <%DDE9.32953$mL2.24014@nwrddc01.gnilink.net>
"Susan G. Conger" <congers@yoeric.com> wrote in message >
> I tried this but I am still having problems. There are a couple of
> things that are different. Basially the comment characters are /* */
> not #. So here is what I have in a file that I can call.
>
> #!/usr/bin/perl -pi
> s/^//*# define QE_MAC_GCC310*///# define QE_MAC_GCC310$1/g;s/^# define
> QE_MAC_CW83_102///*# define QE_MAC_CW83_102*// $1/g;
>
> I think it is upset because the / is something it understands and I am
> trying to use it in the search and replace strings. Any help is greatly
> appreciated.
>
/ and * are special characters in regular expressions and must be escaped
using a \. Below is my code corrected for your new specification. If you
prefer the oneliner, you can easily figure out what to change by examining
below. I don't know VB, but coming from a C background #<space>define looks
funny. Are you sure there is always exactly one space between the # and the
define? Are you sure your tokens are never defined to a specific value?
Both will break the code below. Both are easy fixes given a good
definition.
use strict;
use warnings;
open FILE, $ARGV[0] or die "Could not open file $ARGV[0]: $!\n";
while (<FILE>)
{
s/^\/\*\s*(# define QE_MAC_GCC310)\s*\*\//$1/;
s/^(\s*# define QE_MAC_CW83_102)/\/\*$1\*\//;
print $_;
}
== Rob ==
------------------------------
Date: Mon, 25 Nov 2002 23:37:21 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Help writing simple script
Message-Id: <slrnau624h.29i.tadmc@magna.augustmail.com>
Susan G. Conger <congers@yoeric.com> wrote:
> In article <slrnau5pta.h30.damian@puma.qimr.edu.au>,
> damian@qimr.edu.au (Damian James) wrote:
>> On Mon, 25 Nov 2002 21:58:02 -0500, Susan G. Conger said:
>> >needs to uncomment out this line by removing the #. Then it has to find
>> >the define OLD_USE_THIS and comment out this line by adding a #.
> I tried this but I am still having problems. There are a couple of
> things that are different. Basially the comment characters are /* */
> not #.
But didn't you say before that the comment character _was_ # ?
perldoc -q comment
"How do I use a regular expression to strip C style com
ments from a file?"
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 26 Nov 2002 05:45:45 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Help writing simple script
Message-Id: <x7el987uk7.fsf@mail.sysarch.com>
>>>>> "r" == robertbu <robertbu@hotmail.com> writes:
r> / and * are special characters in regular expressions and must be escaped
r> using a \. Below is my code corrected for your new specification. If you
/ is not special in a regex. it may be special if it is the
delimiter. but it is not a regex metachar. and the best way to handle /
inside the regex is to change the delimiter and not to escape
it. escaping / leads to leaning toothpick syndrome and is very annoying
to read.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Tue, 26 Nov 2002 16:07:42 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: Help writing simple script
Message-Id: <arv54e$hi9$1@news1.kornet.net>
"Susan G. Conger" <congers@yoeric.com> wrote in message
news:congers-EFDE92.23074525112002@news.uswest.net...
> In article <slrnau5pta.h30.damian@puma.qimr.edu.au>,
> damian@qimr.edu.au (Damian James) wrote:
>
> > On Mon, 25 Nov 2002 21:58:02 -0500, Susan G. Conger said:
> > >I am new to perl and I need to write a simple script. The script needs
> > >to read the ivtest.vb file and find the # define USE_THIS line. It
then
> > >needs to uncomment out this line by removing the #. Then it has to
find
> > >the define OLD_USE_THIS and comment out this line by adding a #.
Anyone
> > >have any suggestions on how to do this?
> >
> > Not a script, but on the command line (on *one* line):
> >
> > perl -i.bak -ple 's/^# (define USE_THIS)/$1/g;s/^(define
OLD_USE_THIS)/#
> > $1/g'
> > ivtest.vb
> I tried this but I am still having problems. There are a couple of
> things that are different. Basially the comment characters are /* */
> not #. So here is what I have in a file that I can call.
HI, Susan
perl -i.bak -ple 's/^# (define USE_THIS)/$1/g;s/^(define OLD_USE_THIS)/\/\*#
$1\*\//g' ivtest.vb
I added C style comment.
> > > Then it has to find the define OLD_USE_THIS and comment out this line
by adding a #.
yes. I know what u mean. You wanted to find "#define OLD_USE_THIS" not
"define OLD_USE_THIS". And you want to comment it out that line by adding
"/* */". But you said "by adding a #". I think you meant that "#define
OLD_USE_THIS" was lack of "#" character in the head the phrase so that you
wanted to add "#" and comment out the "#" & "define OLD_USE_THIS" combined
phrase by surrounding with "/* */" (C style comment characters). -Hyungjin
Ahn(ahj6@hotmail.com)
>
> #!/usr/bin/perl -pi
> s/^//*# define QE_MAC_GCC310*///# define QE_MAC_GCC310$1/g;s/^# define
> QE_MAC_CW83_102///*# define QE_MAC_CW83_102*// $1/g;
>
> I think it is upset because the / is something it understands and I am
> trying to use it in the search and replace strings. Any help is greatly
> appreciated.
>
> Thanks,
> Susan
>
> --
> ============================================================
> Susan G. Conger Custom Windows & Macintosh Development
> President Web Site Design & Development
> YOERIC Corporation Database Design & Development
> 256 Windy Ridge Road
> Chapel Hill, NC 27517
> Phone/Fax: (919)542-0071
> email: congers@yoeric.com Web: www.yoeric.com
------------------------------
Date: Tue, 26 Nov 2002 14:24:19 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape. incapable of CSS word-break ?
Message-Id: <aruv2k$c4g$1@news1.kornet.net>
I made perl code which calculate characters pixel width and insert spaces or
<br>s at the corner of table box for mozilla to break lines. It can
calculate utf8's all the CJK chars include western europe chars. Now it
works well except a few problems those I'm fixing.
thanks for your opinions.
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnau5u20.1vk.tadmc@magna.augustmail.com...
> Hyungjin Ahn <ahj6@hotmail.com> wrote TOFU:
> > "Jay Tilton" <tiltonj@erols.com> wrote in message
> > news:3de2c0b4.109217459@news.erols.com...
> >> "Hyungjin Ahn" <ahj6@hotmail.com> wrote:
> >>
> >> : in <table> tag, style="word-break:break-all;" command doesn't work in
> >> : mozilla & netscape.
> >>
> >> Why would it? It only exists for IE.
>
> >> Of course, CSS and browser-specific behaviors have nothing to do with
> >> Perl.
>
>
> > they do have something to do with perl,
>
>
> They do NOT have something to do with perl (nor with Perl).
>
> If you switched to writing your programs in Java, then the
> above would _still_ be true.
>
> It can't be "about Perl" if switching to something other
> than Perl changes nothing.
>
>
> --
> Tad McClellan SGML consulting
> tadmc@augustmail.com Perl programming
> Fort Worth, Texas
------------------------------
Date: Mon, 25 Nov 2002 23:41:23 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: mozilla & netscape. incapable of CSS word-break ?
Message-Id: <slrnau62c3.29i.tadmc@magna.augustmail.com>
Hyungjin Ahn <ahj6@hotmail.com> wrote:
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrnau5u20.1vk.tadmc@magna.augustmail.com...
>> Hyungjin Ahn <ahj6@hotmail.com> wrote TOFU:
>> > "Jay Tilton" <tiltonj@erols.com> wrote in message
>> > news:3de2c0b4.109217459@news.erols.com...
>> >> Of course, CSS and browser-specific behaviors have nothing to do with
>> >> Perl.
>>
>>
>> > they do have something to do with perl,
>>
>>
>> They do NOT have something to do with perl (nor with Perl).
>>
>> If you switched to writing your programs in Java, then the
>> above would _still_ be true.
> I made perl code which calculate characters pixel width and insert spaces or
><br>s at the corner of table box for mozilla to break lines.
That's nice, but it has nothing to do with whether your question
was a Perl question or not.
> thanks for your opinions.
I did not give any opinions.
I gave only a fact.
Your question was not about Perl.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 26 Nov 2002 15:19:17 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape. incapable of CSS word-break ?
Message-Id: <arv29m$e8p$1@news1.kornet.net>
"Tad McClellan" <tadmc@augustmail.com> wrote in message
> > thanks for your opinions.
> I did not give any opinions.
> I gave only a fact.
> Your question was not about Perl.
I thank you for your anxious concerns to my question.
The following article is cached in Google newsgroup database at
http://groups.google.co.kr/groups?hl=ko&lr=&ie=UTF-8&oe=UTF-8&newwindow=1&fr
ame=right&th=9fa36a5515ded794&seekm=aru8tt%24bmm%241%40news1.kornet.net#link
1 :
At the top of these threads, I wrote:
> in <table> tag, style="word-break:break-all;" command doesn't work in
mozilla & netscape. what's wrong?
No, this is not what I exactly want to know. But I thought I would be happy
if I recieved any information on the reason why mozilla & navigator does not
support word-break properties and what makes them from patching it.
Anyway, I wrote subsequently:
> any solution for this?
Yes, this is what I wanted to know. Following the above line, I exemplified
my effort to solve such an incapable word-break in mozilla & navigator.
I exemplified my trifle source code with an additional problem in the code:
> (ps: I tried the following:
> use utf8;
> #$title =~ s/([^\s]{30})/$1 /g; # comment7
> $title =~
>
s/([^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\
s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s
][^\s][^\s][^\s][^\s][^\s][^\s][^\s][^\s])/$1 /ig; #comment8
> no utf8;
> as you see, it's failed when I use #comment7 rather than #comment8.
> thanks in advance!
Now I cleared up the above source code by myself. ( #comment7 is not valid
in CJK chars of utf8)
In addition, for text-like urls to convert into anchor and non-spacing long
phrase were all cleared.
Though I resolved the problem myself, I still want to know whether someone
already made cool script to make word-break availble in mozilla & navigator.
If I troubled you by making obscure question, I'm sorry. - Hyungjin
Ahn(ahj6@hotmail.com)
------------------------------
Date: Tue, 26 Nov 2002 07:09:47 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: mozilla & netscape. incapable of CSS word-break ?
Message-Id: <%6FE9.29077$hi6.11236@nwrddc02.gnilink.net>
Hyungjin Ahn wrote:
[...]
> Though I resolved the problem myself, I still want to know whether
> someone already made cool script to make word-break availble in
> mozilla & navigator.
And in which way would this be related to Perl exactly?
jue
------------------------------
Date: Tue, 26 Nov 2002 16:18:42 +0900
From: "Hyungjin Ahn" <ahj6@hotmail.com>
Subject: Re: mozilla & netscape. incapable of CSS word-break ?
Message-Id: <arv5p2$hv4$1@news1.kornet.net>
"J?gen Exner" <jurgenex@hotmail.com> wrote in message
news:%6FE9.29077$hi6.11236@nwrddc02.gnilink.net...
> Hyungjin Ahn wrote:
> [...]
> > Though I resolved the problem myself, I still want to know whether
> > someone already made cool script to make word-break availble in
> > mozilla & navigator.
>
> And in which way would this be related to Perl exactly?
'cool script' means 'well-operating perl source or module'.
thanks -Hyungjin Ahn(ahj6@hotmail.com)
------------------------------
Date: Tue, 26 Nov 2002 10:48:56 GMT
From: "Ian.H [dS]" <ian@WINDOZEdigiserv.net>
Subject: Re: mozilla & netscape. incapable of CSS word-break ?
Message-Id: <8dk6uugeraaogoi12mdurfjepp9s3c3798@4ax.com>
Keywords: Remove WINDOZE to reply
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
In a fit of excitement on Tue, 26 Nov 2002 16:18:42 +0900, "Hyungjin
Ahn" <ahj6@hotmail.com> managed to scribble:
>
> "J?gen Exner" <jurgenex@hotmail.com> wrote in message
> news:%6FE9.29077$hi6.11236@nwrddc02.gnilink.net...
> > Hyungjin Ahn wrote:
> > [...]
> > > Though I resolved the problem myself, I still want to know
> > > whether someone already made cool script to make word-break
> > > availble in mozilla & navigator.
> >
> > And in which way would this be related to Perl exactly?
>
> 'cool script' means 'well-operating perl source or module'.
>
But my 'cool script' was written in PHP.. so your point being?
'cool script' has no reference to _ANY_ language whatsoever, unless
specified.
Regards,
Ian
-----BEGIN xxx SIGNATURE-----
Version: PGP Personal Privacy 6.5.3
iQA/AwUBPeNR6Gfqtj251CDhEQKV6gCg4C72GjnZhdr32VlL4UKsmzjEvkkAoLe5
9zCFWzY6JzLm50WG6xr3uVvQ
=WxAy
-----END PGP SIGNATURE-----
--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Scripting, Web design, development & hosting.
------------------------------
Date: Tue, 26 Nov 2002 05:06:50 GMT
From: Steve Grazzini <s_grazzini@hotmail.com>
Subject: Re: my/local Scoping subtlies
Message-Id: <KjDE9.165472$gB.34389996@twister.nyc.rr.com>
James E Keenan <jkeen@concentric.net> wrote:
> "Gerry Grieve" <grieve@astro.ubc.ca> wrote:
>>
>> I've blithely using the "my" directive to scope variables in
>> perl scripts. Now I've stumbled upon a case where the nuances
>> between my and local seems to be critical. I trying to accessing
>> list elements with references to their list names. This does
>> not seem to fall in the categories listed (in PCB) as requiring
>> local.
>>
>> In reference to the example below, can anyone explain why
>> the my'ing an array variable doesn't work?
Because symrefs don't work on 'my' variables.
my @A = (1,2);
push @{ "A" }, 3;
print "my => @A\n";
print "global => @::A\n";
Probably the easiest thing would be to switch to real
references and forget about local() for a while.
my %hash = ( A => [1,2] );
push @{$hash{A}}, 3;
print "A => @{$hash{A}}\n";
>> #!/usr/local/bin/perl -w
>>
>> {
>> my @I = qw [ i0 i1 i2 ]; # I want to use this
>
> Are you sure you didn't overlook the fact that, in this context, the
> square brakcets after 'qw' have nothing to do with referencing.
> qw [ i0 i1 i2 ] is exactly the same as qw(i0 i1 i2) or qw |i0 i1 i2|,
> etc.
>>
>> local @C = qw [ c0 c1 c2 ]; # but this works !!
>>
>> foreach my $stx ( qw [ I C ] )
>> {
>> push @{$stx}, $stx."3"; # add to the list
>
> Hence, the above is wrong: $stx is not an array reference; it's an
> ordinary scalar. So @{$s5x} is a syntax error.
You can look up the symrefs in
$ perldoc perlref
But you're probably better off continuing to ignore them.
--
Steve
------------------------------
Date: 26 Nov 2002 09:35:47 GMT
From: Bob <Bob@holiday.com>
Subject: Perl Service App?
Message-Id: <Xns92D261EE4682Ethisismyidtoken@195.92.193.157>
Hi,
I want to run some code once every 30 or 60 seconds ish to do a bit of
work on a Linux machine.
I know I can use CRON to launch my program but is there another way to
have the program run permanently in the background, just waking up
periodically to do its job?
The Linux machine in question is my ISP's and so I don't think they'll
take too kindly to either:
a) Using cron to launch a program every 60 seconds on a shared server
or
b) Having me running a program permanently on a shared server. Presumably
they'll auto-kill programs that persist for too long won't they?
Many thanks in advance,
Bob Holiday
------------------------------
Date: Tue, 26 Nov 2002 10:15:52 -0000
From: "Kevin Brownhill" <BROWNHIK@Syntegra.Bt.Co.Uk>
Subject: Re: Perl Service App?
Message-Id: <arvi0p$dnh$1@pheidippides.axion.bt.co.uk>
"Bob" <Bob@holiday.com> wrote in message
news:Xns92D261EE4682Ethisismyidtoken@195.92.193.157...
> Hi,
>
> I want to run some code once every 30 or 60 seconds ish to do a bit of
> work on a Linux machine.
>
> I know I can use CRON to launch my program but is there another way to
> have the program run permanently in the background, just waking up
> periodically to do its job?
>
> The Linux machine in question is my ISP's and so I don't think they'll
> take too kindly to either:
>
> a) Using cron to launch a program every 60 seconds on a shared server
>
> or
>
> b) Having me running a program permanently on a shared server. Presumably
> they'll auto-kill programs that persist for too long won't they?
Why not set up a perl script on a home machine, using the LWP module, to
call your script periodically.
------------------------------
Date: Tue, 26 Nov 2002 11:02:32 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: perlcc and perl modules
Message-Id: <3de35491.3570829992@news.cis.dfn.de>
On 25 Nov 2002 17:05:01 -0800, princccess@aol.com (Return
Jasmin) wrote:
>When you compile with perlcc, is there anyway to find out what
>standard perl modules were used? I need to find out what's included in
>the executable you get after compiling with perlcc. Can anyone help me
>out on this? Thanks in advance!
If you actually manage to compile a working executable
with perlcc, let alone include modules, you get a big
prize.
Has anyone ever managed to get that thing to work?
--
Regards, Helgi Briem
helgi AT decode DOT is
A: Top posting
Q: What is the most irritating thing on Usenet?
- "Gordon" on apihna
------------------------------
Date: Tue, 26 Nov 2002 16:13:29 +0800
From: "Just in" <goth1938@hotmail.com>
Subject: Sending NumKeys with Win32::GuiTest
Message-Id: <arvaf9$33c$1@news01.intel.com>
I can sort of get what I want using Win32::GuiTest
But there's this VAX program that requires me to
send the Num key numbers on the far right of the key
board not the ones above QWERTY - how
can I do that?
Using GuiTest is fine otherwise, but I must say I
don't like using sleep to wait for the correct screen
to appear. This VAX based program that I'm trying to
automate relies on network connectivity, so
depending on bandwidth consumption the screen
changes can be longer than the sleep period I set.
Is there anything available that would allow me to
write the contents of the VAX output screen to the
screen and a variable that I could run a m/// on?
Thanks,
Just in
------------------------------
Date: Tue, 26 Nov 2002 11:01:22 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: Sentence splitter
Message-Id: <3de352ce.3570379193@news.cis.dfn.de>
On 25 Nov 2002 16:32:21 -0800, caie@elixa.co.uk (Caie)
wrote:
>I'm currently making an "Automated Plagiarism Detector" as a project
>for my final year project. To do so, I am reading in a text file,
>analysing each sentence for "well-written-ness" and producing an HTML
>page with the results of this analysis. One major hurdle I have run
>into is splitting the given text into sentences. I am using
>ActivePerl (the computer I must work on is Win98) and downloaded the
>Lingua::EN::Sentence-0.23 module. Unfortunatly this crashes the PC I
>am working on and therefore I need a different method.
I find that very hard to believe. I just installed and
tested Lingua::EN::Sentence and it works just fine.
How can a Perl module crash your computer, even something
as fragile as Win98? Which part crashes? Downloading,
installing or running? How are you downloading, installing
and running it?
The source code of Lingua::EN::Sentence seems perfectly
straightforward, simple Perl. For the life of me I fail to
see how its use could crash any OS.
--
Regards, Helgi Briem
helgi AT decode DOT is
A: Top posting
Q: What is the most irritating thing on Usenet?
- "Gordon" on apihna
------------------------------
Date: 26 Nov 2002 01:31:48 -0800
From: john_ramsden@sagitta-ps.com (John Ramsden)
Subject: Re: snmptrapd handler in perl?
Message-Id: <d27434e.0211260131.43a6a1c7@posting.google.com>
Brian Seppanen <seppy@chartermi.net> wrote:
>
> Stefan Mohr wrote:
> >
> > doeas anyone know, if there is an snmp-trap daemon written in perl somewhere
> > out there in the universe? i have to make something like that - and i would
> > better see, if there is something like this still there.
>
> If there was I imagine it would be listed on CPAN ftp.cpan.org
>
> Browse by module, and perhaps you'll find something.
Wow, I hope Stefan is patient. He posted his question (in
comp.protocols.snmp)in august and had his first reply only in
november, and not a particularly informative reply at that!
I had to investigate the same question, and in case anyone else also
needs
the info (or Stefan is still wondering ;) these are my conclusions:
There are three CPAN Perl modules that cover SNMP, to varying degrees:
* Net::SNMP by David Town
Pure Perl; protocol only (doesn't do MIB files);
doesn't do trap receives, hence can't be used as a trap daemon
* SNMP_Session by Simon Leinen
Pure Perl again; supposed to do trap receives, but when I tried
using it, it failed to parse a v2c header of a trap that the
Net-SNMP 'snmptrapd' utilitity was able to read.
* SNMP by Joe Marzot
Sits on top of the Net-SNMP library; seems to me like the most
complete Perl implementation (An advantage of installing
Net-SNMP
is the utilities that come with it and can be used for
simulation
and testing; but of course using pure Perl packages also has its
advantages for an app to be used on other systems.)
Actually, I am currently writing an app that uses Joe M's SNMP package
to receive traps.
At the moment it is obstinately refusing to receive traps, despite the
fact that I'm certain the code is correct (it follows almost
identically
the Perl example in net-snmp-5.0.5/perl/SNMP/examples/SNMP/trap-example.pl)
and again 'snmptrapd' picks up the same traps I'm firing at the code.
I can only assume that my perl trap daemon is picking up a different
and inappropriate SNMP config file, and am about to investigate this.
But all suggestions (and further Perl module info) will be gratefully
received!
Cheers
John R Ramsden (john_ramsden@sagitta-ps.com)
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.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 V10 Issue 4177
***************************************