[24222] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6414 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 19 14:21:41 2004

Date: Mon, 19 Apr 2004 11:20:53 -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, 19 Apr 2004     Volume: 10 Number: 6414

Today's topics:
        CVS access via PERL <holgerbiebinger@gmx.de>
    Re: CVS access via PERL <ittyspam@yahoo.com>
    Re: CVS access via PERL <holgerbiebinger@gmx.de>
    Re: CVS access via PERL <ittyspam@yahoo.com>
    Re: Design choice: subclassing or "supplementing" <dwall@fastmail.fm>
        Does $^T still work ? <nick_weavers@uk.ibm.com>
    Re: Does $^T still work ? <glex_nospam@qwest.invalid>
    Re: Does $^T still work ? (David Efflandt)
    Re: Drawing graphs <1usa@llenroc.ude>
    Re: Drawing graphs <glex_nospam@qwest.invalid>
    Re: Drawing graphs <mgjv@tradingpost.com.au>
    Re: Earthquake and tornado data evaluation Perl program <edgrsprj@ix.netcom.com>
    Re: Earthquake and tornado data evaluation Perl program <spamtrap@dot-app.org>
    Re: Earthquake and tornado data evaluation Perl program <edgrsprj@ix.netcom.com>
    Re: Earthquake and tornado data evaluation Perl program <spamtrap@dot-app.org>
    Re: Earthquake and tornado data evaluation Perl program <edgrsprj@ix.netcom.com>
    Re: Earthquake and tornado data evaluation Perl program (Anno Siegel)
    Re: Earthquake and tornado data evaluation Perl program <spamtrap@dot-app.org>
    Re: Earthquake and tornado data evaluation Perl program <edgrsprj@ix.netcom.com>
    Re: Earthquake and tornado data evaluation Perl program <bik.mido@tiscalinet.it>
        Emacs modules for Perl programming (Jari Aalto+mail.perl)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 19 Apr 2004 18:09:00 +0200
From: Holger Biebinger <holgerbiebinger@gmx.de>
Subject: CVS access via PERL
Message-Id: <c60tg6$5ov73$1@ID-225521.news.uni-berlin.de>

Hi NG,
I would like to access a CVS Server which provides pserverv access. I 
tried to access via
cvs [Directory here] login
After that i get a login prompt. Can I enter my password with PERL? I am 
a beginner in using the PERL language.
I would appreciate any help.

Holger



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

Date: Mon, 19 Apr 2004 12:58:14 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: CVS access via PERL
Message-Id: <20040419125536.D21613@dishwasher.cs.rpi.edu>

On Mon, 19 Apr 2004, Holger Biebinger wrote:

> Hi NG,
> I would like to access a CVS Server which provides pserverv access. I
> tried to access via
> cvs [Directory here] login
> After that i get a login prompt. Can I enter my password with PERL? I am
> a beginner in using the PERL language.
> I would appreciate any help.
>

The first help you'll get is a bunch of people telling you the language's
name is "Perl" not "PERL".  Please follow that advice.

The second piece of advice I'll give is that you may want to check out the
CVS module at http://search.cpan.org/~rsoliv/Cvs-0.06/lib/Cvs.pm

The third piece of advice is that you should read the Posting Guidelines
which are posted regularly to the group.  Specifically in this case,
please pay attention to the bit that tells you to "Speak Perl, not
English".  That is, what do you mean when you said "I tried to access via
cvs [Directory here] login".  Did you execute a system command?  Are you
redirecting your Perl script to or from the CVS command?  Show us what
you're doing.

Paul Lalli


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

Date: Mon, 19 Apr 2004 19:33:21 +0200
From: Holger Biebinger <holgerbiebinger@gmx.de>
Subject: Re: CVS access via PERL
Message-Id: <c612eb$6mjj7$1@ID-225521.news.uni-berlin.de>

Hi,

Paul Lalli wrote:

