[17381] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4803 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 3 11:05:28 2000

Date: Fri, 3 Nov 2000 08:05:13 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <973267512-v9-i4803@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 3 Nov 2000     Volume: 9 Number: 4803

Today's topics:
        #! syntax <kccheng@soliton.phys.sinica.edu.tw>
    Re: 1+(-1)=? can be 0 or 2, depending on context <joe+usenet@sunstarsys.com>
    Re: Changing user quota at FreeBSD <bart.lateur@skynet.be>
    Re: Communicating with a child process (Anno Siegel)
        Continuous file modification age monitor nm_777@my-deja.com
        Continuous file modification age monitoring nm_777@my-deja.com
    Re: Continuous file modification age monitoring (Tom Christiansen)
        Cookies dauwe@my-deja.com
    Re: Double fork trick: why does grandkid avoid becoming (Anno Siegel)
    Re: embedded variables in a file (Tad McClellan)
    Re: garbage collecting hashes are slow <fulko@wecan.com>
    Re: garbage collecting hashes are slow (Anno Siegel)
    Re: garbage collecting hashes are slow <fulko@wecan.com>
    Re: garbage collecting hashes are slow (Anno Siegel)
    Re: Getting Perl to wait for another Program (Tad McClellan)
        http request with back button junk_npomfret@my-deja.com
    Re: http request with back button (Clay Irving)
    Re: http request with back button <flavell@mail.cern.ch>
    Re: http request with back button <admin@salvador.venice.ca.us>
    Re: http request with back button <joe+usenet@sunstarsys.com>
    Re: Is there a way to get all PID's within Perl ? <montuori@arrakisplanet.com>
        Microsoft SQL server <glodalec@yahoo.com>
        newbie perl <xxx@gabo.de>
    Re: newbie perl <eric@urbanrage.com>
    Re: newbie perl <not.my.real.email@bellglobal.com>
    Re: NT displaying and not not running .pl scripts <singhd@lucent.com>
        Onload right or wrong <markscott@barclays.net>
    Re: Onload right or wrong <xerxes_2k@my-deja.com>
    Re: Onload right or wrong <xerxes_2k@my-deja.com>
    Re: OOP and information hiding nobull@mail.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 3 Nov 2000 11:30:37 +0000 (UTC)
From: Kuang-chun Cheng <kccheng@soliton.phys.sinica.edu.tw>
Subject: #! syntax
Message-Id: <8tu7kt$2qk4$1@news1.sinica.edu.tw>

Hi,

	In tcl/tk, I can use 

		#!/bin/sh
		#	\
			exec wish "$0" ${1+"$@"}

	to avoid using absolute path of wish after #!.  Simply
	replace wish by perl doesn't work.

	My question is, how to use #! syntax to invoke perl if I
	don't know where perl is installed.  Well, I knew I can
	find the location of perl easily by "whereis", "find",
	"which" ... but that's not my question.  Thanks.  And
	please reply by email if passible.

			Kuang-Chun Cheng
			kccheng@soliton.com.tw


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

Date: 03 Nov 2000 07:47:14 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: 1+(-1)=? can be 0 or 2, depending on context
Message-Id: <m3aebhz0h9.fsf@mumonkan.sunstarsys.com>


I guess no one is able to reproduce the problem you're having 
except me. My output for

% perl -v 

This is perl, v5.6.0 built for i586-linux

is (warnings enabled)

Use of uninitialized value in concatenation (.) at ./new.pl line 48.
+++++old: coeff{i}=
+++++coe=+1, coeff{i}=1
+++++old: coeff{i}=1
+++++coe=-1, coeff{i}=2
Use of uninitialized value in concatenation (.) at ./new.pl line 48.
+++++old: coeff{i}=
+++++coe=+1, coeff{i}=1
+++++old: coeff{i}=1
+++++coe=-1, coeff{i}=0

This should be identical to yours (I checked on 5.005_03 as well,
but the output agrees with everyone else that's posted results.)  
I think your/my 5.6 has a compiler bug, so you should probably 
upgrade it.

If that's too much trouble, a quick fix would be to change

$coe = "$op$coe";

to 

$coe = "$op$coe" + 0;

However, I strongly recommend upgrading your perl executable as well, 
because if the same chef that served you this fine piece of 
italian quisine is responsible for the rest of your program, 
you're probably going to bang into a few more bugs.  The 
code snippet you sent belongs in a regression suite, not in
a real live piece of software.

I have a feeling that the entire chunk of code can be effectively
reduced to no more than a few lines, but in case you are the 
chef, I don't want to humiliate you for being so forthcoming with
your troubles. I did attach it below for the more curious amongst
us :)

