[26040] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 8248 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 13 21:05:29 2005

Date: Wed, 13 Jul 2005 18:05:06 -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           Wed, 13 Jul 2005     Volume: 10 Number: 8248

Today's topics:
        *{$AUTOLOAD} vs *$AUTOLOAD <jkrugman345@yahbitoo.com>
    Re: AS Perl: rep gives 500 server closed? <sisyphus1@nomail.afraid.org>
    Re: Earthquake Forecasting Program  July 11, 2005 <edgrsprj@ix.netcom.com>
    Re: Earthquake Forecasting Program  July 11, 2005 <horedson@earthlink.net>
    Re: member callback function <nobull@mail.com>
    Re: NET::LDAP filter problem. <jgibson@mail.arc.nasa.gov>
        PAR 0.89 + Socket + ASP 5.8.7 = PL_memory_wrap <john@castleamber.com>
    Re: PAR 0.89 + Socket + ASP 5.8.7 = PL_memory_wrap <1usa@llenroc.ude.invalid>
        Read stdout into perl <sean@buildingonline.com>
    Re: Read stdout into perl <1usa@llenroc.ude.invalid>
    Re: Read stdout into perl <sherm@dot-app.org>
    Re: Read stdout into perl <sean@buildingonline.com>
    Re: Read stdout into perl <1usa@llenroc.ude.invalid>
    Re: Read stdout into perl <someone@example.com>
    Re: Read stdout into perl <1usa@llenroc.ude.invalid>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 13 Jul 2005 22:40:03 +0000 (UTC)
From: J Krugman <jkrugman345@yahbitoo.com>
Subject: *{$AUTOLOAD} vs *$AUTOLOAD
Message-Id: <db4583$gbe$1@reader2.panix.com>




I frequently see statements like

  *{$AUTOLOAD} = \&foobar;  # under no strict 'refs'

but I don't understand the need for curly brackets in the LHS
expression.  Why not simply

  *$AUTOLOAD = \&foobar;

?

TIA!

jill


-- 
To  s&e^n]d  me  m~a}i]l  r%e*m?o\v[e  bit from my a|d)d:r{e:s]s.



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

Date: Thu, 14 Jul 2005 08:46:35 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: AS Perl: rep gives 500 server closed?
Message-Id: <42d599f0$0$2157$afc38c87@news.optusnet.com.au>


"John Bokma" <john@castleamber.com>

> I guess AS is having problems

Yep - that's it :-)

Cheers,
Rob




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

Date: Wed, 13 Jul 2005 20:26:38 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Earthquake Forecasting Program  July 11, 2005
Message-Id: <2OeBe.2928$oZ.770@newsread2.news.atl.earthlink.net>

"Hank Oredson" <horedson@earthlink.net> wrote in message
news:1vYAe.2575$dU3.2553@newsread2.news.pas.earthlink.net...
> "edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
> news:pmXAe.9096$aY6.3897@newsread1.news.atl.earthlink.net...
> > "Hank Oredson" <horedson@earthlink.net> wrote in message
> > news:7%UAe.4148$BK1.174@newsread3.news.pas.earthlink.net...
> >> "edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
> >> news:upBAe.1915$oZ.930@newsread2.news.atl.earthlink.net...
> >> > "edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
> >> > news:D7qAe.21003$eM6.9503@newsread3.news.atl.earthlink.net...
> >> >> PROPOSED EARTHQUAKE FORECASTING
> >> >> COMPUTER PROGRAM DEVELOPMENT EFFORT

> I guess my question was not specific enough.
> What I wanted was the exact sources, so I could access the data.
> The exact data sets you used.

July 13, 2005

Thanks again for the comments and interest.

       The original report in this thread should have contained pointers to
all of the information you are requesting.  But once again, here are some of
the important URLs.

http://www.freewebz.com/eq-forecasting/301.html

       That Web page contains information regarding the details of how the