> On Mon, 19 Apr 2004, Holger Biebinger wrote:
> 
>>I would like to access a CVS Server which provides pserverv access. I
>>tried to access via
>>cvs [Directory here] login
>>After that i get a login prompt. Can I enter my password with PERL? I am
>>a beginner in using the PERL language.
>>I would appreciate any help.
>>
> 
> The first help you'll get is a bunch of people telling you the language's
> name is "Perl" not "PERL".  Please follow that advice.
> 
Ok thanks. I will follow that advice.

> The second piece of advice I'll give is that you may want to check out the
> CVS module at http://search.cpan.org/~rsoliv/Cvs-0.06/lib/Cvs.pm
> 
I will have a look at it. Thanks for that hint. :-)

> The third piece of advice is that you should read the Posting Guidelines
> which are posted regularly to the group.  Specifically in this case,
> please pay attention to the bit that tells you to "Speak Perl, not
> English".  That is, what do you mean when you said "I tried to access via
> cvs [Directory here] login".  Did you execute a system command?  Are you
> redirecting your Perl script to or from the CVS command?  Show us what
> you're doing.
> 

Ok, let me try to speak Perl. I'm afraid I have quite a bad accent ;-) I 
have a config file with the CVS access data and i want to connect to the 
cvs server for a checkout:

test.cfg (the config file)
# CVS Variables
CVS_SERVER = 192.168.0.1
CVS_DIR = /usr/cvs
CVS_RSH = pserver

CVS_USERNAME = holger
CVS_PASSWORD = test

# webEdition Revision Variables
PROJECT = testproject
RELEASE = REL_0_1

test.pl
#!/usr/bin/perl -w

# I don't exactly know if I need all those packages
use File::Find;
use File::Path;
use File::Basename;
use File::Copy;
use File::Spec;
use File::DosGlob 'glob'; # TinyPerl only seems to work with DosGlob :-/
use FileHandle;
use Getopt::Std;
use Config;

%config = (
);

$scriptbase = dirname($0);
$configfile = "$scriptbase/testfile.cfg" unless $configfile;
parse_cfg($configfile);

my $cvs ="cvs -d 
:$config{'CVS_RSH'}:$config{'CVS_USERNAME'}"."@"."$config{'CVS_SERVER'}:"."$config{'CVS_DIR'}";
my $release = $config{'RELEASE'};
my $project = $config{'PROJECT'};
my $checkoutdir = $config{'CHECKOUTDIR'};

system "$cvs login";
#how can I enter the password?
system "$cvs co $project";

sub parse_cfg {
   my $inifile = shift;
   my ($var, $val);

   open(CONFIG, $configfile) || die ("Error opening $configfile !");
   print("Config File opened!\n");
   while(<CONFIG>) {
     next if /^\s*#/;
     next unless /(\w+)\s*=\s*(.+)/;

     ($var, $val) = ($1, $2);

     $config{$var} = $val;
   }
   close(CONFIG);
}

Thanks again.
Holger



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

Date: Mon, 19 Apr 2004 14:04:10 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: CVS access via PERL
Message-Id: <20040419135440.Q21613@dishwasher.cs.rpi.edu>

On Mon, 19 Apr 2004, Holger Biebinger wrote:

> Ok, let me try to speak Perl. I'm afraid I have quite a bad accent ;-) I
> have a config file with the CVS access data and i want to connect to the
> cvs server for a checkout:
>
> test.pl
> #!/usr/bin/perl -w
>
> # I don't exactly know if I need all those packages
> use File::Find;
> use File::Path;
> use File::Basename;
> use File::Copy;
> use File::Spec;
> use File::DosGlob 'glob'; # TinyPerl only seems to work with DosGlob :-/
> use FileHandle;
> use Getopt::Std;
> use Config;

The only one I see you using here are File::Basename (for dirname()). I
would recommend getting rid of the rest (and if the interpreter gives you
an error, then you know you should add it back. :-) )

