[17142] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4554 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Oct 8 18:05:34 2000

Date: Sun, 8 Oct 2000 15: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: <971042712-v9-i4554@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 8 Oct 2000     Volume: 9 Number: 4554

Today's topics:
    Re: ActivePerl 5.6 on NT 4.0/IIS4 not working cbutler@nospaam.cbjd.net
    Re: ActivePerl 5.6 on NT 4.0/IIS4 not working cbutler@nospaam.cbjd.net
    Re: ActivePerl 5.6 on NT 4.0/IIS4 not working <mikecook@cigarpool.com>
    Re: ActivePerl 5.6 on NT 4.0/IIS4 not working cbutler@nospaam.cbjd.net
    Re: ActivePerl 5.6 on NT 4.0/IIS4 not working <mikecook@cigarpool.com>
    Re: beginner question (Mark-Jason Dominus)
    Re: Best definition of Perl so far in 19100 <wendigo@deathstar.jabberwock.org>
    Re: Best definition of Perl so far in 19100 <camerond@mail.uca.edu>
        Can't pipe from Perl to C <michaelr_41@hotmail.com>
    Re: Can't pipe from Perl to C (John J. Trammell)
    Re: CGI.pm and Tables question <jeff@vpservices.com>
    Re: Checking for existence of file <flavell@mail.cern.ch>
    Re: Checking for existence of file (Mark-Jason Dominus)
    Re: Checking for existence of file <g.soper@soundhouse.co.uk>
    Re: Checking for existence of file <g.soper@soundhouse.co.uk>
    Re: Checking for existence of file <g.soper@soundhouse.co.uk>
    Re: Comparing Perl and Java (Randal L. Schwartz)
    Re: Comparing Perl and Java <jschauma@netmeister.org>
    Re: Comparing Perl and Java <james@NOSPAM.demon.co.uk>
        Defining Headers for Module Mail::Mailer <dhighley@mail.highley-recommended.com>
    Re: Defining Headers for Module Mail::Mailer <tony_curtis32@yahoo.com>
    Re: Downloadable reference manual? (Clinton A. Pierce)
        dynamic install path (Michael P. Soulier)
    Re: dynamic install path (Michael P. Soulier)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 08 Oct 2000 18:49:35 GMT
From: cbutler@nospaam.cbjd.net
Subject: Re: ActivePerl 5.6 on NT 4.0/IIS4 not working
Message-Id: <39e2b797.99095603@news-server>

"Blindb" <blindb@hotmail.com> wrote:

>if you're talking about ex. "Hello" and "Calculator" etc.
>AFAIK, these are client-side scripts.

These are the examples that I am trying to run.  What is your point?

I could (but no longer can) run these examples from a browser on the server
but not on a browser located elsewhere.  I assume that there is something
wrong with my Perl setup.  I need to have Perl that is embedded in a web
page on the server, execute when access by a browser on another machine.

Thanks,
Charles

>
><cbutler@nospaam.cbjd.net> wrote in message
>news:39e2bf2f.61277274@news-server...
>> I've tried to setup the most recent version of ActivePerl 5.6 on a brand
>> new WinNT 4.0 webserver 128Mb RAM, SP4, IIS4.0.
>>
>> The PerlScript examples included with the release worked on the server but
>> would not work on a browser on a workstation accessing the webserver.
>>
>> Thinking that security setup might be a problem, I checked the settings
>for
>> the Perl directory.  Everyone had "full control".  I reset the directory
>> and subdirectories to give Everyone "full control".  PerlScript then
>ceased
>> to function on a browser on the server.
>>
>> The install notes for Perl for IIS 4.0 were followed (ie. application
>> mappings were set and Path was correct).
>>
>> Any ideas on what I need to do to get PerlScript to run on a NT 4.0
>> webserver?
>>



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

Date: Sun, 08 Oct 2000 18:57:14 GMT
From: cbutler@nospaam.cbjd.net
Subject: Re: ActivePerl 5.6 on NT 4.0/IIS4 not working
Message-Id: <39e3b938.99512553@news-server>

"Michael Cook" <mikecook@cigarpool.com> wrote:

>Perl must be set up as shellcgi & the default MIME type for Perl must be
>changed to execute. Read the AcitveState FAQ for IIS/Perl...
>    Michael