forecasting program works.  Also stored there are copies of an early
Zipped .txt version of the Perl program I am using along with Zip file
versions of earlier versions of the .txt format database files that I am
using.  I had to Zip them because of their size and the limited bandwidth of
that Web site.  If you would prefer to receive them as regular text files
then you can try contacting me by e-mail and I will try to send them along.

       Perl users who downloaded and ran that .pl program some time ago said
that they had no trouble getting it to run on a Window's XP system.  Other
operating system users might encounter a few formatting problems etc.

http://www.freewebz.com/eq-forecasting/90-05.html
http://www.freewebz.com/eq-forecasting/128.html

       Those Web pages discuss the theories involved with this forecasting
method.  Some of the most important information is at the end of that
128.html Web page.

http://www.freewebz.com/eq-forecasting/Data.html

       That Web page contains several types of forecast data along with some
information regarding how to interpret them.

http://www.freewebz.com/eq-forecasting/151.html

       That Web page contains some "Help" information with details regarding
things such as the U.S. Navy's MICA computer program which I use to generate
data for things such as the locations of the Earth, sun, and moon relative
to the J2000 reference system.

       You should not expect to be able to instantly absorb all of that
information though it sounds like understanding it should not be a problem
for you.  I have been working on the project for about 15 years.  And
unfortunately, every improvement seems to take days, weeks, months, ...

       Additionally, as I said in my first report in this thread, the
multiple participants part of the project is not yet operational.  For one
thing, a suitable Web site has to be found.  Right now I am simply
trying to determine what the interest level there might be in such a
project.  And positive feedback that I have been getting by e-mail etc.
has been encouraging.





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

Date: Wed, 13 Jul 2005 23:39:46 GMT
From: "Hank Oredson" <horedson@earthlink.net>
Subject: Re: Earthquake Forecasting Program  July 11, 2005
Message-Id: <6DhBe.3077$dU3.691@newsread2.news.pas.earthlink.net>

"edgrsprj" <edgrsprj@ix.netcom.com> wrote in message 
news:2OeBe.2928$oZ.770@newsread2.news.atl.earthlink.net...
> "Hank Oredson" <horedson@earthlink.net> wrote in message
> news:1vYAe.2575$dU3.2553@newsread2.news.pas.earthlink.net...
>> "edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
>> news:pmXAe.9096$aY6.3897@newsread1.news.atl.earthlink.net...
>> > "Hank Oredson" <horedson@earthlink.net> wrote in message
>> > news:7%UAe.4148$BK1.174@newsread3.news.pas.earthlink.net...
>> >> "edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
>> >> news:upBAe.1915$oZ.930@newsread2.news.atl.earthlink.net...
>> >> > "edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
>> >> > news:D7qAe.21003$eM6.9503@newsread3.news.atl.earthlink.net...
>> >> >> PROPOSED EARTHQUAKE FORECASTING
>> >> >> COMPUTER PROGRAM DEVELOPMENT EFFORT
>
>> I guess my question was not specific enough.
>> What I wanted was the exact sources, so I could access the data.
>> The exact data sets you used.
>
> July 13, 2005
>
> Thanks again for the comments and interest.
>
>       The original report in this thread should have contained pointers to
> all of the information you are requesting.  But once again, here are some 
> of
> the important URLs.
>
> http://www.freewebz.com/eq-forecasting/301.html
>
>       That Web page contains information regarding the details of how the
> forecasting program works.  Also stored there are copies of an early
> Zipped .txt version of the Perl program I am using along with Zip file
> versions of earlier versions of the .txt format database files that I am
> using.  I had to Zip them because of their size and the limited bandwidth 
> of
> that Web site.  If you would prefer to receive them as regular text files
> then you can try contacting me by e-mail and I will try to send them 
> along.
>
>       Perl users who downloaded and ran that .pl program some time ago 
> said
> that they had no trouble getting it to run on a Window's XP system.  Other
> operating system users might encounter a few formatting problems etc.
>
> http://www.freewebz.com/eq-forecasting/90-05.html
> http://www.freewebz.com/eq-forecasting/128.html
>
>       Those Web pages discuss the theories involved with this forecasting
> method.  Some of the most important information is at the end of that
> 128.html Web page.