>
> %config = (
> );
>
> $scriptbase = dirname($0);
> $configfile = "$scriptbase/testfile.cfg" unless $configfile;
> parse_cfg($configfile);
>
> my $cvs ="cvs -d
> :$config{'CVS_RSH'}:$config{'CVS_USERNAME'}"."@"."$config{'CVS_SERVER'}:"."$config{'CVS_DIR'}";

Gahh.  That looks rather messy.  You might want to take advantage of the
hashkey property of barewords, not to mention escaping @ characters:

my $cvs ="cvs -d :$config{CVS_RSH}:$config{CVS_USERNAME}\@$config{CVS_SERVER}:$config{CVS_DIR}";

Well.  It's mildly better anyway.

> my $release = $config{'RELEASE'};
> my $project = $config{'PROJECT'};
> my $checkoutdir = $config{'CHECKOUTDIR'};
>
> system "$cvs login";
> #how can I enter the password?
> system "$cvs co $project";
>

Okay. Now I understand.  The simple answer is that you can't, at least not
like this.  What you're trying to do is called "bidirectional interprocess
communication".  That is, both getting input from and sending output to a
process.  This is more complicated than you might imagine.  For more
details, read:
perldoc -q pipe

That documentation will refer you to the IPC::Open2 module.  However,
since you are trying to do something very specific with your bidirectional
pipe - something that many people before you have wanted to do - there
already exists a module specifically for it.  I therefore refer you back
to the CVS module from CPAN that I posted in my previous message.


Paul Lalli

> sub parse_cfg {
>    my $inifile = shift;
>    my ($var, $val);
>
>    open(CONFIG, $configfile) || die ("Error opening $configfile !");
>    print("Config File opened!\n");
>    while(<CONFIG>) {
>      next if /^\s*#/;
>      next unless /(\w+)\s*=\s*(.+)/;
>
>      ($var, $val) = ($1, $2);
>
>      $config{$var} = $val;
>    }
>    close(CONFIG);
> }
>
> Thanks again.
> Holger
>
>


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

Date: Mon, 19 Apr 2004 04:44:21 -0000
From: "David K. Wall" <dwall@fastmail.fm>
Subject: Re: Design choice: subclassing or "supplementing"
Message-Id: <Xns94D078505222dkwwashere@216.168.3.30>

Abigail <abigail@abigail.nl> wrote:

> David K. Wall (dwall@fastmail.fm) wrote on MMMDCCCLXXIV September
> MCMXCIII in <URL:news:Xns94C6993E413Edkwwashere@216.168.3.30>:
> ()  J Krugman <jkrugman@yahbitoo.com> wrote:
> ()  
> () > I have this class from CPAN (let's call it, creatively enough,
> () > Foo) that suits me fine in almost every respect, except for one
> () > workhorse method (say, bar) that I think could be significantly
> () > enhanced. One possibility would be to create a subclass MyFoo of
> () > Foo just for the purpose of overriding bar.  Alternatively, I
> () > could have a file FooSupplement.pm, in which I do something like
> ()  [redefining a method instead of subclassing and overriding it]
> ()  
> ()  I'm no OOP guru, in fact I'm a downright novice at OOP, so keep that
> ()  in mind.
> ()  
> ()  Subclassing and overriding the method seems to me the better way.  
> ()  
> ()  If you simply redefine the method, then someone reading your code
> ()  might look at the docs for Foo.pm and then wonder why bar() is not
> ()  functioning as documented. Yes, they should have looked at the docs 
> ()  for FooSupplement as well, but why look there for a method for a Foo 
> ()  object?
> 
> I don't buy that argument. Why would someone reading your code and
> wanting to look up the documentation for 'bar()' in Foo.pm? 

I was thinking of bar() as a method for an object of class Foo. Given that 
assumption (which I carelessly didn't state explicitly), Foo.pm should be 
the obvious place to look for its definition, right?

> The code
> contains a call to a function 'bar()', which turns out not to be 
> defined in the file. The code also uses two classes.

Two? Foo and what else? Unless I'm mistaken, FooSupplement.pm doesn't 
create a new class, it just redefines one of the Foo methods, namely bar(). 
 
> I'd say any programmer that just ignores 50% of the inherited modules,
> and only searches the documentation for the other half deserves what
> he gets.

I agree completely.

> ()  If you subclass, then your "main" program says 'use MyFoo;' and the
> ()  maintenance programmer knows to look at MyFoo.pm instead of Foo.pm. 
> 
> But in the given example, the code says "use FooSupplement". So, why 
> *wouldn't* the maintainance programmer look there (which he doesn't
> according to you)?