HTH.


Helmut.Richter@lrz-muenchen.de (Helmut Richter) writes:

[...]

> The interpreter is  'perl, v5.6.0 built for sun4-solaris'.

[...]


> #! /client/bin/perl
>
> @irg = &parse_linear ('i-i');
> 
> @irg = &parse_linear ('1i-1i');
> 
> sub parse_linear {
>   my ($x) = $_[0];
>   my (@res);
>   my (@pos, %coeff, $term, $ipos, $const, $i, $op, $coe, $var);
> 
>   # parses a linear expression in variables, ...
> 
>   if ($x !~ /^[+-]/) {
>     $x = "+$x";
>   };
> 
>   return ('undef') if $x !~ /^([+-]\d*[A-Za-z]?)+$/;
> 
>   $x =~ s/([+-])/,$1/g;
>   $x = substr ($x, 1);
>   @res = split (/,/, $x);
>   $ipos = 0;
>   $const = 0;
> 
>   foreach $term (@res) {
>     $term =~ /^([+-])(\d*)([A-Za-z]?)$/;
>     $op = $1;
>     $coe = $2;
>     $var = $3;
>     return ('undef') if "$coe$var" eq '';
>     if ($coe eq '') {
> 
> # now the following statement causes the problem, but why?
> 
>       $coe = 1;
> 
>     };
>     $coe = "$op$coe";
>     if ($var eq '') {
>       $const += $coe;
>     } else {
>       if (! defined $coeff{$var}) {
>         $pos[$ipos++] = $var;
>       };
> 
> print "+++++old: coeff{$var}=$coeff{$var}\n";
> 
>       $coeff{$var} += $coe;
> 
> print "+++++coe=$coe, coeff{$var}=$coeff{$var}\n";
> 
>     };
>   };
> 
>   $pos[$ipos++] = '';
>   $coeff{''} = $const;
> 
>   undef @res;
>   for ($i=0; $i<$ipos; $i++) {
>     $var = $pos[$i];
>     if ($coeff{$var}) {
>       push (@res, $coeff{$var}, $var);
>     };
>   };
> 
>   return (@res);
> }


-- 
Joe Schaefer


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

Date: Fri, 03 Nov 2000 13:44:59 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Changing user quota at FreeBSD
Message-Id: <cbg50tk9jnutd7jftpf30bjf9db41t6ncm@4ax.com>

Abigail wrote:

>And your Perl question is?

Hah, look who's back.

-- 
	Bart.


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

Date: 3 Nov 2000 15:53:00 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Communicating with a child process
Message-Id: <8tun0s$nr3$1@lublin.zrz.tu-berlin.de>

Tim Conrow  <tim@ipac.caltech.edu> wrote in comp.lang.perl.misc:
>Sean McAfee wrote:
>> 
>> This seems like it should be an elementary problem in IPC, but I just can't
>> seem to come up with a (simple) solution.  Argh!
>> 
>> In essence, my problem is this.  I fork a child process to act as a filter
>> by prepending all of its input lines with the line number:
>[code snipped ...] 
>> Now I want to change the code so that I can reset the line counter in
>> the child process from the parent process:
>> 
>> print PIPE "foo\nbar\nbaz\n";     # prints "1 foo", "2 bar", "3 baz"
>> # (do something)
>> print PIPE "baz\nbletch\nquux\n"; # prints "1 baz", "2 bletch", "3 quux"
>> 
>> Is this possible?  If so, how?  Every approach I've tried rapidly becomes
>> more complicated than my original solution (using a tied filehandle).
>
>Why not make "(do something)" do this:
>
>print "<<<RESET COUNTER>>>\n";
>
>and add a line like this to the child:
>
>$line = 0 if /^<<<RESET COUNTER>>>$/;

That doesn't work without some kind of protocol.  Of course, a viable
"protocol" may just state that "<<<RESET COUNTER>>>" doesn't appear
on a line by itself, but sometimes you can't enforce that.  If so,
you need a second channel to the kid.

In this case, where you only want a single parameterless action, a
signal may do.  Pick a signal and set up a handler (in the kid) that
resets the line counter.  You may have to set autoflush in the parent
to be sure the counter is reset on the next line you print.  None of
this has been tested.

