[19139] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1334 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 19 14:05:35 2001

Date: Thu, 19 Jul 2001 11:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <995565912-v10-i1334@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 19 Jul 2001     Volume: 10 Number: 1334

Today's topics:
    Re: All computers in world MUST sync with ATOMIC clock  <stumo@bigfoot.com>
        Any perl module for XML Explorer tree display/edit? <mel2000@hotmaildot.com>
        Best Perl book for a beginner <galanis@ceid.upatras.gr>
    Re: Best Perl book for a beginner (Tad McClellan)
        calling shared libs <jeff_hamann@hamandonald.com>
    Re: Can I <!--include files ??? <dcs@ntlworld.com>
    Re: Disabling IE toolbar <andras@mortgagestats.com>
        don't laugh	 <jwarpup1@home.com>
    Re: don't laugh <andrew@mvt.ie>
    Re: don't laugh <jeff@vpservices.com>
    Re: don't laugh <andras@mortgagestats.com>
    Re: don't laugh <holland@origo.ifa.au.dk>
    Re: don't laugh <uri@sysarch.com>
    Re: don't laugh <andras@mortgagestats.com>
        dumb question <taghatta@midway.uchicago.edu>
    Re: dumb question <andras@mortgagestats.com>
    Re: dumb question (Jay Tilton)
    Re: dumb question <newspost@coppit.org>
    Re: dumb question (Jay Tilton)
    Re: dumb question (Anno Siegel)
    Re: dumb question ctcgag@hotmail.com
        Editors for Perl (was: Zeus...) <armingaud@noos.fr>
    Re: Generic Language interpreter in Perl? <tony_curtis32@yahoo.com>
    Re: Generic Language interpreter in Perl? (Anno Siegel)
    Re: GnuPG encrypting from STDIN in CGI <fty@mediapulse.com>
        ide for perl? <jeff_hamann@hamandonald.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 19 Jul 2001 17:36:56 +0100
From: "Stuart Moore" <stumo@bigfoot.com>
Subject: Re: All computers in world MUST sync with ATOMIC clock before 12:00 AM  21July 2001
Message-Id: <H%D57.70098$B56.13998431@news2-win.server.ntlworld.com>

Luke Webber <luke@webber.com.au> wrote in message
news:mOo57.13943$Xr6.115149@news-server.bigpond.net.au...
> "Joe Cosby" <joecosby@SPAMBLOCKmindspring.com> wrote in message
> news:3b55f01a.2170914@news.mindspring.com...
> > kkal@javakk.com (Ken Kalish) hunched over a computer, typing
> > feverishly;
> > thunder crashed, kkal@javakk.com (Ken Kalish) laughed madly, then
> > wrote:
> >
> > >Thank you. Please continue to relay to us all orders from the mother
> ship.
> >
> > "Double cheeseburger, cheddar curly fries, and a large diet coke"
>
> <accent>
> No Coke. Pepsi. <g>
> </accent>
>

<accent>
No Cheese. No Burger. Chemicals.
</accent>




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

Date: Thu, 19 Jul 2001 08:43:39 -0700
From: "M.L." <mel2000@hotmaildot.com>
Subject: Any perl module for XML Explorer tree display/edit?
Message-Id: <9j6v8s$mltff$1@ID-19545.news.dfncis.de>

I'm a newbie to XML currently reading up on various Perl modules to
manipulate XML. My first goal is to find a module that can easily slurp an
XML tree into a hash, and then back to an XML tree. With all the
possibilities, I'm having trouble making up my mind.

After that task my greatest concern will be displaying and modifying the
tree. Ideally, I would like to:

1. Convert my spreadsheet-like database to an expanding/collapsing XML
folder tree resembling that of Windows Explorer

2. Tree display should collapse to 1 folder by default (stylesheet needed?)

3. User must be able to add new record(s) to top of folder tree just as in
Explorer

4. User must be allowed to add new tag(s) to each record, but since each
record is symmetrical, each new tag must be added to all records/folders in
the tree.

I'd like to know if there is a Perl or Javascript module that can do most of
what I am asking for as far as displaying and modifying the XML tree (as
well as slurping/restoring).

Thanks




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

Date: Thu, 19 Jul 2001 18:33:52 +0300
From: Nikolas Galanis <galanis@ceid.upatras.gr>
Subject: Best Perl book for a beginner
Message-Id: <3B56FDE0.16B8E3F8@ceid.upatras.gr>