No reason at all. A competent maintenance programmer *would* look at 
FooSupplement. I just don't think it's the *obvious* place to look for a 
method for a Foo object. Why do something in a non-obvious way when there's 
an obvious way -- subclassing and overriding -- to achieve a similar 
effect? That's all I meant, though I'll readily admit I could have stated 
it more clearly.

Apologies for the long delay in getting back to this thread.

-- 
David Wall


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

Date: Fri, 16 Apr 2004 16:55:31 +0100
From: "Nick Weavers" <nick_weavers@uk.ibm.com>
Subject: Does $^T still work ?
Message-Id: <c5ovso$115i$1@sp15en20.hursley.ibm.com>

$BASETIME (or $^T) seems to have stopped working for me. I have tested it on
RH linux 9.0 with perl 5.8.0 and under AIX 5.1 with perl 5.6.0 and it
returns nothing.

Does perl have to be compiled with any options enabled for this builtin var
to work?

Nick.




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

Date: Fri, 16 Apr 2004 13:38:37 -0500
From: "J. Gleixner" <glex_nospam@qwest.invalid>
Subject: Re: Does $^T still work ?
Message-Id: <NKVfc.290$_R.46861@news.uswest.net>

Nick Weavers wrote:
> $BASETIME (or $^T) seems to have stopped working for me. I have tested it on
> RH linux 9.0 with perl 5.8.0 and under AIX 5.1 with perl 5.6.0 and it
> returns nothing.
> 
> Does perl have to be compiled with any options enabled for this builtin var
> to work?
> 
> Nick.
> 
> 

BASETIME is defined in English.pm.

use English;
print $BASETIME;




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

Date: Fri, 16 Apr 2004 23:12:37 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Does $^T still work ?
Message-Id: <slrnc80q34.bp6.efflandt@typhoon.xnet.com>

On Fri, 16 Apr 2004, Nick Weavers <nick_weavers@uk.ibm.com> wrote:
> $BASETIME (or $^T) seems to have stopped working for me. I have tested it on
> RH linux 9.0 with perl 5.8.0 and under AIX 5.1 with perl 5.6.0 and it
> returns nothing.
> 
> Does perl have to be compiled with any options enabled for this builtin var
> to work?

Following works for me:

#!/usr/bin/perl -w
sleep 5;
print "This script took ". (time - $^T) .
  " seconds in Perl $] on $^O\n";

Depending upon the system, returns one of:
This script took 5 seconds in Perl 5.006001 on linux
This script took 5 seconds in Perl 5.008 on linux

-- 
David Efflandt - All spam ignored  http://www.de-srv.com/


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

Date: 16 Apr 2004 15:24:48 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude>
Subject: Re: Drawing graphs
Message-Id: <Xns94CD741AD3E7Basu1cornelledu@132.236.56.8>

"porter970" <porter970@lycos.com> wrote in
news:107vr09f3msjn8b@corp.supernews.com: 

> I need to draw a series of small 50 x 50 pixel graphs.  I'm currently
> using GD-2.0.12 and when the graph gets this small the quality is
> pretty poor.

What kind of quality do you expect from a 50 x 50 graph?