Anno


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

Date: Fri, 03 Nov 2000 15:40:42 GMT
From: nm_777@my-deja.com
Subject: Continuous file modification age monitor
Message-Id: <8tum9p$dve$1@nnrp1.deja.com>

The following code is running with wrong result. It returns the same age
until stop and rerun. How can I get the real time age continuously?

while (1)
{
foreach (<*.lck>)
{
$age= -M ;
print "$_ $age\n";
}

}

Thanks!


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 03 Nov 2000 15:35:31 GMT
From: nm_777@my-deja.com
Subject: Continuous file modification age monitoring
Message-Id: <8tum02$dqu$1@nnrp1.deja.com>

the following code is returning the same age until
stop and rerun. Dows anybody knows how to return
the real time age with each print command?

while (1)
{
foreach (<*.lck>)
{
$age= -M ;
print "$_ $age\n";
}

}

Thanks!


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 3 Nov 2000 08:58:33 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: Continuous file modification age monitoring
Message-Id: <3a02e0a9@cs.colorado.edu>

In article <8tum02$dqu$1@nnrp1.deja.com>,  <nm_777@my-deja.com> wrote:
>the following code is returning the same age until
>stop and rerun. Dows anybody knows how to return
>the real time age with each print command?
>
>while (1)
>{
>foreach (<*.lck>)
>{
>$age= -M ;
>print "$_ $age\n";
>}
>
>}
>
>Thanks!

The Camel states (in the chapter on operators early on in the book,
within the section entitled, "Named Unary and File Test Operators"):

    File ages for C<-M>, C<-A>, and C<-C> are returned in days
    (including fractional days) since the time when the script
    started running. (This time is stored in the special variable
    C<$^T>/C<$BASETIME>.)  Thus, if the file changed after the
    script started, you would get a negative time. Note that most
    times (86,399 out of 86,400, on average) are fractional, so
    testing for equality with an integer without using the C<int>
    function is usually futile.  Examples:

	next unless -M $file > .5;      # files older than 12 hours
	&newfile if -M $file < 0;       # file is newer than process
	&mailwarning if int(-A) == 90;  # file ($_) accessed 90 days ago today

    To reset the script's start time to the current time, say this:

	$^T = time();

--tom


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

Date: Fri, 03 Nov 2000 12:47:08 GMT
From: dauwe@my-deja.com
Subject: Cookies
Message-Id: <8tuc4a$59t$1@nnrp1.deja.com>

Hello!
I would like to download some pages from the internet using a perl
script. Unfortunately the server  requires a web browser that supports
and accepts cookies. Since I don't want to use a browser but a perl
script, how can I enable cookies with perl??

Here is the script I've used:
use LWP::Simple;
$url =
'http://ojps.aip.org/journal_cgi/dbt?KEY=APPLAB&Volume=77&Issue=19';
$localfile = "apl,77,19,2000.html";
mirror($url, $localfile);

The file I get is just a warning, that I've been redirected.