Which do you think is the best book for a beginner in Perl?



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

Date: Thu, 19 Jul 2001 11:14:10 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Best Perl book for a beginner
Message-Id: <slrn9ldua2.h3o.tadmc@tadmc26.august.net>

Nikolas Galanis <galanis@ceid.upatras.gr> wrote:

>Which do you think is the best book for a beginner in Perl?


If you have programmed in other languages:

   "Learning Perl"   O'Reilly Associates


If you are also new to programming itself:

   "Elements of Programming with Perl"   Manning Publications


If you get the Llama book, wait until the 3rd edition is released
(next week).



Disclaimer: I work for the author of one of those books and the 
            publisher of the other one, but I recommended both
            books even before that.


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


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

Date: Thu, 19 Jul 2001 08:37:21 -0700
From: "Jeff D. Hamann" <jeff_hamann@hamandonald.com>
Subject: calling shared libs
Message-Id: <9j6v06$esv$1@sevenofnine.peak.org>

I have a shared lib that uses pointers to arrays of C structs as arguments.
Is it possible to call functions in a shared lib (dll) from perl?

Jeff.

--
Jeff D. Hamann
Hamann, Donald and Associates
PO Box 1421
Corvallis, Oregon USA 97339-1421
541-740-5988
jeff_hamann@hamanndonald.com
www.hamanndonald.com





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

Date: Thu, 19 Jul 2001 14:08:17 +0100
From: "Terry" <dcs@ntlworld.com>
Subject: Re: Can I <!--include files ???
Message-Id: <8WA57.51314$WS4.7824947@news6-win.server.ntlworld.com>

"Ben Kennedy" <bkennedy99@Home.com> wrote in message
news:tLA57.3448$EP6.1146360@news1.rdc2.pa.home.com...
>
> "Terry" <dcs@ntlworld.com> wrote in message
> news:Lo%37.39930$B56.8361138@news2-win.server.ntlworld.com...
> > Hi,
> >
> > All of my 'standard' webpages are *.shtml using SSI. This is great in
that
> I
> > can have a standard template file for header, navigation menu and footer
> of
> > my pages by using the
> >
> > <!--include file="template.html"-->
> > directive.
> > I wanted to use the same templates for my cgi pages. Is there any way of
> > doing this?
>
> You may want to investigate the HTML::Mason package, which lets you create
> and embed reusable "bricks" that contain perl code or html, that can of
> course be nested, very php-like.  What you would do is implement your
server
> code as Mason components, then insert a <& header.mc &> (where header.mc
is
> your header component, which can be dynamic) in your back-end code
> components or plain html components.  Hope this helps --
>

Thanks Ben :)

Am I right in assuming that I wouldn't be able to METHOD="POST" to these
pages?

Terry


> --Ben Kennedy
>
>




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

Date: Thu, 19 Jul 2001 10:13:03 -0400
From: Andras Malatinszky <andras@mortgagestats.com>
Subject: Re: Disabling IE toolbar
Message-Id: <3B56EAEF.2EB5C6C1@mortgagestats.com>



Lauren Smith wrote:

> "harry macdonald" <hmacdonald@europarl.eu.int> wrote in message
> news:3B568D00.E22380DE@europarl.eu.int...
> > Can anyone tell me how to disable/enable the IE4 toolbar from a Perl
> > script.
> >
> > And where can I find info on controlling the browser from a Perl
> Script
> > generally.
>
> O'Reilly's got a decent reference affectionately called the 'rhino book'
> (or is it the hippo book?  I never can remember).

The guy on the cover of "JavaScript, The Definitive Guide" has a horn on its
nose. It must be a rhino. On the other hand, there is a "JavaScript
Application Cookbook" with what seems to be a hippo on the cover.

To the OP: assuming the context of the question is CGI, your best hope is to
have your Perl script send JavaScript to the browser which will hopefully
run the JavaScript and disable the toolbar. The Perl part is trivial; you
should check JavaScript resources for the non-trivial part.




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

Date: Thu, 19 Jul 2001 12:57:26 -0400
From: "James Warpup" <jwarpup1@home.com>
Subject: don't laugh	
Message-Id: <UeE57.31194$PF1.1521178@e420r-atl2.usenetserver.com>

i can't figure out how to get perl to output to a file,

this is just a little script that will become part of the larger project i'm
working on.