I found no equations there, nor any links to the original data sources.

> http://www.freewebz.com/eq-forecasting/Data.html
>
>       That Web page contains several types of forecast data along with 
> some
> information regarding how to interpret them.

Did not find any information on the source of the data.

> http://www.freewebz.com/eq-forecasting/151.html
>
>       That Web page contains some "Help" information with details 
> regarding
> things such as the U.S. Navy's MICA computer program which I use to 
> generate
> data for things such as the locations of the Earth, sun, and moon relative
> to the J2000 reference system.
>
>       You should not expect to be able to instantly absorb all of that
> information though it sounds like understanding it should not be a problem
> for you.  I have been working on the project for about 15 years.  And
> unfortunately, every improvement seems to take days, weeks, months, ...

Everything looked fairly obvious, except that there did not seem
to be any reference to the source of the datasets.

>       Additionally, as I said in my first report in this thread, the
> multiple participants part of the project is not yet operational.  For one
> thing, a suitable Web site has to be found.  Right now I am simply
> trying to determine what the interest level there might be in such a
> project.  And positive feedback that I have been getting by e-mail etc.
> has been encouraging.

Perhaps I was not clear enough in my previous posts.

I am looking for the SOURCE of the data, that is, where did
YOU get the data from, so that I may obtain my own datasets.

In particular I am interested in the EM dataset.

-- 

  ... Hank

http://home.earthlink.net/~horedson
http://home.earthlink.net/~w0rli




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

Date: Wed, 13 Jul 2005 20:07:19 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: member callback function
Message-Id: <db3op7$3rk$2@slavica.ukpost.com>

Shea Martin wrote:

> How to I pass a member function as a callback.

> I also tried a number of other things.

But, oddly, not the FAQ...

perldoc -q method


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

Date: Wed, 13 Jul 2005 11:53:23 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: NET::LDAP filter problem.
Message-Id: <130720051153235353%jgibson@mail.arc.nasa.gov>

In article <db3krh$4mn$1@news.newsland.it>, als <alsandrea@hotmail.it>
wrote:

> hi, I have a strange problem with the NET::LDAP search filter.
> 
> 
> This script works fine:
> 
> sub go {
> ....
> my $smesg = $ldap->search(
> base => 'dc=XXX,dc=XXX',
> scope => 'sub',
> filter => 'uid=USERNAME' , <------ it's a constant ('uid=pippo')
> attrs => [ 'mail' ] );
> 
> ....
> }
> 
> but not this:
> 
> sub go {
> ...
> 
> my ($var) = @_; <--- contains the same user value but read from a text file
> my $smesg = $ldap->search(
> base => 'dc=XXX,dc=XXX',
> scope => 'sub',
> filter => "uid=$var", 
> attrs => [ 'mail' ] );
> 
> ....
> }
> 
> Does anybody knows the problem, bug? Any suggestions?
> Thanks.

It would help if we could see the entire program. By any chance, did
you fail to remove the newline from the end of the value read from the
file? Try printing out the $var variable to see if it contains what you
think it does.

See perldoc -f chomp


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---


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

Date: 13 Jul 2005 19:41:03 GMT
From: John Bokma <john@castleamber.com>
Subject: PAR 0.89 + Socket + ASP 5.8.7 = PL_memory_wrap
Message-Id: <Xns9692953978F13castleamber@130.133.1.4>

A script consisting of just:

use Socket 1.3;

gives the PL_memory_wrap .... perl58.dll message