This script produces the same result
use Win32::Internet;
$INET = new Win32::Internet();
$file
=$INET->FetchURL("http://ojps.aip.org/journal_cgi/dbt?KEY=APPLAB&Volume=
77&Issue=19");

Thanks for your help
Stefan




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 3 Nov 2000 13:40:44 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Double fork trick: why does grandkid avoid becoming a zombie?
Message-Id: <8tuf8s$nhr$1@lublin.zrz.tu-berlin.de>

Mark-Jason Dominus <mjd@plover.com> wrote in comp.lang.perl.misc:

>It is in an infinite loop waiting for one of its adopted children to
>die; when one does, init cleans up the corpse immediately.  In fact,
>that's the primary function of init.

Well, I'd say it's the secondary (and only) function of init after
its primary function (bringing up the system processes) is done.

Anno


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

Date: Fri, 3 Nov 2000 07:08:02 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: embedded variables in a file
Message-Id: <slrn905al2.1qp.tadmc@magna.metronet.com>


[ Yet one more tip:

  Please put your comments *following* the quoted text that you
  are commenting on.

  Please do not quote text that you are not going to comment on.
  Quote just enough to establish the context for your comments.
  Never quote an entire article. Never quote .signatures.

  See    news.announce.newusers   if you want to look like you
  know what you are doing while posting to Usenet.

  Thanks again.
]


[ snip 160 Jeopardy-quoted lines about using string eval ]


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


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

Date: Fri, 03 Nov 2000 08:31:46 -0500
From: Fulko Hew <fulko@wecan.com>
Subject: Re: garbage collecting hashes are slow
Message-Id: <3A02BE42.2781@wecan.com>

Gwyn Judd wrote:
> 
> I was shocked! How could Fulko Hew <fulko@wecan.com>
> say such a terrible thing:

I didn't want to say it!

> >My app generates and clears a large number of hashes.
> 
> >If you do the single sets, (on my machine) each set takes about
> >55 usec.  Adding the clear statement ups the loop time to 800 usec.
> 
> I don't get the same results as you with virtually the same code.

Remember its a sample, and the speed _really_ depends on whats been
happening before that sample code.  Basically I generate a hash that
has a few thousand items, a few dozen times.  Then I generate a few
hundreds of thousand hashes that contain one or two items.  Clearing
those small hashes sometimes takes a long time, but they are quick if
I skip that code that created and destroyed the big hashes.
So go figure?

> Can you post the script you use the do the benchmarking?

Unfortunately not. Its propriatary code.  It will take me some time
to build a test case that re-creates the same symptoms without the
special functionality. If you are interested (privately) I might
be able to send you the code, but I can't post it "as is".

> By the way, my informal testing suggest using undef on the hash is a
> little quicker than assigning an empty list to the hash while not
> clearing it at all is the quickest. Slowest of all is having %b a
> lexically scoped variable using my() and letting it go out of scope but
> the difference between all of them is not as huge as you say.

Yes, I found the same thing while looking for an answer.

-----------------------------------------------------------------------
Fulko Hew,                           Voice:  905-333-6000  x 6010
Senior Engineering Designer,         Direct: 905-333-6010
Northrop Grumman-Canada, Ltd.        Fax:    905-333-6050
777 Walkers Line,                    Home:   fulko%fkhew@wecan.com
Burlington, Ontario, Canada, L7N 2G1 Work:   fulko@wecan.com


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

Date: 3 Nov 2000 13:54:59 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: garbage collecting hashes are slow
Message-Id: <8tug3j$njq$1@lublin.zrz.tu-berlin.de>

Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote in comp.lang.perl.misc:
>I was shocked! How could Fulko Hew <fulko@wecan.com>
>say such a terrible thing:
>>My app generates and clears a large number of hashes.
>
>>If you do the single sets, (on my machine) each set takes about
>>55 usec.  Adding the clear statement ups the loop time to 800 usec.
>
>I don't get the same results as you with virtually the same code. Can
>you post the script you use the do the benchmarking?

The time to clear a hash depends not only of the apparent size of
the hash, but as well on the structure of the values that are stored
in it.  While the code the OP showed just assigned plain integers,
we don't know what the real thing does.

Anno


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

Date: Fri, 03 Nov 2000 10:11:00 -0500
From: Fulko Hew <fulko@wecan.com>
Subject: Re: garbage collecting hashes are slow
Message-Id: <3A02D584.446B@wecan.com>

Anno Siegel wrote:

> Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote in comp.lang.perl.misc:
> >I was shocked! How could Fulko Hew <fulko@wecan.com>
> >say such a terrible thing:
> >>My app generates and clears a large number of hashes.
> >
> >>If you do the single sets, (on my machine) each set takes about
> >>55 usec.  Adding the clear statement ups the loop time to 800 usec.
> >
> >I don't get the same results as you with virtually the same code. Can
> >you post the script you use the do the benchmarking?
> 
> The time to clear a hash depends not only of the apparent size of
> the hash, but as well on the structure of the values that are stored
> in it.  While the code the OP showed just assigned plain integers,
> we don't know what the real thing does.

Actually I was storing short (< 10 character) strings as the key
and the value.

----------------------------------------------------------------------
Fulko Hew,                           Voice:  905-333-6000  x 6010
Senior Engineering Designer,         Direct: 905-333-6010
Northrop Grumman-Canada, Ltd.        Fax:    905-333-6050
777 Walkers Line,                    Home:   fulko%fkhew@wecan.com
Burlington, Ontario, Canada, L7N 2G1 Work:   fulko@wecan.com


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

Date: 3 Nov 2000 15:34:21 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: garbage collecting hashes are slow
Message-Id: <8tultt$npj$1@lublin.zrz.tu-berlin.de>

Fulko Hew  <fulko@wecan.com> wrote in comp.lang.perl.misc:
>Anno Siegel wrote:
>
>> Gwyn Judd <tjla@guvfybir.qlaqaf.bet> wrote in comp.lang.perl.misc:
>> >I was shocked! How could Fulko Hew <fulko@wecan.com>
>> >say such a terrible thing:
>> >>My app generates and clears a large number of hashes.
>> >
>> >>If you do the single sets, (on my machine) each set takes about
>> >>55 usec.  Adding the clear statement ups the loop time to 800 usec.
>> >
>> >I don't get the same results as you with virtually the same code. Can
>> >you post the script you use the do the benchmarking?
>> 
>> The time to clear a hash depends not only of the apparent size of
>> the hash, but as well on the structure of the values that are stored
>> in it.  While the code the OP showed just assigned plain integers,
>> we don't know what the real thing does.
>
>Actually I was storing short (< 10 character) strings as the key
>and the value.

Ah, okay. That simplifies the matter.

Anno


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

Date: Fri, 3 Nov 2000 07:17:44 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Getting Perl to wait for another Program
Message-Id: <slrn905b78.1qp.tadmc@magna.metronet.com>

On Fri, 03 Nov 2000 08:28:51 GMT, sty2999@my-deja.com 
   <sty2999@my-deja.com> wrote:


>Is there some way to get the perl process to idle for a short peroid
>during the loop, so it doesn't suck up all the CPU cycles?


   perldoc -f sleep


>have it check every 10th of a second or so. I believe Perl has some
>sort of "wait" function but I think it only works in whole
>seconds...which is way to long a period.


The manual has some suggestions for getting better resolution.


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


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

Date: Fri, 03 Nov 2000 13:27:52 GMT
From: junk_npomfret@my-deja.com
Subject: http request with back button
Message-Id: <8tuegi$732$1@nnrp1.deja.com>

Without using JavaScript, and without geting a 'Page has expired'
message - how can I make my browser re-request a page with the user has
hit the back button.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 3 Nov 2000 14:29:49 GMT
From: clay@panix.com (Clay Irving)
Subject: Re: http request with back button
Message-Id: <slrn905iut.hm3.clay@panix3.panix.com>

On Fri, 03 Nov 2000 13:27:52 GMT, junk_npomfret@my-deja.com 
<junk_npomfret@my-deja.com> wrote:

>Without using JavaScript, and without geting a 'Page has expired'
>message - how can I make my browser re-request a page with the user has
>hit the back button.

The Java newsgroup is down the hall to the right...

-- 
Clay Irving <clay@panix.com>
When I was crossing the border into Canada, they asked if I had any firearms
with me.  I said, "Well, what do you need?"  - Steven Wright 


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

Date: Fri, 3 Nov 2000 15:22:36 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: http request with back button
Message-Id: <Pine.GHP.4.21.0011031521540.2473-100000@hpplus03.cern.ch>

On Fri, 3 Nov 2000 junk_npomfret@my-deja.com wrote:

> Without using JavaScript, and without geting a 'Page has expired'
> message - how can I make my browser re-request a page with the user has
> hit the back button.

And what was your Perl question?




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

Date: Fri, 03 Nov 2000 06:57:09 -0800
From: Salvador Peralta <admin@salvador.venice.ca.us>
Subject: Re: http request with back button
Message-Id: <3A02D244.4D19FF79@salvador.venice.ca.us>



Clay Irving wrote:
> 
> On Fri, 03 Nov 2000 13:27:52 GMT, junk_npomfret@my-deja.com
> <junk_npomfret@my-deja.com> wrote:
> 
> >Without using JavaScript, and without geting a 'Page has expired'
> >message - how can I make my browser re-request a page with the user has
> >hit the back button.
> 
> The Java newsgroup is down the hall to the right...

What does using this tag  <meta http-equiv="Pragma" content="no-cache">
on the originating document to prevent the browser from reading it from
cache have to do with Java?


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

Date: 03 Nov 2000 10:17:53 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: http request with back button
Message-Id: <m3vgu5xexq.fsf@mumonkan.sunstarsys.com>

Salvador Peralta <admin@salvador.venice.ca.us> writes:

> Clay Irving wrote:

[...]

> > The Java newsgroup is down the hall to the right...
> 
> What does using this tag  <meta http-equiv="Pragma" content="no-cache">
> on the originating document to prevent the browser from reading it from
> cache have to do with Java?

Generosity, I suppose :)