$OUT = 'c:\out.txt';
open (FILEOUT, $OUT);
$NUM = 0;
$NUM2 = 1;
while ( $NUM <= 10 ) {
print FILEOUT "$NUM2 @ARGV[$NUM] \n\n";
$NUM += 1;
$NUM2 +=1;
}

but it  doesn't write to $OUT

any guesses as to why?






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

Date: Thu, 19 Jul 2001 18:06:32 +0100
From: "Andrew" <andrew@mvt.ie>
Subject: Re: don't laugh
Message-Id: <9j743b$q3f$1@kermit.esat.net>


"James Warpup" <jwarpup1@home.com> wrote in message
news:UeE57.31194$PF1.1521178@e420r-atl2.usenetserver.com...
> i can't figure out how to get perl to output to a file,
>
> this is just a little script that will become part of the larger project
i'm
> working on.
>
> $OUT = 'c:\out.txt';
> open (FILEOUT, $OUT);
There's two main things wrong here - first of all, you're opening the file
in read-only mode, and secondly you're not checking to see if that went ok.
This would be better;

$out = 'c:\out.txt';
open (FILEOUT,">$out") or die "Can't open file $out for output.\n";

Also, using variables with all capitals is generally discouraged.

Andrew




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

Date: Thu, 19 Jul 2001 10:08:09 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: don't laugh
Message-Id: <3B5713F9.BF66124D@vpservices.com>

James Warpup wrote:
> 
> open (FILEOUT, $OUT);

1. Always check the results of an open to see if it succeeded.

2. If you don't specify a mode, open() will assume all you want to do is
read from a file.  If you want to write to a file, you need to specify
that.  Re-read the documentation on open() and look for the use of > and
< and >> etc.

3. no big deal but all-caps are good for filehandles but bad for
variables just on legibility

So, change your line above to:

open( FILEOUT, ">$out" ) or die "Couldn't open '$out': $!";

-- 
Jeff



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

Date: Thu, 19 Jul 2001 13:12:01 -0400
From: Andras Malatinszky <andras@mortgagestats.com>
Subject: Re: don't laugh
Message-Id: <3B5714E0.E33FC8B4@mortgagestats.com>



James Warpup wrote:

> i can't figure out how to get perl to output to a file,
>
> this is just a little script that will become part of the larger project i'm
> working on.
>
> $OUT = 'c:\out.txt';
> open (FILEOUT, $OUT);
> $NUM = 0;
> $NUM2 = 1;
> while ( $NUM <= 10 ) {
> print FILEOUT "$NUM2 @ARGV[$NUM] \n\n";
> $NUM += 1;
> $NUM2 +=1;
> }
>
> but it  doesn't write to $OUT
>
> any guesses as to why?

You have opened the file for reading, not writing. Had you used the -w switch,
Perl would have warned you about trying to write to a read filehandle. Change
your first line to
$OUT = '>c:\out.txt';


Also, it's generally a good idea to check the return value of open, just in case
you can't open the file for some reason (you have no permission, insufficient
disk space, etc.). You can do it like this:

$OUT = '>c:\out.txt' or die "Can't open out.txt. Reason: $!";







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

Date: 19 Jul 2001 19:15:03 +0200
From: Steve Holland <holland@origo.ifa.au.dk>
Subject: Re: don't laugh
Message-Id: <w47u208c02w.fsf@origo.ifa.au.dk>

"James Warpup" <jwarpup1@home.com> writes:

> i can't figure out how to get perl to output to a file,

> this is just a little script that will become part of the larger
> project i'm working on.

> $OUT = 'c:\out.txt';
> open (FILEOUT, $OUT);
> $NUM = 0;
> $NUM2 = 1;
> while ( $NUM <= 10 ) {
> print FILEOUT "$NUM2 @ARGV[$NUM] \n\n";
> $NUM += 1;
> $NUM2 +=1;
> }

> but it  doesn't write to $OUT
 
> any guesses as to why?

open(FILEOUT, ">$OUT" );


=====================================================================
               To find out who and where I am look at:
               http://www.nd.edu/~sholland/index.html
=====================================================================


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

Date: Thu, 19 Jul 2001 17:47:39 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: don't laugh
Message-Id: <x7ofqgvmis.fsf@home.sysarch.com>