C:\Documents and Settings\John\Mis documentos\Amber\Customers\Michael 
Lovelady\DRv1>hello.exe
Can't load 'C:\DOCUME~1\John\CONFIG~1\Temp\par-John\cache-1121283538
\6b24f9a6.dll' for module Socket: load_file:No se encontr¾ el proceso es
pecificado at C:/aperl58/lib/DynaLoader.pm line 230.
 at ../blib/lib/PAR/Heavy.pm line 107
Compilation failed in require at script/hello.pl line 1.
BEGIN failed--compilation aborted at script/hello.pl line 1.

-- 
John                   Small Perl scripts: http://johnbokma.com/perl/
               Perl programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html
                        


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

Date: Wed, 13 Jul 2005 20:45:37 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: PAR 0.89 + Socket + ASP 5.8.7 = PL_memory_wrap
Message-Id: <Xns9692AA7ECA805asu1cornelledu@127.0.0.1>

John Bokma <john@castleamber.com> wrote in
news:Xns9692953978F13castleamber@130.133.1.4: 

> A script consisting of just:
> 
> use Socket 1.3;
> 
> gives the PL_memory_wrap .... perl58.dll message
> 
> C:\Documents and Settings\John\Mis documentos\Amber\Customers\Michael 
> Lovelady\DRv1>hello.exe
> Can't load 'C:\DOCUME~1\John\CONFIG~1\Temp\par-John\cache-1121283538
> \6b24f9a6.dll' for module Socket: load_file:No se encontr¾ el proceso
> es pecificado at C:/aperl58/lib/DynaLoader.pm line 230.
>  at ../blib/lib/PAR/Heavy.pm line 107
> Compilation failed in require at script/hello.pl line 1.
> BEGIN failed--compilation aborted at script/hello.pl line 1.

Well, I had been intending to install PAR anyway, so this provided the
impetus. There seems to be a problem with ActiveState's servers, so I
had to self-compile PAR, Parse-Binary, and Win32-Exe. 

Now, I am using the free command line compiler from Microsoft, which
probably does not match the AS compiler used to compile Perl. I am not
able to replicate the problem. Here is the info: 

C:\DOCUME~1\asu1\LOCALS~1\Temp> cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for
80x86 

C:\DOCUME~1\asu1\LOCALS~1\Temp> pp -V
Perl Packager, version 0.12 (PAR version 0.89)

C:\DOCUME~1\asu1\LOCALS~1\Temp> cat t.pl
use Socket 1.3;

C:\DOCUME~1\asu1\LOCALS~1\Temp> cat t.pl
use Socket 1.3;

C:\DOCUME~1\asu1\LOCALS~1\Temp> pp -o t.exe t.pl

C:\DOCUME~1\asu1\LOCALS~1\Temp> t

C:\DOCUME~1\asu1\LOCALS~1\Temp>

Sorry, can't be of more help right now, but let me know if there are
specific things you'd like me to try. 

BTW, excuse my ignorance, but what is PL_memory_wrap? You do not mention 
it again in the body of your message.

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

Date: Wed, 13 Jul 2005 17:34:47 -0700
From: "Sean Berry" <sean@buildingonline.com>
Subject: Read stdout into perl
Message-Id: <MqiBe.33011$ro.13029@fed1read02>

I have the following...

open (DATA, "|/usr/bin/gunzip -c $filename");
while(<DATA>) {
    ...
}

But this does not work.

How do I read stdout into PERL?

Thanks 




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

Date: Thu, 14 Jul 2005 00:42:55 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Read stdout into perl
Message-Id: <Xns9692D2B819AA6asu1cornelledu@127.0.0.1>

"Sean Berry" <sean@buildingonline.com> wrote in news:MqiBe.33011
$ro.13029@fed1read02:

> I have the following...
> 
> open (DATA, "|/usr/bin/gunzip -c $filename");

1. DATA is a special filehandle in Perl. You might want to leave it 
alone.

2. You should always, yes *always* check the return value of open.

3. You need to read the posting guidelines for this group. The 
likelihood of getting a useful response increases exponentially if you 
follow the few simple suggestions outlined there.