Can you point me to the specific location in the FAQ.  I read it but don't
find a reference to "shellcgi" or "MIME" (To bad it isn't searchable).

As I pointed out in my original message, I followed the install notes from
the ActiveState documentation; specifically:

>Click the Configuration button. This opens the Application Configuration dialog.
>
>Select the App Mappings tab and click the Add button. You see the Add/Edit Application Extension Mapping dialog.
>
>To run Perl as a CGI application, type the full path to Perl.EXE followed by %s %s. When a script is executed,
> the first %s will be replaced by the full path to the script, and the second %s will be replaced by the script parameters.
>
>To run Perl for ISAPI, type the full path to PerlIS.DLL. The %s %s is not required for ISAPI DLLs.
>
>In the Extension field, type .pl or .plx (or whatever extension you want to use).
>
>The application mapping is now complete. Click the OK button and click OK to dismiss any remaining dialogs/property 
>sheets.
>
>Close the IIS 4.0 Internet Service Manager.
>

If there is more to do, I would appreciate direction.

Charles





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

Date: Sun, 8 Oct 2000 12:09:22 -0700
From: "Michael Cook" <mikecook@cigarpool.com>
Subject: Re: ActivePerl 5.6 on NT 4.0/IIS4 not working
Message-Id: <XD3E5.406$fj.227067@news.uswest.net>

Charles:
    Here's the general FAQ:
http://www.activestate.com/Products/ActivePerl/docs/index.html
To get to the web stuff, on the left, click on 'Web Server Config', also
make sure you read the 'Windows 9x/NT/2000' section. My bad on the
shellcgi - I was using iPlanet & that was iPlanet specific. If you are using
IIS it doesn't apply. When I ran ActiveState with IIS, it didn't recognize
my Perl scrips either at first. I had to uninstall Perl, then make sure IIS
was serving properly, then reinstall Perl. When I did that it asked me if I
wanted to add IIS support, I clicked yes & it worked.
    Michael
--
== CigarPool ==
http://www.cigarpool.com

<cbutler@nospaam.cbjd.net> wrote in message
news:39e3b938.99512553@news-server...
> "Michael Cook" <mikecook@cigarpool.com> wrote:
>
> >Perl must be set up as shellcgi & the default MIME type for Perl must be
> >changed to execute. Read the AcitveState FAQ for IIS/Perl...
> >    Michael
>
> Can you point me to the specific location in the FAQ.  I read it but don't
> find a reference to "shellcgi" or "MIME" (To bad it isn't searchable).
>
> As I pointed out in my original message, I followed the install notes from
> the ActiveState documentation; specifically:
>
> >Click the Configuration button. This opens the Application Configuration
dialog.
> >
> >Select the App Mappings tab and click the Add button. You see the
Add/Edit Application Extension Mapping dialog.
> >
> >To run Perl as a CGI application, type the full path to Perl.EXE followed
by %s %s. When a script is executed,
> > the first %s will be replaced by the full path to the script, and the
second %s will be replaced by the script parameters.
> >
> >To run Perl for ISAPI, type the full path to PerlIS.DLL. The %s %s is not
required for ISAPI DLLs.
> >
> >In the Extension field, type .pl or .plx (or whatever extension you want
to use).
> >
> >The application mapping is now complete. Click the OK button and click OK
to dismiss any remaining dialogs/property
> >sheets.
> >
> >Close the IIS 4.0 Internet Service Manager.
> >
>
> If there is more to do, I would appreciate direction.
>
> Charles
>
>
>




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

Date: Sun, 08 Oct 2000 21:25:12 GMT
From: cbutler@nospaam.cbjd.net
Subject: Re: ActivePerl 5.6 on NT 4.0/IIS4 not working
Message-Id: <39e0e190.5846195@news-server>

It didn't work for me.

I uninstalled, removed the old Perl directory and reinstalled.  (The rights
have changed. Everyone is now "RX".)

Still no go.  Everything is setup as directed in the ActiveState
documentation for IIS 4.0.  The examples work when accessed via
d:\perl\html but not when accessed via the Internet ( http://cbjd.net/perl
 ) (I get the same errors when accessing this page at
http://www.activestate.com/Products/ActivePerl/docs/index.html using IE5.1)

The specific error that I get with "Calculator" is "A RunTime error has
occurred. Do you wish to debug?   Line: 178  Error: Object expected"

The "Hello" application works for VBScript but nothing happens with the
PerlScript button.

I've tried this on 2 different PCs with the exact same results.

Thanks,
Charles

"Michael Cook" <mikecook@cigarpool.com> wrote:

>Charles:
>    Here's the general FAQ:
>http://www.activestate.com/Products/ActivePerl/docs/index.html
>To get to the web stuff, on the left, click on 'Web Server Config', also
>make sure you read the 'Windows 9x/NT/2000' section. My bad on the
>shellcgi - I was using iPlanet & that was iPlanet specific. If you are using
>IIS it doesn't apply. When I ran ActiveState with IIS, it didn't recognize
>my Perl scrips either at first. I had to uninstall Perl, then make sure IIS
>was serving properly, then reinstall Perl. When I did that it asked me if I
>wanted to add IIS support, I clicked yes & it worked.
>    Michael



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

Date: Sun, 8 Oct 2000 14:36:18 -0700
From: "Michael Cook" <mikecook@cigarpool.com>
Subject: Re: ActivePerl 5.6 on NT 4.0/IIS4 not working
Message-Id: <7Q5E5.662$fj.295199@news.uswest.net>

Sorry Charles,
    I'm out of ideas...
        Michael
--
== CigarPool ==
http://www.cigarpool.com

<cbutler@nospaam.cbjd.net> wrote in message
news:39e0e190.5846195@news-server...
> It didn't work for me.
>
> I uninstalled, removed the old Perl directory and reinstalled.  (The
rights
> have changed. Everyone is now "RX".)
>
> Still no go.  Everything is setup as directed in the ActiveState
> documentation for IIS 4.0.  The examples work when accessed via
> d:\perl\html but not when accessed via the Internet ( http://cbjd.net/perl
>  ) (I get the same errors when accessing this page at
> http://www.activestate.com/Products/ActivePerl/docs/index.html using
IE5.1)
>
> The specific error that I get with "Calculator" is "A RunTime error has
> occurred. Do you wish to debug?   Line: 178  Error: Object expected"
>
> The "Hello" application works for VBScript but nothing happens with the
> PerlScript button.
>
> I've tried this on 2 different PCs with the exact same results.
>
> Thanks,
> Charles
>
> "Michael Cook" <mikecook@cigarpool.com> wrote:
>
> >Charles:
> >    Here's the general FAQ:
> >http://www.activestate.com/Products/ActivePerl/docs/index.html
> >To get to the web stuff, on the left, click on 'Web Server Config', also
> >make sure you read the 'Windows 9x/NT/2000' section. My bad on the
> >shellcgi - I was using iPlanet & that was iPlanet specific. If you are
using
> >IIS it doesn't apply. When I ran ActiveState with IIS, it didn't
recognize
> >my Perl scrips either at first. I had to uninstall Perl, then make sure
IIS
> >was serving properly, then reinstall Perl. When I did that it asked me if
I
> >wanted to add IIS support, I clicked yes & it worked.
> >    Michael
>




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

Date: Sun, 08 Oct 2000 16:33:59 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: beginner question
Message-Id: <39e0c746.29a2$2f5@news.op.net>

In article <eli$0010051652@qz.little-neck.ny.us>,
Eli the Bearded  <elijah@workspot.net> wrote:
>	@days_of_week = (Sun,Mon,Tue,Wed,Thu,Fri,Sat);
>Me? I'm just surprised to learn the 'Unquoted string "x" may 
>clash with future reserved word' warning does not apply to
>those days of the week 

Future reserved words are guaranteed to be all-lowercase.



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

Date: 8 Oct 2000 14:18:44 -0400
From: Mark Rogaski <wendigo@deathstar.jabberwock.org>
Subject: Re: Best definition of Perl so far in 19100
Message-Id: <39e0ba82_2@news.eclipse.net>

An entity claiming to be brian d foy <brian@smithrenaud.com> wrote:

: you give the general public too much credit for determining
: such things without being explicitly told that false and
: dangerous statements are made in jest.  i hear these statements
: so often from people that really beleive them that i'm not inclined
: to give someone the benefit of the doubt -- especially when it is
: posted to a global messaging system.

In other words, there are people who actually make IMPORTANT ADMINISTRATIVE
DECISIONS based solely upon our ABSURDIST HUMOR.

Yargh!

Mark

-- 
Mark Rogaski                  | "God is REAL ... unless previously
wendigo@pobox.com             |                  declared as an INTEGER."
http://3503455489/~wendigo    |       I do not patronize amazon.com
__END__                       |       http://www.nowebpatents.org/


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

Date: Sun, 08 Oct 2000 14:13:17 -0500
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: Best definition of Perl so far in 19100
Message-Id: <39E0C74D.9CC2AD60@mail.uca.edu>

Rosemary I H Powell wrote:
> 
> 1) What is CGI?
> CGI (or Perl) is a specail Internet language that allows you
> to run 'programs'.....
> 
> 2) What is it useful for?
> Perl is EXTREMELY useful. It's main purpose is to add
> interactivity to a website.....
> 
> (found at http://members.freshhosting.co.uk/kb/cgi.html)

Actually, I liked (5) better:

"5) Whats the path to Perl? There is no path to perl, simply ignore the
first line of UNIX cgi scripts and no matter what it says it will run
fine."

And all this time I had been worrying about case, syntax, regexes, and
all that other stuff. If I had only realized that I just had to take out
the first line and I would have a *truly* DWIM language, I wouldn't have
gone to all the trouble.

Cameron

-- 
Cameron Dorey
Associate Professor of Chemistry
University of Central Arkansas
Phone: 501-450-5938
camerond@mail.uca.edu


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

Date: Sun, 08 Oct 2000 21:44:02 GMT
From: "Michael" <michaelr_41@hotmail.com>
Subject: Can't pipe from Perl to C
Message-Id: <CU5E5.4139$D81.153609@newsread2.prod.itd.earthlink.net>

Hi there -

This prints Hello, world! (so I could see it get in the script, but then
hangs on the read...

Here's some code...

Here's the .pl script...
[michael@linux /michael]$ cat test.pl
#!/usr/bin/perl -w

# test.pl - Trying to call a C program...

print "Hello, world!\n";
open(MYPROG,"./testreturn somedata|");
read(MYPROG,$answer,50);
close(MYPROG);

print $answer

And here's my C code...
[michael@linux /michael]$ cat testreturn.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

main() {
        int fifo[2];
        char *message = "This comes from the called program";
        char line[8];

        if (pipe(fifo) == -1) {
                fprintf(stderr,"Cannot create pipe\n");
                exit (1);
        }
        read (fifo[0],line,8);
        write (fifo[1],message, strlen(message)+1);

}

Any help greatly appreciated.








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

Date: 8 Oct 2000 21:58:14 GMT
From: trammell@nitz.hep.umn.edu (John J. Trammell)
Subject: Re: Can't pipe from Perl to C
Message-Id: <slrn8u1187.u4r.trammell@nitz.hep.umn.edu>

On Sun, 08 Oct 2000 21:44:02 GMT, Michael <michaelr_41@hotmail.com> wrote:
[cut]
>#!/usr/bin/perl -w
>
># test.pl - Trying to call a C program...
>
>print "Hello, world!\n";
>open(MYPROG,"./testreturn somedata|");
>read(MYPROG,$answer,50);
>close(MYPROG);
>
>print $answer
[C code cut]

On Perl:
You need to 'perldoc -f open' and read closely the part about pipes.
Also how about:

 open(MYPROG,"./testreturn somedata|") or die qq[open failed: $!];

On C:
Your C program ignores argv.  What does 'somedata' do?  It also never
prints anything to stdout.  What do you expect Perl to read?

Get a good Unix book and read up on pipes.

-- 
John J. Trammell
johntrammell@yahoo.com


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

Date: Sun, 08 Oct 2000 12:26:49 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: CGI.pm and Tables question
Message-Id: <39E0CA79.F187C6CF@vpservices.com>

[please post your response AFTER a suitably trimmed version of what you
are responding to, thanks]

Kurt Wagner wrote:
> 
> On Fri, 06 Oct 2000 20:46:29 -0700, Jeff Zucker <jeff@vpservices.com>
> wrote:
> 
> >Kurt Wagner wrote:
> >>
> >> Is there a way to format the contents of only a few cells in a row of
> >> a table?  I would like to change the background of a cell, but have
> >> the other cells in the same row unaffected.
> >>
> >> For example I use:
> >>
> >> td({-bgcolor=>red},['cell1text', 'cell2text'])
> >>
> >> but that changes the background color for the whole row.  Is there any
> >> way to change it for only certain cells?

You asked here how to change colors in certain cells.  I showed you how
to do that.

> >
> >    table(
> >        Tr( {-bgcolor=>'blue'},
> >        [
> >           th({-bgcolor=>'red'},'red'),
> >           th({-bgcolor=>'white'},'white'),
> >           th('blue')
> >        ])
> >    )
>
> Thanks for the tidbit, but is there a way to change the cell color
> background that are on the same row, the tidbit does a column of a
> single cell, say you have like a three by three table?

Have you no ability to generalize from an example?  Are you unable to
experiment by seeing what happens when you try differing color
combinations?  

My example shows how to set default colors for a single row and how to
change individual columns from that default within the row.  Given that
technique you can make any number of rows or columns any color you want
in any size table. If you want to set the default color for the entire
table, you do that with a hashref in the table() method.  If you want to
set a default color for a given row that is different from the table
default, you do that with a hashref in the Tr() method.  If you want to
set a cell color different from the default for the row, you do that
with a hashref in the th() method.   What is it you are missing? 

-- 
Jeff


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

Date: Sun, 8 Oct 2000 20:39:00 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Checking for existence of file
Message-Id: <Pine.GHP.4.21.0010082036070.2389-100000@hpplus03.cern.ch>

On Sun, 8 Oct 2000, Garry Williams wrote:

> >What is the '-e' and what does it do?
> 
> Try perldoc -f -X.  

I had no problem getting information using 'perldoc -f -e'
(the regular way of asking for documentation on any function).
What's all the fuss about?

> But another poster already pointed out the race condition that this 
> approach has.  Use sysopen() with O_WRONLY|O_EXCL|O_CREAT to avoid
> destroying existing data.

Good point.



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

Date: Sun, 08 Oct 2000 18:55:52 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: Checking for existence of file
Message-Id: <39e0c337.2934$34b@news.op.net>

In article <Pine.GHP.4.21.0010082036070.2389-100000@hpplus03.cern.ch>,
Alan J. Flavell <flavell@mail.cern.ch> wrote:
>I had no problem getting information using 'perldoc -f -e'
>(the regular way of asking for documentation on any function).
>What's all the fuss about?

This has only been supported for the past two years.  (Patch submitted
4 Oct 1998.)  






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

Date: Sun, 08 Oct 2000 19:54:47 +0100
From: Geoff Soper <g.soper@soundhouse.co.uk>
Subject: Re: Checking for existence of file
Message-Id: <4a0a6592a2g.soper@soundhouse.co.uk>

In article <Pine.GHP.4.21.0010081839360.10958-100000@hpplus03.cern.ch>,
   Alan J. Flavell <flavell@mail.cern.ch> wrote:
> On Sun, 8 Oct 2000, Geoff Soper wrote:

> > What is the '-e' and what does it do?

> What is documentation?

I had looked before asking and couldn't see how to look up the meaning of
a given function. 
As a non-programmer until extemely recently, I'm still figuring things out.
Thanks.

-- 
Geoff Soper
g.soper@soundhouse.co.uk
Take a look at the Soundhouse page http://www.soundhouse.co.uk/


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

Date: Sun, 08 Oct 2000 20:18:57 +0100
From: Geoff Soper <g.soper@soundhouse.co.uk>
Subject: Re: Checking for existence of file
Message-Id: <4a0a67c90bg.soper@soundhouse.co.uk>

In article <7f1E5.294$lw3.32114@eagle.america.net>,
   Garry Williams <garry@ifr.zvolve.net> wrote:
> Try perldoc -f -X.  

> But another poster already pointed out the race condition that this 

What is a 'race condition'?

> approach has.  Use sysopen() with O_WRONLY|O_EXCL|O_CREAT to avoid
> destroying existing data.

> See perldoc perlopentut:
>      
>      To open a file for writing, creating a new file which must
>      not previously exist:
>          
>          sysopen(FH, $path, O_WRONLY | O_EXCL | O_CREAT);

OK that seems to make sense.

Thanks

-- 
Geoff Soper
g.soper@soundhouse.co.uk
Take a look at the Soundhouse page http://www.soundhouse.co.uk/


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

Date: Sun, 08 Oct 2000 20:23:14 +0100
From: Geoff Soper <g.soper@soundhouse.co.uk>
Subject: Re: Checking for existence of file
Message-Id: <4a0a682d93g.soper@soundhouse.co.uk>

In article <Pine.A41.4.21.0010081049380.16452-100000@ginger.libs.uga.edu>,
   Brad Baxter <bmb@ginger.libs.uga.edu> wrote:
> Given the OP's reasons, the example above introduces a race condition.  
> The file could get created between the time you '-e' it and the time you
> open it for output.  Following is a snippet of code from a backup routine
> I use:

>     16  use Fcntl;
>     17  use POSIX qw(:errno_h);

OK, what does this provide me with that is used below?

>     ...
>     71    ### backup file can't already exist, so skip existing ones
>     72    for( my $serial = 0;; ) {
>     73      last if sysopen( BAK, $fmt . ++$serial,
>                 O_WRONLY|O_EXCL|O_CREAT );
>     74      die $! unless $! == EEXIST;              ### if other error

I don't understand this line, I assume EEXIST is the error returned when
the file exists? Why must it die otherwise, shouldn't there be a condition
for it to die?

>     75      die "Infinite loop" if $serial > 10_000; ### last resort
>     76    }

> I sysopen the file in such a way that the call will fail if the file
> exists, without damaging the file.  If the file doesn't exist, I've
> opened it in the same atomic process, avoiding the race condition.

I need to know the resultant name of the file, does $serial keep the 
value of the file name prefix after the loop terminates or will I have 
to pass its value to another variable?

> I'm not fond of the last resort loop check; any advice welcome.

It'll do for me, the chances of the file already existnig are very slim
already!

Thanks for your help!

-- 
Geoff Soper
g.soper@soundhouse.co.uk
Take a look at the Soundhouse page http://www.soundhouse.co.uk/


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

Date: 08 Oct 2000 11:05:09 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Comparing Perl and Java
Message-Id: <m1aecf43ai.fsf@halfdome.holdit.com>

>>>>> "Jan" == Jan Schaumann <jschauma@netmeister.org> writes:

Jan> so what do you think is better - a screwdriver or a hammer?
Jan> ;-P

I've gotten hammered drinking screwdrivers.  Does that count?

{grin}

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sun, 08 Oct 2000 15:14:05 +0400
From: "Jan Schaumann" <jschauma@netmeister.org>
Subject: Re: Comparing Perl and Java
Message-Id: <aJ3E5.37905$sB2.748327@news-east.usenetserver.com>

"Randal L. Schwartz" <merlyn@stonehenge.com> wrote:

>>>>>> "Jan" == Jan Schaumann <jschauma@netmeister.org> writes:
> 
> Jan> so what do you think is better - a screwdriver or a hammer? Jan>
> ;-P
> 
> I've gotten hammered drinking screwdrivers.  Does that count?

As soon as I posted the article I knew that screwdriver and hammer would
be abused in this example. I even did get to the "screwdriver == drink"
part myself, only the "getting hammered" escaped me. ;-)

-Jan

-- 
Jan Schaumann <http://www.netmeister.org>
Choose two:
(A) Fast       (B) Efficient
(C) Stable    (D) Windows 98 (counts as two)


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

Date: Sun, 8 Oct 2000 21:17:01 +0100
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: Comparing Perl and Java
Message-Id: <ant082001313fNdQ@oakseed.demon.co.uk>

In article <m3itr3grmi.fsf@solo.david-steuber.com>, David Steuber wrote:
>
> For now, it is pure Perl for me.  I've got CPAN (so long as I know
> what to look for).  I've got this group.  I've got mounds of docs.
> And Perl is just as RAD as any 4GL out there.

Sorry to seem ignorant, actually I should say sorry to BE ignorant,
but what does RAD mean please?

-- 
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02



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

Date: Sun, 08 Oct 2000 11:41:48 -0700
From: David Highley <dhighley@mail.highley-recommended.com>
Subject: Defining Headers for Module Mail::Mailer
Message-Id: <39E0BFEC.4FA3E1F9@mail.highley-recommended.com>

Can someone give me an example of how to define the headers when
using the module Mail::Mailer created bye Tim Bunce. I have looked
at the interface and also compared what I have done with other mailing
modules, but sendmail keeps telling me I need to define the Recipient.

--

Regards,

David Highley
Highley Recommended, Inc.
2927 SW 339th Street
Federal Way, WA 98023-7732

Phone: (206) 669-0081
FAX:   (253) 838-8509
Email: dhighley@highley-recommended.com
WEB:   http://www.highley-recommended.com





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

Date: Sun, 08 Oct 2000 19:07:52 GMT
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Defining Headers for Module Mail::Mailer
Message-Id: <87bswv5ewv.fsf@timmy.dummy.org>

>> On Sun, 08 Oct 2000 11:41:48 -0700,
>> David Highley <dhighley@mail.highley-recommended.com> said:

> Can someone give me an example of how to define the
> headers when using the module Mail::Mailer created bye
> Tim Bunce. I have looked at the interface and also
> compared what I have done with other mailing modules,
> but sendmail keeps telling me I need to define the
> Recipient.

What have you tried so far?  It's rather difficult to say
what's wrong if you don't show code.

hth
t


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

Date: Sun, 08 Oct 2000 20:06:46 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Downloadable reference manual?
Message-Id: <qt4E5.30864$hD4.7400213@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <ih0E5.20986$uq5.430134@news6-win.server.ntlworld.com>,
	"Siobhan" <soneill@hotmail.com> writes:
> I have the some of the FAQ documents for Perl, but is the a complete
> reference manual that I can download?

The only thing close to a complete reference for Perl is the perl
documentation itself.  It comes with every copy.


-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Sun, 08 Oct 2000 18:56:16 GMT
From: michael.soulier@home.com (Michael P. Soulier)
Subject: dynamic install path
Message-Id: <slrn8u1gqj.dhl.michael.soulier@cr946650-a.rchrd.home.com>


    Ok, here's the situation. I have a project written in Perl, and I broke up
the code into several files so that everyone on the team could have their own
module to implement. The final product is then put together with

$INSTALLDIR = "/usr/local/project";
use lib $INSTALLDIR;

use Module1;
use Module2;

etc...

    Where /usr/local/project is the install directory for the final project.
All the files are then lumped together in the same directory, and the main
executable is run, doing a use on all the modules, and off we go.
    This works fine, except that it requires me to hardcode the install
directory. When I'm developing, and I've pulled the code into a CVS sandbox, I
have to edit that path, and then remember to put it back before the commit.
Pain in the ass. 
    So, I tried this:

BEGIN {
    # Set the version here.
    $VERSION = "2.0 Alpha";
    print "Running version $VERSION\n";
    # Remove the executable name off of the $0 variable.
    my $installpath = $0;
    $installpath =~ s#/\w+(\.pl)?$##;
    $installpath =~ s/^programname\.pl$/./;
    print "Programname install directory is $installpath\n";
    # This will allow us to dynamically move the files
    # and still have the use lib path correct. However, 
    # it will not work through a symlink.
    $INSTALLDIR = $installpath;
}

    So this dynamically figures out where it's installed, and sets the install
directory appropriately. However, it won't work through a symlink because $0
points to the symlink, and it's standard procedure to make use of symlinks at
work like this. 
    Now, I'm about to add some readlink code to this to work though that, but
I was wondering if there is a better way. It's unfortunately not acceptable to
install the modules into our distribution, because that still doesn't solve
the problem of development versions in sandboxes. 

    Has anyone tried this before, or have any other suggestions for
larger-scale Perl development with multiple files? 

    Thanks for your time,

    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to UNIX
PGP Public Key: http://www.storm.ca/~msoulier/personal.html


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

Date: Sun, 08 Oct 2000 21:17:03 GMT
From: michael.soulier@home.com (Michael P. Soulier)
Subject: Re: dynamic install path
Message-Id: <slrn8u1p2i.dhl.michael.soulier@cr946650-a.rchrd.home.com>

    Well, this seems to work:

BEGIN {
    chomp ( my $progname = `basename $0` );
    my $installpath = $0;
    # If this is a symlink, resolve it.
    while (-l $installpath) {
        my $symlink = readlink $installpath;
        $installpath =~ s#/\w+(\.pl)?$##;
        $installpath =
            $symlink =~ m#^/# ? $symlink
                : $installpath . '/' . $symlink;
    }
    $installpath =~ s#/\w+(\.pl)?$##;
    $installpath =~ s/^$progname$/./;
}

    Are there any better solutions than hacking together the install path
though?

    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to UNIX
PGP Public Key: http://www.storm.ca/~msoulier/personal.html


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 4554
**************************************


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