>>>>> "AM" == Andras Malatinszky <andras@mortgagestats.com> writes:

  AM> Also, it's generally a good idea to check the return value of
  AM> open, just in case you can't open the file for some reason (you
  AM> have no permission, insufficient disk space, etc.). You can do it
  AM> like this:

  AM> $OUT = '>c:\out.txt' or die "Can't open out.txt. Reason: $!";

hmm, i don't see an open call in that line.

:)

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: Thu, 19 Jul 2001 13:58:32 -0400
From: Andras Malatinszky <andras@mortgagestats.com>
Subject: Re: don't laugh
Message-Id: <3B571FC8.7E38CA43@mortgagestats.com>



Andras Malatinszky wrote:

> James Warpup wrote:
>
> > i can't figure out how to get perl to output to a file,
> >
> > this is just a little script that will become part of the larger project i'm
> > working on.
> >
> > $OUT = 'c:\out.txt';
> > open (FILEOUT, $OUT);
> > $NUM = 0;
> > $NUM2 = 1;
> > while ( $NUM <= 10 ) {
> > print FILEOUT "$NUM2 @ARGV[$NUM] \n\n";
> > $NUM += 1;
> > $NUM2 +=1;
> > }
> >
> > but it  doesn't write to $OUT
> >
> > any guesses as to why?
>
> You have opened the file for reading, not writing. Had you used the -w switch,
> Perl would have warned you about trying to write to a read filehandle. Change
> your first line to
> $OUT = '>c:\out.txt';
>
> Also, it's generally a good idea to check the return value of open, just in case
> you can't open the file for some reason (you have no permission, insufficient
> disk space, etc.). You can do it like this:
>
> $OUT = '>c:\out.txt' or die "Can't open out.txt. Reason: $!";

Oops, I mean

open (FILEOUT, $OUT) or die "Can't open out.txt. Reason: $!";

Sorry.



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

Date: Thu, 19 Jul 2001 09:04:13 -0500
From: sycorax <taghatta@midway.uchicago.edu>
Subject: dumb question
Message-Id: <190720010904139653%taghatta@midway.uchicago.edu>

I'm just learning perl 5, and try as I might, I can't figure out one
thing:  is there a way to assign random values to a series of scalar
variables such that they add to a specific sum?  I'd be much obliged if
anyone could help me out.


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

Date: Thu, 19 Jul 2001 10:28:19 -0400
From: Andras Malatinszky <andras@mortgagestats.com>
Subject: Re: dumb question
Message-Id: <3B56EE83.12EF0A0C@mortgagestats.com>



sycorax wrote:

> I'm just learning perl 5, and try as I might, I can't figure out one
> thing:  is there a way to assign random values to a series of scalar
> variables such that they add to a specific sum?  I'd be much obliged if
> anyone could help me out.

How 'bout this recipe:

To pick n random numbers that add up to x.

1) Pick n random numbers (read up on the rand function if you don't know
how).
2) Add them up. Let the sum be s.
3) If s=0, add 1 to each of the random numbers and go back to step 2).
4) Divide each random number by s and multiply each by x.

Not much Perl here, though.



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

Date: Thu, 19 Jul 2001 14:41:39 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: dumb question
Message-Id: <3b56ef10.57430036@news.erols.com>

On Thu, 19 Jul 2001 09:04:13 -0500, sycorax <taghatta@midway.uchicago.edu>
wrote:

>I'm just learning perl 5, and try as I might, I can't figure out one
>thing:  is there a way to assign random values to a series of scalar
>variables such that they add to a specific sum?

Create a list of random numbers, sum them, scale each by a constant factor
so the sum is the desired value.

  for (1..5) {
      push @ary, rand;      
      $ary_sum += $ary[-1];
  }

  $desired_sum = 100;
  @ary = map { $_ * $desired_sum / $ary_sum } @ary;



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

Date: Thu, 19 Jul 2001 10:56:24 -0400
From: David Coppit <newspost@coppit.org>
Subject: Re: dumb question
Message-Id: <3B56F518.5030009@coppit.org>

Jay Tilton wrote:

> On Thu, 19 Jul 2001 09:04:13 -0500, sycorax <taghatta@midway.uchicago.edu>
> wrote:
>  
>>I'm just learning perl 5, and try as I might, I can't figure out one
>>thing:  is there a way to assign random values to a series of scalar
>>variables such that they add to a specific sum?
>>
> 
> Create a list of random numbers, sum them, scale each by a constant factor
> so the sum is the desired value.
> 
>   for (1..5) {
>       push @ary, rand;      
>       $ary_sum += $ary[-1];
>   }
> 
>   $desired_sum = 100;
>   @ary = map { $_ * $desired_sum / $ary_sum } @ary;