-- 
Joe Schaefer



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

Date: Fri, 3 Nov 2000 10:40:18 -0500 
From: kevin montuori <montuori@arrakisplanet.com>
Subject: Re: Is there a way to get all PID's within Perl ?
Message-Id: <ydyk8al2hei.fsf@kulon.arrakisplanet.com>

>>> Tom Christiansen writes:

  tc> In article <ydyn1fi2apc.fsf@kulon.arrakisplanet.com>, kevin
  tc> montuori <montuori@arrakisplanet.com> wrote: 

  tc> Moral of that story: don't use full paths.

  >> well, use a full path unless you set $ENV{PATH} yourself.

  tc> Well, maybe, in a few rare cases.  If you're using something
  tc> that's not standard, then *perhaps*.  But otherwise, what's the
  tc> use of a path then, if you aren't going to allow the user to
  tc> make their own decisions?

	i think it depends some on who the target audience is.  if
	you're writing software for general distribution, i agree with
	you wholeheartedly.  some in-house code is a little different,
	particularly if Perl is being used the same way a shell script
	would have been used back in the old days.

	if what you know you want root to run is /usr/bin/ps but some
	dim-witted systems administrator has (decided late one night
	to) put /usr/ucb first in root's path there are going to be
	issues with `ps -ef`.  while i believe the correct solution to
	this problem is to find a new SA, being explicit will prevent
	unpleasantness in the meantime.

	i suppose that handing off code to one's own systems people to
	run might be an unusual situation on c.l.p.m, as folks here
	seem to be running their code themselves or intending to
	distribute to the world at large.  your moral in that context
	makes excellent sense and i (for one) am always pleased when i
	don't have to fix hard-coded paths.  

	cheers,
	k.


