[21767] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3971 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 15 00:06:06 2002

Date: Mon, 14 Oct 2002 21:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 14 Oct 2002     Volume: 10 Number: 3971

Today's topics:
    Re: !\n  problem <pkent77tea@yahoo.com.tea>
        clpm missing trolls? OT <bryan@akanta.com>
    Re: clpm missing trolls? OT <pinyaj@rpi.edu>
    Re: do I need a demon? <pkent77tea@yahoo.com.tea>
    Re: File download/copy to client subdirectory <pkent77tea@yahoo.com.tea>
    Re: HTTP Command help....? <comdog@panix.com>
        Lycos still has a Y2K bug <jboes@qtm.net>
    Re: Multiple Pings/Second <smackdab1@hotmail.com>
    Re: Multiple Pings/Second <smackdab1@hotmail.com>
        OT: Homework [Was: Re: Using Perl to solve interesting  <s_grazzini@hotmail.com>
    Re: Perl script works half the time (Tyger Tyger)
    Re: Perl script works half the time (Tyger Tyger)
    Re: Problem configuring perl-5.8.0 (zarethustra)
        problems installing CGI::Lite 2.0 <dontask@aintgonnatellyou.not>
    Re: problems installing CGI::Lite 2.0 <goldbb2@earthlink.net>
    Re: problems installing CGI::Lite 2.0 <not@gonnatell.ya>
    Re: Read a single character from STDIN (W98) <nikogo@nigde.net>
    Re: Regular Expression Hell (RealServer Log) (Tad McClellan)
        Regular scheduled download of specific URL? - take 2 (Will Lee)
    Re: Regular scheduled download of specific URL? - take  <nobody@dev.null>
    Re: Split of very large text file <pkent77tea@yahoo.com.tea>
    Re: Switching from Python to Perl <derek@wedgetail.com>
    Re: Switching from Python to Perl <derek@wedgetail.com>
        To POE or not to POE (use Threads?) <rereidy@indra.com>
    Re: Using Perl to solve interesting Banking Probm .. <tom.beer@btfinancialgroup.spamfilter.com>
    Re: Using Perl to solve interesting Banking Probm .. <nobody@dev.null>
    Re: Using Perl to solve interesting Banking Probm .. <tom.beer@btfinancialgroup.spamfilter.com>
        Win32::NetAdmin a246456@fmr.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 15 Oct 2002 00:46:44 GMT
From: pkent <pkent77tea@yahoo.com.tea>
Subject: Re: !\n  problem
Message-Id: <pkent77tea-C18318.01464215102002@news-text.blueyonder.co.uk>

In article <3daae718.97838489@news.knology.net>, zawy@yahoo.com (zawy) 
wrote:

> I sometimes see a !\n inserted in text submitted to a form, or list-serv,
> and now in BusinessWeek Online.  I can't tell if it's a Perl, mail, or
> Linux "enhancement".  Does anyone know what causes this and how to prevent

Sendmail, and possibly other MTAs, will do this when they encounter 
extremely long lines in the body of a message. I've looked on google a 
bit but can't find any more hard facts. I'm not saying that in this case 
it's definitely sendmail but that would be a good place to start looking.

This little bit of code:

perl -e 'for (0..1000) { print ($_%10?".":"|") }' | mail USER@HOSTNAME

showed me that my copy of sendmail was splitting lines with a "!\n" 
sequence after 989 characters.

P

-- 
pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
Remove the tea to reply


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

Date: Mon, 14 Oct 2002 23:42:11 GMT
From: Bryan <bryan@akanta.com>
Subject: clpm missing trolls? OT
Message-Id: <3DAB5652.7050302@akanta.com>

Sorry for the off topic post, but my curiosity is getting the better of 
me... :)

There used to be a very amusing if somewhat neurotic troll here in clpm...

I'm pretty sure anyone who has followed this group for a bit knows to 
whom I am referring..

Is she/he gone?



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

Date: Mon, 14 Oct 2002 19:50:07 -0400
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
Subject: Re: clpm missing trolls? OT
Message-Id: <Pine.SGI.3.96.1021014194843.19386A-100000@vcmr-64.server.rpi.edu>

On Mon, 14 Oct 2002, Bryan wrote:

>Sorry for the off topic post, but my curiosity is getting the better of 
>me... :)

Or the worst of you.

>There used to be a very amusing if somewhat neurotic troll here in clpm...

Not very amusing, if you ask me.  Insulting, ignorant, and unnecessary.

>Is she/he gone?

Hopefully.  Please don't invoke it by name or title.

-- 
Jeff "japhy" Pinyan      RPI Acacia Brother #734      2002 Acacia Senior Dean
"And I vos head of Gestapo for ten     | Michael Palin (as Heinrich Bimmler)
 years.  Ah!  Five years!  Nein!  No!  | in: The North Minehead Bye-Election
 Oh.  Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)



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