Won't that bias the elements of @ary to be high? In other words, it's 
pretty unlikely that you'll get elements with the value of 1.



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

Date: Thu, 19 Jul 2001 15:20:17 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: dumb question
Message-Id: <3b56f91d.60003121@news.erols.com>

On Thu, 19 Jul 2001 10:56:24 -0400, David Coppit <newspost@coppit.org>
wrote:

>Jay Tilton wrote:
>>   for (1..5) {
>>       push @ary, rand;      
>>       $ary_sum += $ary[-1];
>>   }
>> 
>>   $desired_sum = 100;
>>   @ary = map { $_ * $desired_sum / $ary_sum } @ary;
>
>Won't that bias the elements of @ary to be high? In other words, it's 
>pretty unlikely that you'll get elements with the value of 1.

As long as each value in the list is scaled by an identical factor, the
probability that some values will appear more or less frequently than others
does not change.  The bias is the same as for the rand() function.


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

Date: 19 Jul 2001 16:19:45 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: dumb question
Message-Id: <9j71b1$n$2@mamenchi.zrz.TU-Berlin.DE>

According to Jay Tilton <tiltonj@erols.com>:
> On Thu, 19 Jul 2001 10:56:24 -0400, David Coppit <newspost@coppit.org>
> wrote:
> 
> >Jay Tilton wrote:
> >>   for (1..5) {
> >>       push @ary, rand;      
> >>       $ary_sum += $ary[-1];
> >>   }
> >> 
> >>   $desired_sum = 100;
> >>   @ary = map { $_ * $desired_sum / $ary_sum } @ary;
> >
> >Won't that bias the elements of @ary to be high? In other words, it's 
> >pretty unlikely that you'll get elements with the value of 1.
> 
> As long as each value in the list is scaled by an identical factor, the
> probability that some values will appear more or less frequently than others
> does not change.  The bias is the same as for the rand() function.

That doesn't follow.  In effect, you are creating (equally distributed)
random numbers in a range that is itself random [ 0, 1/$ary_sum ).
The distribution of $ary_sum is, uh... a binomial distribution, I think.
It would also change if one were to use rand( $some_number) instead
of the implicit rand( 1).  I'd say the final distribution needs some
more analysis.

Anno


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

Date: 19 Jul 2001 16:46:12 GMT
From: ctcgag@hotmail.com
Subject: Re: dumb question
Message-Id: <20010719124609.288$5h@newsreader.com>

sycorax <taghatta@midway.uchicago.edu> wrote:
> I'm just learning perl 5, and try as I might, I can't figure out one
> thing:  is there a way to assign random values to a series of scalar
> variables such that they add to a specific sum?  I'd be much obliged if
> anyone could help me out.

Sure, but this is math, not perl.

1) Create N-1 random scalars, set the Nth scalar to be the difference
between the desired sum and the sum so far.

2) Create N random scalars, add 1/N * (desired - observed) to each.

3) Create N random scalars, multiply each by desired/observed (watch for
special case that observed is zero, if that can happen)

4) Create N random scalaras, find the power that each value is raised to
it, they sum to the desired sum.  Raise them to that power. (avoid
negatives)

5) Create N random scalars.  repeat until observed sum matches desired sum.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
                    Usenet Newsgroup Service


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

Date: Thu, 19 Jul 2001 18:12:34 +0200
From: FDA <armingaud@noos.fr>
Subject: Editors for Perl (was: Zeus...)
Message-Id: <3B5706F1.2195CC92@noos.fr>

> Do you usually cross-post ads for your editor to programming newsgroups?
> Wouldn't it be more in keeping with the spirit and purpose of newsgroups
> in general if you stayed in comp.editors?

Well, in fact, many Perl programmers use an editor sometimes. I personnally
do, and I precisely learned in a Perl forum (I do not remember if it was
this one or another) the existence of the - free - syntax editor I am
presently using with Perl : SciTE.