> My question, is it worth updating to the newest version
> of GD (2.0.22 according to http://www.boutell.com/gd/ ?) or is there
> another option? 

That is impossible to tell without knowing what you perceive as the 
problem. If the 'lack of quality' is due to the fact that there just aren't 
enough pixels, I am not sure what can be done. What are you trying to plot? 
Example output and description of what you perceive to be the problem would 
be helpful. If you want to show images, you can put them up on a web site 
some place and we can take a look.

Sinan.
-- 
A. Sinan Unur
1usa@llenroc.ude (reverse each component for email address)


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

Date: Fri, 16 Apr 2004 10:37:27 -0500
From: "J. Gleixner" <glex_nospam@qwest.invalid>
Subject: Re: Drawing graphs
Message-Id: <X4Tfc.249$_R.22876@news.uswest.net>

porter970 wrote:
> I need to draw a series of small 50 x 50 pixel graphs.  I'm currently using
> GD-2.0.12 and when the graph gets this small the quality is pretty poor.  My
> question, is it worth updating to the newest version of GD (2.0.22 according
> to http://www.boutell.com/gd/ ?) or is there another option?

Well, check the changes log for GD and the library for the type of
image you're creating to see if anything was done to improve what you're 
doing.  Possibly using a different format, different compression, etc. 
might help. A 50x50 image can only hold so much information and 
generally small image = poor quality.  Could also post a small example 
of code here or to the GD folks.


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

Date: Sat, 17 Apr 2004 09:44:54 +1000
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: Drawing graphs
Message-Id: <slrnc80rvm.5vp.mgjv@martien.heliotrope.home>

On Fri, 16 Apr 2004 09:21:56 -0600,
	porter970 <porter970@lycos.com> wrote:
> 
> 
> I need to draw a series of small 50 x 50 pixel graphs.  I'm currently using
> GD-2.0.12 and when the graph gets this small the quality is pretty poor.  My
> question, is it worth updating to the newest version of GD (2.0.22 according
> to http://www.boutell.com/gd/ ?) or is there another option?

Well, GD 2 supports antialiasing (although the interface is a bit odd),
which could help a bit, but I'd say that a 50 by 50 pixel canvas is
simply too small to get great results for a graph. Without seeing an
example of what the result currently looks like, it's hard to predict
whether antialiasing will improve things or not.

Are you currently using antialiasing? I don't know off the top of my
head whether GD 2.0.12 supported it yet.

> Upgrading isn't without problems since I don't have hands on access to the
> server and the guy that does NEVER gets things to work first (or second)
> try.

If you don't currently use antialiasing, and the current GD or libgd
doesn't support it, you probably will need to get the latest libgd
(www.boutell.com), install that first, then install GD, making sure to
compile it the same way. If you don't trust your admin to get it right,
do it on a test system first, and send him a recipe.

Martien
-- 
                        | Yes; Windows is great for running &
Martien Verbruggen      | developing viruses, for instance.  It's also
                        | very popular, but then again, so is the
                        | common cold. -- Dave Hinz



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

Date: Fri, 16 Apr 2004 19:25:55 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Earthquake and tornado data evaluation Perl program  Apr. 14, 2004
Message-Id: <7rWfc.8716$l75.6417@newsread2.news.atl.earthlink.net>

"edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
news:YZcfc.7030$zj3.3864@newsread3.news.atl.earthlink.net...

http://www.freewebz.com/eq-forecasting/303.html#SOURCE_DATA

Rather than try to respond to individual notes that have been posted
regarding using certain Perl commands in that program I am going to try to
summarize things in this note.

One of my goals in writing that program was to create one which would be
easy for people to translate into other programming languages.  If people
working for some government start making serious use of it then I suspect
that they might decide to switch to something else.  So I tried to avoid
using commands such as "chomp" which would be helpful to the original
program but difficult to duplicate in different versions of Basic for
example.  Instead I made extensive use of substr() and other commands which
I believe are almost universal for programming languages.

Perl's SORT command offers quite a few options.  But if you check the two
sort routines I have about 2/3 of the way down in my program you can see
that I went with a single, simple use of the command and then used FOR loops
to sort lengthy arrays into ascending or descending order.  People who want
to add new sort routines to the program can simply make a copy of one of
mine and substitute variable names.  They don't have to understand how the
sort command works or what options it offers.  This is inefficient
programming.  But on my system those sorts process more than 20,000 lines of
earthquake data in less than a second.  So any losses in processing time are
not a problem.






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

Date: Fri, 16 Apr 2004 17:16:16 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Earthquake and tornado data evaluation Perl program  Apr. 14, 2004
Message-Id: <_N-dncYn2ueQ0B3dRVn-hQ@adelphia.com>

edgrsprj wrote:

> One of my goals in writing that program was to create one which would be
> easy for people to translate into other programming languages.

With all due respect, it's my opinion that you've failed rather badly to
meet that goal.

An experienced Perl hacker who is willing to put forth a *lot* of effort has
some chance of reading this code. Someone whose primary language is C or
Java has *no* chance of doing so.

sherm--

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


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

Date: Fri, 16 Apr 2004 23:06:59 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Earthquake and tornado data evaluation Perl program  Apr. 14, 2004
Message-Id: <nGZfc.9043$l75.4109@newsread2.news.atl.earthlink.net>

"Sherm Pendley" <spamtrap@dot-app.org> wrote in message
news:_N-dncYn2ueQ0B3dRVn-hQ@adelphia.com...
> > One of my goals in writing that program was to create one which would be
> > easy for people to translate into other programming languages.
>
> With all due respect, it's my opinion that you've failed rather badly to
> meet that goal.

Future versions should be a little easier to understand.  That one was a
collection of sections of quite a few programs written in different
languages including one or more Excel spreadsheet programs.  I had to get
something running fast for my own use.  So it was not the most organized
effort.

Also, someone who is actually a professional programmer is translating the
program into a version of Basic.  His code will probably look more like what
people are used to seeing.




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

Date: Fri, 16 Apr 2004 20:20:55 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Earthquake and tornado data evaluation Perl program  Apr. 14, 2004
Message-Id: <duCdnePib63O5R3dRVn-gw@adelphia.com>

edgrsprj wrote:

> Future versions should be a little easier to understand.

The problem with the current version, as I see it, is that it's neither fish
nor fowl. It's (un)structured like BASIC, and uses a number of BASIC-like
idioms (goto, anyone?) - but it's not BASIC, it's Perl.

Most Perl programmers will have trouble with it because it's highly atypical
Perl usage; while it's technically correct insofar as the syntax goes, it's
just not the kind of Perl that folks are used to seeing.

BASIC programmers, on the other hand, will probably have trouble with the
Perl syntax - what do you mean, that's a number? Why is there a $ on it if
it's not a string?

I think that, for your goal of something highly portable that many people
can easily translate to another language, C would have been a better
choice, as many of the most popular languages today (C++, Objective-C,
Java, Perl, ...) share a very similar syntax with C. That would have run
counter to your other goal of getting something working quickly, though.

sherm--

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


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

Date: Sat, 17 Apr 2004 13:25:33 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Earthquake and tornado data evaluation Perl program  Apr. 14, 2004
Message-Id: <hfagc.12636$zj3.8180@newsread3.news.atl.earthlink.net>

"Sherm Pendley" <spamtrap@dot-app.org> wrote in message
news:duCdnePib63O5R3dRVn-gw@adelphia.com...

Sherm, let me provide a little perspective on this.

On December 30, 1994 I sent a strongly worded warning to U.S. earthquake
officials advising them to begin watching for a very destructive earthquake.
At that time this program did not exist except perhaps in a really primitive
form.  And I had no idea where the earthquake might occur.

A little over 2 weeks later an earthquake in Japan claimed some 6000 lives
and produced a reported 200 BILLION U.S. dollars worth of damage and
economic loss.

I have circulated warnings like that before probably most of the highly
destructive earthquakes which have occurred during the past decade.  Had
this program existed before the Kobe earthquake or before quite a few of our
other destructive earthquakes then I believe it might have enabled us to
save a lot of lives and perhaps quite a bit of lost $$$.

When you are talking about a natural disaster which can produce billions of
dollars worth of damage, if you can convince government officials that your
earthquake program works etc. then they are not going to worry about its
structure.  If they like the results they will probably be willing to hire
an entire computer software firm to improve the code.  But to get their
attention you first need something which produces useful numbers no matter
how it looks.




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

Date: 17 Apr 2004 13:46:55 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Earthquake and tornado data evaluation Perl program  Apr. 14, 2004
Message-Id: <c5rcgf$rif$1@mamenchi.zrz.TU-Berlin.DE>

Michele Dondi  <bik.mido@tiscalinet.it> wrote in comp.lang.perl.misc:
> On Wed, 14 Apr 2004 19:55:23 -0500, Tad McClellan
> <tadmc@augustmail.com> wrote:
> 
> >None of these semicolons do anything, so they should not be there:
> >
> >   for $npr(1..length($outputchoice)){;
> >
> >   if ($sopc eq 'o'){$num = $dbsortlon[$num1]};
>                                                ^
> 
> FWIW *that* semicolon should be there IMHO; i.e. I generally find it
> more stylistically correct to put the semicolon after blocks that fit
> on one line, even if it wouldn't be necessary.

I disagree, enough to make this late followup.

There are a few cases where the closing "}" of a block *must* be followed
by ";" (or ",", or another expression terminator).  This happens when
the block is modified by "do", "eval", or anonymous "sub" (and perhaps
others), which operate on a block, but are statements.  The final block
brace also ends the statement, so it looks like "};".  The combination
should be reserved for the special situation where it's needed.

Anno


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

Date: Sat, 17 Apr 2004 11:04:26 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Earthquake and tornado data evaluation Perl program  Apr. 14, 2004
Message-Id: <ccudnUPph7Ph2hzdRVn-ug@adelphia.com>

edgrsprj wrote:

> Sherm, let me provide a little perspective on this.

You've already provided that, ad nauseum. Please realize that the topic of
this group is not earthquakes, politics, fund-raising, or BASIC. It's Perl.
Your social/political situation is not relevant here, your code is.

> But to get their attention you first need something which produces useful
> numbers no matter how it looks.

For someone who claims to be a scientist, you seem to be sadly unaware of
basic scientific principle. To *retain* someone's attention, you need to
make it possible for them to verify your hypothesis by independently
reproducing your experiment.

In terms of computer code, that means documenting your algorithm outside of
the code itself, and writing your reference implementation of that
algorithm in a clear, structured, manner. You have done neither.

sherm--

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


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

Date: Sun, 18 Apr 2004 09:13:29 GMT
From: "edgrsprj" <edgrsprj@ix.netcom.com>
Subject: Re: Earthquake and tornado data evaluation Perl program  Apr. 14, 2004
Message-Id: <ZErgc.12118$l75.5128@newsread2.news.atl.earthlink.net>

"Sherm Pendley" <spamtrap@dot-app.org> wrote in message
news:ccudnUPph7Ph2hzdRVn-ug@adelphia.com...

That program is not really meant to prove anything to anyone.  It is largely
intended to provide scientists including myself with a very powerful
research and analytical tool.

There is a Basic language version being prepared.  I have seen the
preliminary code.  And it is probably a little more like the type of program
you are used to seeing.




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

Date: Sun, 18 Apr 2004 17:26:46 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Earthquake and tornado data evaluation Perl program  Apr. 14, 2004
Message-Id: <79e280ltr38qpgc3ct23mr75qrp08v20ae@4ax.com>

On 17 Apr 2004 13:46:55 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno
Siegel) wrote:

>> FWIW *that* semicolon should be there IMHO; i.e. I generally find it
>> more stylistically correct to put the semicolon after blocks that fit
>> on one line, even if it wouldn't be necessary.
>
>I disagree, enough to make this late followup.
>
>There are a few cases where the closing "}" of a block *must* be followed
>by ";" (or ",", or another expression terminator).  This happens when
>the block is modified by "do", "eval", or anonymous "sub" (and perhaps
>others), which operate on a block, but are statements.  The final block
>brace also ends the statement, so it looks like "};".  The combination
>should be reserved for the special situation where it's needed.

I agree with you but I disagree on the fact that you disagree with me!


Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

Date: 18 Apr 2004 12:55:19 GMT
From: <jari.aalto@poboxes.com> (Jari Aalto+mail.perl)
Subject: Emacs modules for Perl programming
Message-Id: <perl-faq/emacs-lisp-modules_1082292761@rtfm.mit.edu>

Archive-name: perl-faq/emacs-lisp-modules
Posting-Frequency: 2 times a month
URL: http://tiny-tools.sourceforge.net/
Maintainer: Jari Aalto <jari.aalto@poboxes.com>

Announcement: "What Emacs lisp modules can help with programming Perl"

    Preface

        Emacs is your friend if you have to do anything comcerning software
        development: It offers plug-in modules, written in Emacs lisp
        (elisp) language, that makes all your programmings wishes come
        true. Please introduce yourself to Emacs and your programming era
        will get a new light.

    Where to find Emacs/XEmacs

        o   Unix:
            http://www.gnu.org/software/emacs/emacs.html
            http://www.xemacs.org/

        o   Unix Windows port (for Unix die-hards):
            install http://www.cygwin.com/  which includes native Emacs 21.x.
            XEmacs port is bundled in XEmacs setup.exe available from
            XEmacs site.

        o   Pure Native Windows port
            http://www.gnu.org/software/emacs/windows/ntemacs.html
            ftp://ftp.xemacs.org/pub/xemacs/windows/setup.exe

        o   More Emacs resources at
            http://tiny-tools.sourceforge.net/  => Emacs resource page

Emacs Perl Modules

    Cperl -- Perl programming mode

        ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl
        http://www.perl.com/CPAN-local/misc/emacs/cperl-mode/
        <ilya@math.ohio-state.edu>    Ilya Zakharevich

        CPerl is major mode for editing perl files. Forget the default
        `perl-mode' that comes with Emacs, this is much better. Comes
        standard in newest Emacs.

    TinyPerl -- Perl related utilities

        http://tiny-tools.sourceforge.net/

        If you ever wonder how to deal with Perl POD pages or how to find
        documentation from all perl manpages, this package is for you.
        Couple of keystrokes and all the documentaion is in your hands.

        o   Instant function help: See documentation of `shift', `pop'...
        o   Show Perl manual pages in *pod* buffer
        o   Grep through all Perl manpages (.pod)
        o   Follow POD references e.g. [perlre] to next pod with RETURN
        o   Coloured pod pages with `font-lock'
        o   Separate `tiperl-pod-view-mode' for jumping topics and pages
            forward and backward in *pod* buffer.

        o   Update `$VERSION' variable with YYYY.MMDD on save.
        o   Load source code into Emacs, like Devel::DProf.pm
        o   Prepare script (version numbering) and Upload it to PAUSE
        o   Generate autoload STUBS (Devel::SelfStubber) for you
            Perl Module (.pm)

    TinyIgrep -- Perl Code browsing and easy grepping

        [TinyIgrep is included in Tiny Tools Kit]

        To grep from all installed Perl modules, define database to
        TinyIgrep. There is example file emacs-rc-tinyigrep.el that shows
        how to set up dattabases for Perl5, Perl4 whatever you have
        installed

        TinyIgrep calls Igrep.el to to do the search, You can adjust
        recursive grep options, set search case sensitivity, add user grep
        options etc.

        You can find latest `igrep.el' module at
        <http://groups.google.com/groups?group=gnu.emacs.sources> The
        maintainer is Jefin Rodgers <kevinr@ihs.com>.

    TinyCompile -- To Browse grep results in Emacs *compile* buffer

        TinyCompile is a minor mode for *compile* buffer from where
        you can collapse unwanted lines or shorten file URLs:

            /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file1:NNN: MATCHED TEXT
            /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file2:NNN: MATCHED TEXT

            -->

            cd /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/
            file1:NNN: MATCHED TEXT
            file1:NNN: MATCHED TEXT

End



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

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


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