Date: Tue, 15 Oct 2002 00:20:05 GMT
From: pkent <pkent77tea@yahoo.com.tea>
Subject: Re: do I need a demon?
Message-Id: <pkent77tea-723675.01200315102002@news-text.blueyonder.co.uk>

In article <aoe4sa$egr@netnews.hinet.net>,
 "jackkon" <jackkon@ms29.url.com.tw> wrote:

> I want to execute some perl scripts in the unix server from the remote
> program.
> I think I must have a demon to receive my remote command.

You could write your own, but often a better route is to use inetd. 
inetd itself takes care of accepting socket connections, forking, etc, 
and all your program has to do is read in on standard input, and print 
out on standard output. Easy.

With any daemon process, whether it's run from inetd, xinetd, or your 
own standalone process, be very wary about executing anything at all. 
Opening up a port is opening a possible way to attack your machine. 
Without seeing any of your code it's hard to advise on specifics, but 
just be careful.

P

-- 
pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
Remove the tea to reply


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

Date: Tue, 15 Oct 2002 00:22:51 GMT
From: pkent <pkent77tea@yahoo.com.tea>
Subject: Re: File download/copy to client subdirectory
Message-Id: <pkent77tea-586037.01225015102002@news-text.blueyonder.co.uk>

In article <66d1df6a.0210131902.49ce4773@posting.google.com>,
 ranam@ue.com.au (Ravi) wrote:

> I'm trying to write a script in perl to download a binary file from my
> webserver to a specific directory in the client's PC.  For example,
> I'd like to put the binary file in "c:\a_drive" and nowhere else.

use Net::FTP;

read the pod for it, especially the binary() method and the get() 
method...

 .....
   get ( REMOTE_FILE [, LOCAL_FILE [, WHERE]] ) 

      Get REMOTE_FILE from the server and store locally. LOCAL_FILE may 
be a filename or a filehandle. If not specified, the file will be stored 
in the current directory with the same leafname as the remote file.
 ......

P

-- 
pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
Remove the tea to reply


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

Date: Mon, 14 Oct 2002 21:32:21 -0500
From: brian d foy <comdog@panix.com>
Subject: Re: HTTP Command help....?
Message-Id: <141020022132219646%comdog@panix.com>

In article <aof5cl$o9n$1@newslocal.mitre.org>, Aaron Simmons <asimmons@mitre.org> wrote:

> Are you of the belief that
> you need to be qualified or certified in order to have the privilege to
> reply to Perl questions?  Get off your high horse!

it would be nice if people who answered Perl questions actually
knew how to help people, or at least correctly answered the 
question.

you seemed to have confused the two types of redirections, and if
you knew who Alan was you would take your lumps and move on.

-- 
brian d foy <comdog@panix.com> - Perl services for hire
The Perl Review - a new magazine devoted to Perl 
<http://www.theperlreview.com>


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

Date: Mon, 14 Oct 2002 21:02:10 -0400
From: Jeff Boes <jboes@qtm.net>
Subject: Lycos still has a Y2K bug
Message-Id: <v6qmqucjvvbcslippfs362i5pgureo3tv9@4ax.com>

Heh.  Found this at howto.lycos.com:  in the middle of their page that shows you
the last 10 pages you've used, the dates of your visits are displayed as:

Monday, 10/14/102 8:56 PM



--
~~~~~~~~~~~~~~~~|It is by caffeine alone I set my mind in motion, 
Jeffery Boes    |It is by the beans of Java that thoughts acquire speed, 
jboes@qtm.net   |The hands acquire shaking, the shaking becomes a warning, 
UIN 3394914     |It is by caffeine alone I set my mind in motion. 


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


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

Date: Tue, 15 Oct 2002 03:46:45 GMT
From: "smackdab" <smackdab1@hotmail.com>
Subject: Re: Multiple Pings/Second
Message-Id: <FcMq9.151623$S32.10816085@news2.west.cox.net>

It seems that the orig computed checksum is NOT the same checksum as
what comes back from a ping (might only be in my specific case)
BUT, Net::Ping doesn't check it and if I *make* it check, the checksums
don't match!

Don't know if you can believe this ;-)

So, I replaced saving the checksum with saving the sequence.  It seems to
work for 1 "alive" hosts, but never times out on 1 "dead" hosts...

Unfortunately running in the debugger vs normal causes the bug to not
show/show...
Without the debugger, I am completely lost as the perl is very advanced and
I'm still a beginner ;-)