-- 
kevin montuori

support independent booksellers -- http://www.booksense.com



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

Date: Fri, 3 Nov 2000 16:23:10 +0100
From: marvin <glodalec@yahoo.com>
Subject: Microsoft SQL server
Message-Id: <MPG.146cf6cd249c2b7898968e@news.siol.net>

Hi !

Does anybody know how to connect to Microsoft SQL server 7.00 via DBD 
driver and which one do I need.

I tried with
http://search.cpan.org/search?module=MSSQL::DBlib

but the page is not valid. (Taken from www.perlmodules.com)

Regards
Marvin


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

Date: Fri, 3 Nov 2000 14:34:18 +0100
From: "a1Josef Hauern" <xxx@gabo.de>
Subject: newbie perl
Message-Id: <8tuesp$8rtt$1@ID-36220.news.dfncis.de>

hi,

we got an apache. a cgi-bin scripts which is written in perl.  the perl
starts java program. but the classpath are not specified. how can specified
them?

my file.cgi looks like this

`export CLASSPATH=/pathoclasse“;  <this doesn“t work
`/usr/lib/jdk1.1.7/bin/java etc.....“;

my httpderrorlog looks like this: Can“t exec export .... Can“t find class
etc....

I think the problem is the export commando.

could you give me an advise?

thank you

josef
--





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

Date: Fri, 03 Nov 2000 08:07:29 -0600
From: eric <eric@urbanrage.com>
Subject: Re: newbie perl
Message-Id: <3A02C6A1.8A65B65B@urbanrage.com>

your environment in perl is available via the ENV hash

$ENV{'CLASSPATH'}="......";

Eric
  eric@urbanrage.com
  Brainbench MVP for Unix Programming
  http://www.brainbench.com

a1Josef Hauern wrote:
> 
> hi,
> 
> we got an apache. a cgi-bin scripts which is written in perl.  the perl
> starts java program. but the classpath are not specified. how can specified
> them?
> 
> my file.cgi looks like this
> 
> `export CLASSPATH=/pathoclasse“;  <this doesn“t work
> `/usr/lib/jdk1.1.7/bin/java etc.....“;
> 
> my httpderrorlog looks like this: Can“t exec export .... Can“t find class
> etc....
> 
> I think the problem is the export commando.
> 
> could you give me an advise?
> 
> thank you
> 
> josef
> --


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

Date: Fri, 03 Nov 2000 14:18:16 GMT
From: "MNJP" <not.my.real.email@bellglobal.com>
Subject: Re: newbie perl
Message-Id: <IOzM5.10103$1C6.404228@news20.bellglobal.com>