> while(<DATA>) {
>     ...
> }
> 
> But this does not work.

You should also consult

<URL:http://www.catb.org/~esr/faqs/smart-questions.html>

> How do I read stdout into PERL?

You are expected to consult the FAQ before posting.

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

Date: Wed, 13 Jul 2005 20:43:31 -0400
From: Sherm Pendley <sherm@dot-app.org>
Subject: Re: Read stdout into perl
Message-Id: <m23bqirzd8.fsf@Sherm-Pendleys-Computer.local>

"Sean Berry" <sean@buildingonline.com> writes:

> I have the following...
>
> open (DATA, "|/usr/bin/gunzip -c $filename");

Always, yes *always* check the return value of open():

open(DATA, "/usr/bin/gunzip -c $filename |") or
    die "Could not open /usr/bin/gunzip -c $filename: $!";

> But this does not work.
>
> How do I read stdout into PERL?

By opening the child process for reading instead of writing - pay
attention to where the "|" goes.

Have a look at "perldoc perlopentut" for a good tutorial on using
open().

sherm--

PS: The language is Perl, not PERL.

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Wed, 13 Jul 2005 17:45:50 -0700
From: "Sean Berry" <sean@buildingonline.com>
Subject: Re: Read stdout into perl
Message-Id: <aBiBe.33012$ro.87@fed1read02>

>I have the following...
>
> open (DATA, "|/usr/bin/gunzip -c $filename");
> while(<DATA>) {
>    ...
> }
>
> But this does not work.
>
> How do I read stdout into PERL?
>

Sorry, looked for the answer for 20 minutes,
posted this, then found the answer 1 minute later.

open(DATA, "/usr/bin/gunzip -c $filename |");





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

Date: Thu, 14 Jul 2005 00:51:59 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Read stdout into perl
Message-Id: <Xns9692D441A9C70asu1cornelledu@127.0.0.1>

"Sean Berry" <sean@buildingonline.com> wrote in news:aBiBe.33012$ro.87
@fed1read02:

>>I have the following...
>>
>> open (DATA, "|/usr/bin/gunzip -c $filename");
>> while(<DATA>) {
>>    ...
>> }
>>
>> But this does not work.
>>
>> How do I read stdout into PERL?
>>
> 
> Sorry, looked for the answer for 20 minutes,
> posted this, then found the answer 1 minute later.
> 
> open(DATA, "/usr/bin/gunzip -c $filename |");

What can I say?

*PLONK*

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

Date: Thu, 14 Jul 2005 00:55:29 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Read stdout into perl
Message-Id: <5KiBe.123692$9A2.10908@edtnps89>

Sean Berry wrote:
> I have the following...
> 
> open (DATA, "|/usr/bin/gunzip -c $filename");
> while(<DATA>) {
>     ...
> }
> 
> But this does not work.
> 
> How do I read stdout into PERL?

The same way you would do it on the command line:

open DATA, "/usr/bin/gunzip -c $filename |";



John
-- 
use Perl;
program
fulfillment


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

Date: Thu, 14 Jul 2005 01:03:02 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Read stdout into perl
Message-Id: <Xns9692D620CB3BEasu1cornelledu@127.0.0.1>

"John W. Krahn" <someone@example.com> wrote in news:5KiBe.123692$9A2.10908
@edtnps89:

> open DATA, "/usr/bin/gunzip -c $filename |";

Are you sure it is a good idea to re-enforce the OP's bad habits.

Now, granted, most likely, nothing to bad will happen by using DATA to 
mean something other than what everyone else expects it to mean. And, most 
likely, the $filename exists, gunzip is where the OP expects it so on and 
so forth, but why not do:

open my $data, '-|', "/usr/bin/gunzip -c $filename"
   or die "Failed to open pipe /usr/bin/gunzip -c $filename: $!";

while(<$data>) {
 # ...
}

Sinan

-- 
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html


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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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


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