"Benjamin Goldberg" <goldbb2@earthlink.net> wrote in message
news:3DAA4F20.1A174817@earthlink.net...
> smackdab wrote:
> >
> > Thanks!!!
> >
> > I am on Win32 and the $^E was helpful...I made the recv buffer 1500
> > and it got farther!
> >
> > Also, using either of these, allowed the code to send - yea, even
> > farther!
> > >    if( vec $wvec, fileno($socket), 1 ) {
> > > Or perhaps to:
> > >    if( $wvec eq $svec ) {
> >
> > But,things weren't coming back as a valid packet...
> >
> > So, after the recv() I added this line to grab the "end" of the string
> > to unpack()
> > (I think Net::Ping is doing this...)
> >     ($resp) = $resp =~ m/(.{8})$/;
>
> Actually, you should be getting the *first* 8 bytes, not the last.
>
> I think.
>
> --
> my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
> ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]




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

Date: Tue, 15 Oct 2002 03:50:05 GMT
From: "smackdab" <smackdab1@hotmail.com>
Subject: Re: Multiple Pings/Second
Message-Id: <NfMq9.151627$S32.10817369@news2.west.cox.net>

I had to increase the size of the buffer to at least 32...
But there are bigger problems to look into...see my
post on the other branch...

"Kevin Vaughn" <binabik1@mail.com> wrote in message
news:uqls5b29i4n7b9@corp.supernews.com...
> I ran smackdab's code, and I got the same error.  I used $^E like you said
> (never used it before) and I got this:
>
> "Error in recv: Unknown error #0x2726 (lookup 0x13D) at C:\scripts\ping.pl
> line 53."
>
> I am really feeling like a newbie now... From experience this looks like a
> memory address, but I've never delved into programming far enough to look
at
> memory allocation at any real level.  What would be a good resource for
> learning how all of this works, especially in the Perl context???  If you
> have time, or its not too complex to explain, how would I got about
"looking
> up" 0x13D?
>
> "Benjamin Goldberg" <goldbb2@earthlink.net> wrote in message
> news:3DA9D833.FD84E5F@earthlink.net...
> > smackdab wrote:
> > >
> > > Wow what great timing...I was looking @ trying to do this, gave up and
> > > then saw these posts.  I have used an example of yours for nonblocking
> > > port scanning, which works great (took me a while to understand it
> > > though...)
> > > It used IO::Select, which seems easier for us beginners...
> > >
> > > I can't get this to run, I currently get
> > >     Error in recv: Unknown error at test.pl line 53.
> > > Here are the lines:
> > > my $resp =  "";
> > > my $responder = recv( $socket, $resp, 8, 0 )
> > >      or die "Error in recv: $!"; # shouldn't happen.
> >
> > Whenever I see $! produce an "Unknown error" string, I try changing it
> > to $^E... then, if that doesn't print anything useful, I try printing
> > out the numeric value of $! or $^E, and then doing a google search to
> > find out which Windows Socket Error that is.
> >
> > If you're not on windows, this advice might not help (there are other
> > systems than windows where $^E prints something more useful than $!, but
> > obviously on non-windows platforms you can't lookup WSA-errors)
> >
> > > (I changed the my ($resp), as I saw the above in another book, but
> > > it didn't help...).  $socket is valid at this point...
> > >
> > > This line was confusing, so I dropped the $t as my book only
> > > said 1 thing came back from this call...
> > > I noticed that IO::Select->select() returns 3 things though...
> > > #(my ($n), $t) = select($rvec, $wvec, '', 0.5);
> > > my $n = select($rvec, $wvec, '', 0.5);
> >
> > Hmm... I suppose that if you don't use $t (which an earlier version of
> > my code did), then they are equivilant.
> >
> > > It *seems* to create the socket and call the select, but I never
> > > see it call send().
> > >
> > > This line:
> > > if( $wvec =~ tr/^\0// ) {
> > > Is it looking for a NULL in a buffer...
> >
> > No, it is looking for a NON-nul in the w-vector.
> >
> > > don't understand this whole part, as $wvec is a "@" or a "." ... well
> > > beyond me ;-)
> >
> > The $wvec variable is a bitvector, created with vec().  The only
> > properties of it that we care about are whether or not:
> >    vec( $wvec, fileno($socket), 1 )
> > is a true expression.
> >
> > It will have a value of "", or of "\000", or (assuming that
> > fileno($socket) is 3), "\008", which is an unprintable character.
> >
> > The string "\000" prints out as "^@" on many systems.  I don't see how
> > you got the string "." ... that seems to be an impossible value.
> >
> > If it makes more sense to you, consider changing the if statement from:
> >    if( $wvec =~ tr/^\0// ) {
> > to:
> >    if( vec $wvec, fileno($socket), 1 ) {
> > Or perhaps to:
> >    if( $wvec eq $svec ) {
> >
> > --
> > my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
> > ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]
>
>




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

Date: 14 Oct 2002 20:07:02 -0600
From: Steve Grazzini <s_grazzini@hotmail.com>
Subject: OT: Homework [Was: Re: Using Perl to solve interesting Banking Probm ..]
Message-Id: <3dab7846@news.mhogaming.com>

Tom Beer <tom.beer@btfinancialgroup.spamfilter.com> wrote:
> Andras Malatinszky wrote:
>> KM wrote:
[ snip homework ]
>>
>> Since it's obvious that only the boxes whose numbers are 
>> perfect squares will be left open and the last perfect 
>> square before 500 is 22*22, how about
> 
> Hmm, you've made this into an interesting problem. Are you
> deliberately misleading the OP or do you see something I
> don't? After 5 depositors, it is cetainly not the case that
> only boxes which are perfect squares are open.
> 

If you have five depositors, it holds true for the 
first five bank boxes.

-- 
Steve

perldoc -qa.j | perl -lpe '($_)=m("(.*)")'


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

Date: 14 Oct 2002 16:17:10 -0700
From: misterbray@hotmail.com (Tyger Tyger)
Subject: Re: Perl script works half the time
Message-Id: <5bc996c9.0210141517.3563c80@posting.google.com>

I am having the EXACT same problem on Tripod.  Note: my script has
been running on tripod for several months, and this JUST happened
about a week ago.  The only thing I can determine is that Tripod has
implemented some safe.pm module?  The funny thing is that this
operation mask problem occurs only 50% of the time with the script,
given the exact same execution parameters.  I guess this is what you
get with a free script...

I emailed Tripod tech folks many times, with no response.

Email me if you come up with any solutions?

Peter


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

Date: 14 Oct 2002 17:04:19 -0700
From: misterbray@hotmail.com (Tyger Tyger)
Subject: Re: Perl script works half the time
Message-Id: <5bc996c9.0210141604.48984406@posting.google.com>

I believe I have found a solution for this problem...

Use index() to match the password instead of =~

For example:

if (index($password,$passwordtry) > -1) {...}

For whatever reason, this works on Tripod.

Peter


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

Date: 14 Oct 2002 15:53:29 -0700
From: fcc@mindvision.com (zarethustra)
Subject: Re: Problem configuring perl-5.8.0
Message-Id: <36fb4887.0210141453.1a1aacea@posting.google.com>

"Luke A. Guest" <laguest@nospam.abyss2.demon.co.uk> wrote in message news:<anu4a9$n2$1$830fa7a5@news.demon.co.uk>...
> Hi,
> 
> I'm currently trying to build an LFS system, but keep failing when I try to 
> configure perl-5.8.0. I have seen this problem before, but I canot remember 
> how to fix it. Basically, if I follow the commands for configuring 
> perl-5.8.0 I get a broken makefile:
> 
>         Make[1]: Leaving directory `/usr/src/perl-5.8.0/x2p'
>         Now you must run 'make'.
> 
>         If you compile perl5 on a different machine or from a different object
>         directory, copy the Policy.sh file from this object directory to the
>         new one before you run Configure -- this will help you with most of
>         the policy defaults.
> 
>         makefile:856: *** missing separator.  Stop.
> 
> This is a spurious "0" character at the beginning of the line, just before 
> this stuff:
> 
>         av$(OBJ_EXT): av.c
>         av$(OBJ_EXT): av.h
>         av$(OBJ_EXT): config.h
>         ...
> 
> Now, I just configured it in redhat and it doesn't give me this problem. 
> Now, I'm wondering if I don't have the correct packages installed to get it 
> to work properly. These are the packages that we install for a basic 
> (statically linked) system (before we compile our dynamically linked 
> system):
> 
>         Bash-2.05a
>         Binutils-2.13
>         Bzip2-1.0.2
>         Diffutils-2.8.1
>         Fileutils-4.1
>         Findutils-4.1
>         Gawk-3.1.1
>         GCC-3.2
>         Grep-2.5
>         Gzip-1.2.4a
>         Make-3.79.1
>         Patch-2.5.4
>         Sed-3.02
>         Sh-utils-2.0
>         Tar-1.13
>         Texinfo-4.2
>         Textutils-2.1
>         Util-linux-2.11u
> 
> This is the URL for the book that I'm following: 
> http://www.linuxfromscratch.org/view/cvs/
> 
> Thanks in advance,
> Luke.

7.2.2.5. Perl fails with "*** missing separator. Stop."

It's missing a device file. (AFAIK, /dev/null, but maybe /dev/zero.)
Anyway, either you forgot to run MAKEDEV, or MAKEDEV failed, or you're
using devfs and forgot to mount --bind it under $LFS.


The above is from http://www.linuxfromscratch.org/faq/#AEN483


The fix is, either run the MAKEDEV per instructions or if you or going
to use devfs, do the following:

cd /dev
mknod null c 1 3
chmod 666 null


I had to delete the perl source directory, unpack fresh and start over
before it worked.


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

Date: Tue, 15 Oct 2002 00:49:12 GMT
From: "matt" <dontask@aintgonnatellyou.not>
Subject: problems installing CGI::Lite 2.0
Message-Id: <cCJq9.39326$uF6.86193@rwcrnsc52.ops.asp.att.net>

Hi All,

I am getting an error when I try to install CGI::Lite 2.0. I have never had
this problem before, but I just upgraded to RedHat 8.0 running perl 5.8.0.
This is the error I get when running perl Makefile.PL :

qq^

Welcome to the installation of CGI::Lite 2.0...

WARNING: MAN3PODS takes a hash reference not a string/number.
         Please inform the author.
Checking if your kit is complete...
Looks good
Can't use string (" ") as a HASH ref while "strict refs" in use at
/usr/lib/perl
5/5.8.0/ExtUtils/MM_Unix.pm line 541.

^;

Is this a problem with CGI::Lite or ExtUtils::MM_Unix ? I downloaded and
installed ExtUtils-MakeMaker-6.05, but still the same problem. I'm guessing
it's CGI::Lite. Anyone know where I could get an older version? I realy need
to get my server back up. Any help is appretiated.

-- Matt




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

Date: Mon, 14 Oct 2002 21:02:16 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: problems installing CGI::Lite 2.0
Message-Id: <3DAB6918.92DE630E@earthlink.net>

matt wrote:
> 
> Hi All,
> 
> I am getting an error when I try to install CGI::Lite 2.0. I have
> never had this problem before, but I just upgraded to RedHat 8.0
> running perl 5.8.0.
> This is the error I get when running perl Makefile.PL :
[snip]
> Can't use string (" ") as a HASH ref while "strict refs" in use at
> /usr/lib/perl
> 5/5.8.0/ExtUtils/MM_Unix.pm line 541.
[snip]
> Is this a problem with CGI::Lite or ExtUtils::MM_Unix ?

Yes. :)

Previously, ExtUtils::MM_Unix did not have 'use strict' enabled.  This
meant that if an option was supposed to be a reference (a hash
reference, in this case), but was instead a string (eg, " "), it did not
complain, even though it should have.  Now, with 'use strict' enabled,
it does complain.

The string that's being used as a hashref comes from the Makefile.Pl
from CGI::Lite, specifically the line that says:

                 MAN3PODS  =>   ' ',  

Change this to:

                 MAN3PODS  =>   {},

And the problem should go away.  [untested]

> I downloaded and installed ExtUtils-MakeMaker-6.05, but still the same
> problem. I'm guessing it's CGI::Lite. Anyone know where I could get an
> older version? I realy need to get my server back up. Any help is
> appretiated.

An older version of CGI::Lite will still have the same problem.

You could use an older version of ExtUtils-MakeMaker, but that really
just hides the problem, rather than fixing it.  (Plus, I expect that
installing an older version will take more time than fixing that one
line.)

-- 
my $n = 2; print +(split //, 'e,4c3H r ktulrnsJ2tPaeh'
 ."\n1oa! er")[map $n = ($n * 24 + 30) % 31, (42) x 26]


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

Date: Tue, 15 Oct 2002 01:29:21 GMT
From: matt <not@gonnatell.ya>
Subject: Re: problems installing CGI::Lite 2.0
Message-Id: <RbKq9.41516$Fz.119613@rwcrnsc51.ops.asp.att.net>

Benjamin Goldberg wrote:

> matt wrote:
>> 
>> Hi All,
>> 
>> I am getting an error when I try to install CGI::Lite 2.0. I have
>> never had this problem before, but I just upgraded to RedHat 8.0
>> running perl 5.8.0.
>> This is the error I get when running perl Makefile.PL :
> [snip]
>> Can't use string (" ") as a HASH ref while "strict refs" in use at
>> /usr/lib/perl
>> 5/5.8.0/ExtUtils/MM_Unix.pm line 541.
> [snip]
>> Is this a problem with CGI::Lite or ExtUtils::MM_Unix ?
> 
> Yes. :)
> 
> Previously, ExtUtils::MM_Unix did not have 'use strict' enabled.  This
> meant that if an option was supposed to be a reference (a hash
> reference, in this case), but was instead a string (eg, " "), it did not
> complain, even though it should have.  Now, with 'use strict' enabled,
> it does complain.
> 
> The string that's being used as a hashref comes from the Makefile.Pl
> from CGI::Lite, specifically the line that says:
> 
>                  MAN3PODS  =>   ' ',
> 
> Change this to:
> 
>                  MAN3PODS  =>   {},
> 
> And the problem should go away.  [untested]
> 
>> I downloaded and installed ExtUtils-MakeMaker-6.05, but still the same
>> problem. I'm guessing it's CGI::Lite. Anyone know where I could get an
>> older version? I realy need to get my server back up. Any help is
>> appretiated.
> 
> An older version of CGI::Lite will still have the same problem.
> 
> You could use an older version of ExtUtils-MakeMaker, but that really
> just hides the problem, rather than fixing it.  (Plus, I expect that
> installing an older version will take more time than fixing that one
> line.)
> 

That did the trick. Thanks Benjamin.

-- Matt



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

Date: Tue, 15 Oct 2002 02:31:46 GMT
From: "Nemo Oudeheis" <nikogo@nigde.net>
Subject: Re: Read a single character from STDIN (W98)
Message-Id: <m6Lq9.6396$1P1.485370@bgtnsc05-news.ops.worldnet.att.net>

Grazie mille.

The problem is, perldoc lists four suggestions: to use the *nix stty command
(not available on W98); the Posix interface suggestion (ditto); to use the
W32 Perl ioctl function (doesn't work, returns -1); and to download the CPAN
ReadKey module.

I have spent several hours trying to get the CPAN module to build, without
success.  Apparently the strategy is to bypass the non-functioning ioctl
with a C language module.  I am pretty confident about building C/C++
modules, but there are obvious nuances about the installation that continue
to elude me.  Anyone else succeed with this one?

And all to snarf a little character.

~N
=========================


Harald H.-J. Bongartz <bongie@gmx.net> wrote in message
news:1120500.VdRynOXAR1@nyoga.dubu.de...
> Nemo Oudeheis wrote:
> > I am using ActivePerl on a Win98 system.  I would like to read a
> > single character from STDIN to get the reply from a (Y/N) question,
> > without having to terminate the line with by hitting <ENTER>, as is
> > the default with getc and read.
>
> This is a FAQ.
> See perldoc -q "single character".
>
> Ciao,
>         Harald
> --
> Harald H.-J. Bongartz <bongie@gmx.net>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> If one synchronized swimmer drowns, do the rest have to drown too?






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

Date: Mon, 14 Oct 2002 17:04:32 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Regular Expression Hell (RealServer Log)
Message-Id: <slrnaqmfrg.1vv.tadmc@magna.augustmail.com>

Joe Follansbee <jfollansbee@speakeasy.net> wrote:

> I'm tearing me hair out to
> build a regex that will match the "client info" entry. The regex has
> to be able to find these two typical entries:
> 
> [Mozilla/4.0 (compatible;MSIE 5.01;Windows NT 5.0;AT&T CSM6.0)]
> [WinNT_5.0_6.0.10.505_play32_RN9GPD_en-US_686_axembed]
> 
> Please help!


Help us help you.


the regexes below will _all_ match those two examples:  

   m/./
   m/^.[A-Z]/
   m/\d+\.\d+/
   m/Win/

That is the direct answer to the question that you asked.

But let's continue, because the you probably meant to ask
some other question...


What is it that distinguishes the "good" lines from the "bad" lines?

I'll guess: match when the line starts and ends with square brackets:


   m/^ [[]  [^]]+ ] $/x


or with comments:

   m/^       # start of string
     [[]     # opening sq bracket
     [^]]+   # any chars that are not closing sq brackets
     ]       # closing sq bracket
     $       # end of the string
    /x;


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 14 Oct 2002 17:28:48 -0700
From: willee1@hotmail.com (Will Lee)
Subject: Regular scheduled download of specific URL? - take 2
Message-Id: <25e033d6.0210141628.42ff8491@posting.google.com>

Hi.  I was wondering how to code a Perl script that I would schedule
at regular intervals (using something like the scheduler built into
Windows ME) to take a copy of a webcam feed and then store that copy
onto the PC?  The script should also rename the file as necessary to
avoid overwriting the previous saves.

I was thinking about looking for an app to do this task, but since I
dabbled
a little in Perl a while back I thought I might as well try it for
myself first and save myself some money.  Those who know how to do
this already could you offer a guide as to how this might be done?

Thanks in anticipation of some more useful advice ;0)


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

Date: Tue, 15 Oct 2002 00:53:17 GMT
From: Andras Malatinszky <nobody@dev.null>
Subject: Re: Regular scheduled download of specific URL? - take 2
Message-Id: <3DAB6746.4060803@dev.null>



Will Lee wrote:

> Hi.  I was wondering how to code a Perl script that I would schedule
> at regular intervals (using something like the scheduler built into
> Windows ME) to take a copy of a webcam feed and then store that copy
> onto the PC?  The script should also rename the file as necessary to
> avoid overwriting the previous saves.
> 
> I was thinking about looking for an app to do this task, but since I
> dabbled
> a little in Perl a while back I thought I might as well try it for
> myself first and save myself some money.  Those who know how to do
> this already could you offer a guide as to how this might be done?
> 
> Thanks in anticipation of some more useful advice ;0)
> 

As you yourself have noted, the "regular scheduled" part of your task is 
probably best handled by your OS, not Perl.

As for the "download" part, take a look at the LWP module, which is part 
of most standard distributions and also available from CPAN. LWP's 
getstore method does just what you want: grabs a file from the web and 
saves it locally under a name you specify. If you want unique names it 
seems logical to use the time function in generating the file name.


I hope that helps.



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

Date: Tue, 15 Oct 2002 01:05:36 GMT
From: pkent <pkent77tea@yahoo.com.tea>
Subject: Re: Split of very large text file
Message-Id: <pkent77tea-487F94.02053515102002@news-text.blueyonder.co.uk>

In article <66d1df6a.0210132009.61370e3c@posting.google.com>,
 ranam@ue.com.au (Ravi) wrote:

> I have a very large file (between 70-110 Mb of Ascii) composed of one
 ....
> There is a message header though, (XYZ2000), at the start of each
> message that gets appended.  What I would like is to be able to split

if the message header is a fixed string, then perl can do this for you, 
no problems. See code at bottom of message.

P

<<<CODE>>>
#!/usr/bin/perl -w
use strict;

$/ = 'XYZ2000';
while(<DATA>) {
   chomp;
   print "We got: <$_>\n";
}

__DATA__
XYZ2000record1asdfasdfasdfXYZ2000record2kjfdhkljhkljhlkjhlkjhlkdfjghdflkj
hlkjhXYZ2000record3737373737373737XYZ2000record4mnfieuhn
kjgh iguh gih rguh uo iuh      XYZ2000 record5    *&^(*&^(*&^(*&^(*&^


__END__


Results:

dev~/src > perl ./yy.pl
We got: <>
We got: <record1asdfasdfasdf>
We got: <record2kjfdhkljhkljhlkjhlkjhlkdfjghdflkjhlkjh>
We got: <record3737373737373737>
We got: <record4mnfieuhn
kjgh iguh gih rguh uo iuh      >
We got: < record5    *&^(*&^(*&^(*&^(*&^
>

-- 
pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
Remove the tea to reply


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

Date: Tue, 15 Oct 2002 09:30:02 +1000
From: Derek Thomson <derek@wedgetail.com>
Subject: Re: Switching from Python to Perl
Message-Id: <3dab53be$0$30313$afc38c87@news.optusnet.com.au>

Benjamin Goldberg wrote:
> Derek Thomson wrote:
> [snip]
> 
>>So, Java. Perl really can't win here, as Python has the amazing
>>Jython.
> 
> 
> How does Jython compare to JPL, "Java Perl Lingo"?
> 

Not very well, I'm afraid.

JPL involves linking the Perl interpreter (libperl.so) with the Java VM, 
so that Perl code may be called (via JNI) from Java. To achieve this, 
the Java code is preprocessed to spit out the various Java and Perl glue 
code required. So basically, it's a bit of a hack.

It doesn't work on all platforms, is still considered experimental after 
4 years, and not much progress appears to have been made recently.

I've never actually got it to build successfully, so perhaps someone 
with more experience can comment.

The Inline::Java module is much better, IMHO, as it doesn't require 
linking with the JVM - it just treats the JVM as a server process for 
executing Java code. It's quite nice, but not quite the tight 
integration that is Jython, and presumably it's very slow.

Take a look at the jpl/README file in the Perl source distribution for 
details.

--
D.



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

Date: Tue, 15 Oct 2002 02:43:22 GMT
From: Derek Thomson <derek@wedgetail.com>
Subject: Re: Switching from Python to Perl
Message-Id: <ehLq9.411$i84.46234@news.optus.net.au>

Derek Thomson wrote:
> Benjamin Goldberg wrote:
> 
>> Derek Thomson wrote:
>> [snip]
>>
>>> So, Java. Perl really can't win here, as Python has the amazing
>>> Jython.
>>
>>
>>
>> How does Jython compare to JPL, "Java Perl Lingo"?
>>
> 
> Not very well, I'm afraid.

To clarify, JPL doesn't compare very well with Jython.

D'oh!

--
D.



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

Date: Mon, 14 Oct 2002 20:44:55 -0600
From: Ron Reidy <rereidy@indra.com>
Subject: To POE or not to POE (use Threads?)
Message-Id: <3DAB8127.71476E3@indra.com>

Hi All,

I have a problem.  I need to re-engineer a batch process that was not
written for performance.  I have several tasks that I need to run for a
group of tables in an Oracle instance.  The tasks for each table (~80 of
them) include:

1.  Truncating tables in the destination instance
2.  Saving index information.
3.  Bulk load the tables.
4.  Reconstruct the indexes.

I need all of the above tasks to execute as a "group", and as they
finish, I will need to know what the status of each "group" was.

I want to use a threaded type of application.  I am thinking POE or
threads would do what I want.  Can anyone tell me if threads in 5.8.0 is
stable and production ready, or would POE be the better choice..

My environment is:
Solaris 8 (64 bit)
Perl 5.8.0

Thanks for your time and feedback.
-- 
Ron Reidy
Oracle DBA


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

Date: Tue, 15 Oct 2002 10:24:03 +1000
From: "Tom Beer" <tom.beer@btfinancialgroup.spamfilter.com>
Subject: Re: Using Perl to solve interesting Banking Probm ..
Message-Id: <aofn74$592$1@merki.connect.com.au>

Andras Malatinszky wrote in message <3DAB006B.1050603@dev.null>...
>KM wrote:
>
>> The Saftey-Dep boxes ..
>> -----------------------------
>>  There has been a run at the local savings and loan.  500 depositors
>> have lined up in a very long vault with 500 _CLSD_ safety deposit boxes.
>> One by one the depositors run through the vault.  The 1st depositor
>> opens every box.  The 2nd depositor goes to every 2nd box and closes
>> it.   The 3rd depositor goes to every 3rd box and changes it (if open,
>> closes it; if closed, open it).  In a similiar manner, every 4th, 5th,
>> 6th
>>   ... depositor changes every 4th, 5th, 6h, ... box.  After all 500
>> depositors have passed through the vault, WHICH boxes are left OPEN?
>>
>>
>
>Since it's obvious that only the boxes whose numbers are perfect squares
>will be left open and the last perfect square before 500 is 22*22, how
about
>

Hmm, you've made this into an interesting problem. Are you deliberately
misleading the OP or do you see something I don't? After 5 depositors, it is
cetainly not the case that only boxes which are perfect squares are open.

Tom.

     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17
d=1  O  O  O  O  O  O  O  O  O  O  O  O  O  O  O  O  O
d=2  O  C  O  C  O  C  O  C  O  C  O  C  O  C  O  C  O
d=3  O  C  C  C  O  O  O  C  C  C  O  O  O  C  C  C  O
d=4  O  C  C  O  O  O  O  O  C  C  O  C  O  C  C  O  O
d=5  O  C  C  O  C  O  O  O  C  0  O  C  O  C  C  O  O

Tom.





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

Date: Tue, 15 Oct 2002 01:17:55 GMT
From: Andras Malatinszky <nobody@dev.null>
Subject: Re: Using Perl to solve interesting Banking Probm ..
Message-Id: <3DAB6D0B.8000701@dev.null>



Tom Beer wrote:

> Andras Malatinszky wrote in message <3DAB006B.1050603@dev.null>...
> 
>>KM wrote:
>>
>>
>>>The Saftey-Dep boxes ..
>>>-----------------------------
>>> There has been a run at the local savings and loan.  500 depositors
>>>have lined up in a very long vault with 500 _CLSD_ safety deposit boxes.
>>>One by one the depositors run through the vault.  The 1st depositor
>>>opens every box.  The 2nd depositor goes to every 2nd box and closes
>>>it.   The 3rd depositor goes to every 3rd box and changes it (if open,
>>>closes it; if closed, open it).  In a similiar manner, every 4th, 5th,
>>>6th
>>>  ... depositor changes every 4th, 5th, 6h, ... box.  After all 500
>>>depositors have passed through the vault, WHICH boxes are left OPEN?
>>>
>>>
>>>
>>Since it's obvious that only the boxes whose numbers are perfect squares
>>will be left open and the last perfect square before 500 is 22*22, how
>>
> about
> 
> 
> Hmm, you've made this into an interesting problem. Are you deliberately
> misleading the OP or do you see something I don't? 


I am not deliberately misleading the OP.

>After 5 depositors, it is
> cetainly not the case that only boxes which are perfect squares are open.


Alas, at that point you have 495 more depositors to mess things up...

Ask yourself -- and answer -- these questions:

1) Let d(n) be the number of times someone tampers with (i.e., opens or 
closes) box #n. What does d(n) have to do with the divisors of n?

2) For what kind of d(n) will the box be open at the end of this weird 
exercise?

3) True or false: a positive whole number has an odd number of positive 
divisors if and only if it is a perfect square? Why?





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

Date: Tue, 15 Oct 2002 11:44:55 +1000
From: "Tom Beer" <tom.beer@btfinancialgroup.spamfilter.com>
Subject: Re: Using Perl to solve interesting Banking Probm ..
Message-Id: <aofruo$9lp$1@merki.connect.com.au>

>Andras Malatinszky wrote in message <3DAB006B.1050603@dev.null>...
>>
>>Since it's obvious that only the boxes whose numbers are perfect squares
>>will be left open and the last perfect square before 500 is 22*22, how
>about
>>

Ok, worked it out now. You are right (of course). My problem was that I was
assuming that there might be more safety deposit boxes than depositors.

Tom.





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

Date: Mon, 14 Oct 2002 14:10:17 -0400
From: a246456@fmr.com
Subject: Win32::NetAdmin
Message-Id: <3DAB0889.A72FB22C@fmr.com>

Hi ,

  I wrote a script which process a text file which contains list of
servers, and checks whether the user account exist on the remote server.
I am getting incorrect information like User does`nt exist on machine.

I am not able to find what is the problem? Could you pls help me...

use Win32::NetAdmin;
use Win32::AdminMisc;

$file="hosts.txt";
$User="Administrator";

open(HOST, "$file") || die " $file does`nt exist. $!\n";
$Machine=<HOST>;
while($Machine ne "")
{

    if( ! Win32::NetAdmin::UsersExist($Machine, $User))
    {
      print "$User does`nt exist on $Machine";
    }
    else
    {
      print "$User exist on $Machine";
    }
  $Machine=<HOST>;
}

Thanks,
Paul



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

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 3971
***************************************


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