I guess that having a thread recalling the existence of one or another
editor in a language forum once in a while is not a bad thing, especially
when this editor has a lexer for that langage. I really hated to switch
between Notepad and vim to edit my Perl scripts :o(

Here is the one I use in both its Linux and Windows versions :

http://www.scintilla.org/SciTEDownload.html



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

Date: 19 Jul 2001 08:33:50 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Generic Language interpreter in Perl?
Message-Id: <878zhlkpq9.fsf@limey.hpcc.uh.edu>

>> On Thu, 19 Jul 2001 01:28:29 -0700,
>> "$Bill Luebkert" <dbe@wgn.net> said:

> Or another slight change and you can just include it and
> execute it (maybe do some scoping changes):

> $file_pattern = 'interface.*\.dat'; $compress_days = 15;
> $notify = 'ekulis@apple.com';

> ...

I tend to avoid this kind of thing.  When other people end
up maintaining the configurations they may not be
programmers, and they may not be aware of syntactic
nuances.  Pulling external configuration information into
a program and making it part of the underlying execution
is something that CGI (and other web-related) programming
has led me to shun.  And it ties the configuration
language to the current implementation; if the program is
later rewritten in another language (e.g. efficiency,
politics), you either have to change the syntax of the
configuration, or write a parser for the configuration in
the new language.

That's all IMHO of course; in real life "do what works".

t
-- 
Beep beep!  Out of my way, I'm a motorist!


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

Date: 19 Jul 2001 15:56:53 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Generic Language interpreter in Perl?
Message-Id: <9j7005$n$1@mamenchi.zrz.TU-Berlin.DE>

According to Tony Curtis  <tony_curtis32@yahoo.com>:
> >> On Thu, 19 Jul 2001 01:28:29 -0700,
> >> "$Bill Luebkert" <dbe@wgn.net> said:
> 
> > Or another slight change and you can just include it and
> > execute it (maybe do some scoping changes):
> 
> > $file_pattern = 'interface.*\.dat'; $compress_days = 15;
> > $notify = 'ekulis@apple.com';
> 
> > ...
> 
> I tend to avoid this kind of thing.  When other people end
> up maintaining the configurations they may not be
> programmers, and they may not be aware of syntactic
> nuances.  Pulling external configuration information into
> a program and making it part of the underlying execution
> is something that CGI (and other web-related) programming
> has led me to shun.

Yes, the thought that the configuration maintainer can do
*anything* is terrifying.  The approach really only works
when configuration maintenance *is* program maintenance
(by decree).  There may still be reason enough to put the
configuration in a module by itself.

>                      And it ties the configuration
> language to the current implementation; if the program is
> later rewritten in another language (e.g. efficiency,
> politics), you either have to change the syntax of the
> configuration, or write a parser for the configuration in
> the new language.

Well, you'd have to write the parser you didn't have to write
in the first place because you used Perl for the configuration
language.  You just postponed the parser, as it were.  In some
projects, the probability that it will be rewritten in another
language is close to zero.

Anno


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

Date: Thu, 19 Jul 2001 15:18:54 GMT
From: "Jay Flaherty" <fty@mediapulse.com>
Subject: Re: GnuPG encrypting from STDIN in CGI
Message-Id: <yTC57.117062$2O6.7665284@news2.aus1.giganews.com>

"Carsten Menke" <bootsy52@gmx.net> wrote in message
news:20010719.013920.993967637.1765@gmx.net...
> Hi all,
>
> I have a wired problem here, I know how to get GnuPG getting to encrypt
> data from stdin this is done after executing /usr/bin/gpg --homedir.....
> followed by newline to tell gpg that the data is coming from stdin not
> from a file. But how to realize that in perl?

use Crypt::GPG
(http://www.cpan.org/ is your friend)
jay




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

Date: Thu, 19 Jul 2001 10:48:10 -0700
From: "Jeff D. Hamann" <jeff_hamann@hamandonald.com>
Subject: ide for perl?
Message-Id: <9j76lh$hc9$1@sevenofnine.peak.org>

Okay, I know this is going to sound soooo non-unix, but is there an ide that
supports perl out there. VB is killing me but I need to be able to debug
script code before running huge databas processing tasks that call shared
libs... i guess the ultimate would be an ide that supports c,php, and perl,
but that's the breaks i guess....

Thanks,
Jeff.

--
Jeff D. Hamann
Hamann, Donald and Associates
PO Box 1421
Corvallis, Oregon USA 97339-1421
541-740-5988
jeff_hamann@hamanndonald.com
www.hamanndonald.com





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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 1334
***************************************


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