%ENV retrieves, sets and exports for you.

$ENV{"CLASSPATH"} = "blah";

"a1Josef Hauern" <xxx@gabo.de> wrote in message
news:8tuesp$8rtt$1@ID-36220.news.dfncis.de...
> hi,
>
> we got an apache. a cgi-bin scripts which is written in perl.  the perl
> starts java program. but the classpath are not specified. how can
specified
> them?
>
> my file.cgi looks like this
>
> `export CLASSPATH=/pathoclasse“;  <this doesn“t work
> `/usr/lib/jdk1.1.7/bin/java etc.....“;
>
> my httpderrorlog looks like this: Can“t exec export .... Can“t find class
> etc....
>
> I think the problem is the export commando.
>
> could you give me an advise?
>
> thank you
>
> josef
> --
>
>
>




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

Date: Fri, 03 Nov 2000 14:49:14 +0000
From: Daywan Singh <singhd@lucent.com>
Subject: Re: NT displaying and not not running .pl scripts
Message-Id: <3A02D06A.D5205A66@lucent.com>

philip_nicholas@my-deja.com wrote:
> 
> We have installed Active Perl on a client's machine running NT4 and
> scripts run at the command prompt.
> 
> However, when we try to access scripts via the Internet we get the text
> of the script in Internet Explorer, and a download process starts in
> Netscape. In other words, our webserver seems not recognize that .pl
> scripts should be run (see a very basic script at
> http://melbourne.butterworths.co.uk/cgi-bin/test.pl)
> 
> I would be grateful for any help with this problem
> 
> Philip Nicholas
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.
---------------------
If it is IIS4.0, check the properties by right-clicking on the web site.
Sometimes Perl is setup as:

perl %s %s

thus requiring two args: delete one of them and ensure that the .pl extension is
set. You might even have to add perl.exe against '.pl' through one of the
tabs/configuration.

DS


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

Date: Fri, 3 Nov 2000 12:51:48 -0000
From: "mark" <markscott@barclays.net>
Subject: Onload right or wrong
Message-Id: <3a02b4e3$1@news.jakinternet.co.uk>

Thanks in advance,
I'm trying to execute a Perl/CGI from a html.
I would like it to be executed automatically without user intervention,
I think I should be using <Onload>
But I can't get it to execute with out putting a link
or Button on the html doc?
Is there a way?




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

Date: Fri, 03 Nov 2000 13:47:38 GMT
From: arse <xerxes_2k@my-deja.com>
Subject: Re: Onload right or wrong
Message-Id: <8tuflo$806$1@nnrp1.deja.com>

u should use ssi.

like this
<!--#exec cgi="/cgi-bin/whatever.pl"-->
or <!--#include virtual="/cgi-bin/whatever.pl"-->

just stick that any where in the script
--
[][][]{}{}~~';:.<<//?|1¬!"£$$%^^&*(())__+/*+
oooh random characters i must be coool!


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 03 Nov 2000 13:49:07 GMT
From: arse <xerxes_2k@my-deja.com>
Subject: Re: Onload right or wrong
Message-Id: <8tufog$81b$1@nnrp1.deja.com>



> just stick that any where in the script

when i say script i mean html file.

--
[][][]{}{}~~';:.<<//?|1¬!"£$$%^^&*(())__+/*+
oooh random characters i must be coool!


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 03 Nov 2000 07:46:56 +0000
From: nobull@mail.com
Subject: Re: OOP and information hiding
Message-Id: <u9y9z1ebv3.fsf@wcl-l.bham.ac.uk>

"David Allen" <s2mdalle@titan.vcu.edu> writes:
> "A programmer who opens up the module and plays around with all the
> private little shiny bits that were safely locked up behind the
> interface contract has voided the warranty, and you shouldn't worry
> about their fate."     --- "perldoc perltoot"

That's fine until you get to the question of deriving new classes from
base classes that you don't own.

Most Perl objects are a blessed hash and all the private instance
varaibles of each level of the object's unheritance are all occupying
the same namespace.  You can get arround this by saying something like
"all instance variables should be in $self->{__PACKAGE__}" but you
have to decide this at the outset and there's a perfomance hit for
doing so. 

Another approach is the approach implemented by "use fields".  It is
better performance-wise but doesn't work so well for multiple
inheritance.


-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

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


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