[11657] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5257 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 30 13:07:41 1999

Date: Tue, 30 Mar 99 10:00:20 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 30 Mar 1999     Volume: 8 Number: 5257

Today's topics:
        "Taint-free" relative paths <dhenders@cpsgroup.com>
    Re: ./perl harness failures (Mike Wescott)
        advice needed domat6905@my-dejanews.com
    Re: AppendHash cookbook error??? <gnat@frii.com>
        Call an external program kiekko@my-dejanews.com
        Can Anyone Help With a Layered Variable Substitution Pr <nj2@soton.ac.uk>
        changing to numeric month (Christian M. Aranda)
        Compiling Perl5 with Watcom (Matti Johannes Kdrki)
        Converting Hex to ASCII (AdmFrodos)
    Re: flock() on Alpha/VMS <ru@swb.scn.de>
        FTP automation w/o module (Christian M. Aranda)
    Re: Getting parent process's environment variable to ch bradw@newbridge.com
    Re: Getting parent process's environment variable to ch (Abigail)
    Re: Graphics in Perl <smiles@wfubmc.edu>
    Re: I need to exchange email with a good database perso <newsposter@cthulhu.demon.nl>
    Re: Internal Timer (Chris Tremblay)
    Re: mget & mput ? <eyounes@aol.com>
    Re: NT Kernel in Perl <droby@copyright.com>
        Perl not running correctly (Joe Clark)
    Re: Perl question jgangemi@ccf.rutgers.edu
    Re: Perl script ignoring system() command <palm@ibs-aachen.de>
    Re: Perl with Access DB <coxad@falcon.jmu.edu>
        printing to LPT1 <davem@nortak.com>
    Re: PWS, Win95, CGI and Perl <jonsmirl@mediaone.com>
    Re: Question on how perl launches processes <bomr@lin01.triumf.ca>
        Setting directory privs in NT <carp@bton.ac.uk>
        use strict dpdq@my-dejanews.com
        Weird bug, need help frogsmock@my-dejanews.com
        What does this variable mean? solidice@my-dejanews.com
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 30 Mar 1999 10:54:30 -0600
From: Dale Henderson <dhenders@cpsgroup.com>
Subject: "Taint-free" relative paths
Message-Id: <87oglaex4p.fsf@camel.cpsgroup.com>


I'm trying to write CGI's in perl that are relocatable (i.e. they use
paths that are more or less relative). I also want to use Taint
checking. The way I am currently doing this is with the following two
lines.

my $prefix=$ENV{SCRIPT_FILENAME};
$prefix=~s/\/cgi-bin.*$//i;

The problem comes when I try to open a file who's path is specified
with the $prefix variable
e.g.
open (HTML, "<$prefix/htdocs/index.html");

when it comes to a line like this I get "insecure dependancy in open
at line ..." and the process dies.

So, is there a safer way to derive the $prefix varialble. If not, is
there a way to turn of taint checking in this instance only.

Thanks

-- 
Dale Henderson <mailto:dhenders@cpsgroup.com> 

"Imaginary universes are so much more beautiful than this stupidly-
constructed 'real' one..."  -- G. H. Hardy


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

Date: 30 Mar 1999 11:52:40 -0500
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
To: "Angus McLeod" <amcleod@caribsurf.com>
Subject: Re: ./perl harness failures
Message-Id: <x4pv5qvs14.fsf@cygnus.ColumbiaSC.NCR.COM>

[ courtesy cc emailed and posted ]
In article <nzpyrbqpnevofhespbz.f987zh0.pminews@news.caribsurf.com> Angus McLeod writes:

> I'm trying to compile perl on my machine (NCR 3435 & SVR4) but "make test"
> and "./perl harness" show errors:

>   Failed Test  Status Wstat Total Fail  Failed  List of failed
>   ------------------------------------------------------------
>   lib/io_sel.t      2   512    21   11  52.38%  11-21
>   op/groups.t     255 65280     2    2 100.00%  1-2
>   6 tests skipped, plus 19 subtests skipped.
>   Failed 2/186 test scripts, 98.92% okay. 13/6264 subtests failed, 99.79%
> okay.

Angus also wrote:
> This is the sorce distro I got at http://ncrinfo.ncr.com/contrib/svr4/
> and I know that a binary is available, but I want to try and compile in
> some additional modules.

I was going to tell you to use the config.sh that was packaged with
the source on ncrinfo, but it looks like it got removed when I tar'd
it all up. Fortunately, there seems to be a config.sh.old that
survived. Look at the differences between that and the one you've
generated. The most critical difference will be the definition of
libc. You need to use

	libc='/usr/ccs/lib/libc.so'

rather than the one Configure picks automagically. That should get
you well on your way to recompiling the whole thing.

On the other hand, there should be no need to recompile perl just to
add some new modules. Most should be capable of addition without the
original source. Moreover, the perl5.005_02 package on ncrinfo
contains a number of modules that weren't distributed with perl5.004.

What modules do you want to add? Perhaps I'll put them into the archive.

-- 
	-Mike Wescott
	 mike.wescott@ColumbiaSC.NCR.COM


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

Date: Tue, 30 Mar 1999 15:02:30 GMT
From: domat6905@my-dejanews.com
Subject: advice needed
Message-Id: <7dqp1v$ing$1@nnrp1.dejanews.com>

I want to execute an external program and then show it's output on a web page.
The script reads input from a form. I'm using backticks in the script and I'm
assigning the output of the program to a variable, but nothing happens so far.
I'm asking for some help if possible. Here is part of the script:

----------------------------
#!/usr/local/bin/perl

require "cgi-lib.pl";

MAIN:
{

# Read in all the variables set by the form
&ReadParse(*input);

$tag = $input{'name'};
$r = `[ext_program] [-key] $tag`;

  # Print the header
  print &PrintHeader;
  print &HtmlTop ("");

  print <<ENDOFTEXT;

User $tag statistics: $r.
ENDOFTEXT
 ....
-----------------------

Thanks!

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 30 Mar 1999 09:51:59 -0700
From: Nathan Torkington <gnat@frii.com>
Subject: Re: AppendHash cookbook error???
Message-Id: <m3soamrkcw.fsf@gdsl166.dnvr.uswest.net>

Jay Glascoe <jglascoe@giss.nasa.gov> writes:
> stevef1061@my-dejanews.com wrote:
> > 
> <snip>
> >     push @{$self->{key}}, $value;
> <snip>
>                      ^^^
>                     $key

This is addressed in the latest set of errata we gave to O'Reilly
yesterday.  They should make their way online RSN.

Cheers;

Nat


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

Date: Tue, 30 Mar 1999 16:24:31 GMT
From: kiekko@my-dejanews.com
Subject: Call an external program
Message-Id: <7dqtrl$n2t$1@nnrp1.dejanews.com>

How would I call an external program from within a perl program.  Everything I
try doesn't work and it ends with a "Useless use of string in void context
at ./textconv line 11."

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 30 Mar 1999 16:21:33 +0100
From: "Neville Jennings" <nj2@soton.ac.uk>
Subject: Can Anyone Help With a Layered Variable Substitution Problem Please
Message-Id: <7dqq66$f1p$1@aspen.sucs.soton.ac.uk>

Hi,

I am trying to do the following in perl on a Unix platform;
(simplified to the relevant details - I hope)

perl program snippet

        $value_expireday = "3";

        while ($line = <INFILE>)
        {
                $out = "${line}" ;
                print $out ;
        }

the INFILE contains lines such as :

    VALUE=$value_expireday

When I print out the "line" I want to be able to substitute in the values of
e.g. $value_expireday rather than have it just write out $value_expireday

This means that I somehow have to evaluate the same line twice, once to get
the string containing $value_expireday from the $line variable, then again
to further substitute in the value of this variable.

I have been trying combinations of print and eval but had no luck.

Can anyone help ? I think it might be possible but I can work out how to
force the repeated evaluation of the expression, either over a series of
lines/commands or in one combined instruction.

Any help would be much appreciated

Neville





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

Date: Tue, 30 Mar 1999 18:50:01 GMT
From: christianarandaOUT@OUTyahoo.com (Christian M. Aranda)
Subject: changing to numeric month
Message-Id: <37021c27.10918169@news.bmc.com>

I wrote a small function which changes the written month (Jan Feb Mar,
etc.) to it's corresponding number (1 2 3, etc.).  Here is the
function:

$gmonth = "Dec";
@months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);

for ($x = 0; $x < @months; $x++) {
   if ($gmonth eq $months[$x]) {
      $monthnum = $x + 1;
      last;
   }
}

print "month number is $monthnum\n";

I am looking to improve this code because there must be a better way
to do this (perhaps a foreach, but I'm not sure how to go about it).
Commence the shredding!!  All suggestions are appreciated!

Christian M. Aranda


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

Date: 30 Mar 1999 16:54:57 GMT
From: makarki.NOSPAM@news.hit.fi (Matti Johannes Kdrki)
Subject: Compiling Perl5 with Watcom
Message-Id: <7dqvl1$ha3$1@news.hit.fi>


I tried to compile Perl5 with my Watcom C/C++ 11.0a compiler. Has anyone 
created a working makefile for Watcom? I'm trying to compile a Win32
version. Watcom should be compatible with Visual C++ 2.0 but I'm getting
some weird errors with the default makefile which is included in Perl
source. And yes, I've tried to modify that default makefile.


--
Matti J. Kdrki


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

Date: 30 Mar 1999 16:24:49 GMT
From: admfrodos@aol.com (AdmFrodos)
Subject: Converting Hex to ASCII
Message-Id: <19990330112449.16542.00000147@ng-fi1.aol.com>

I would like to write a little function that converts a buffer filled with
32-bit hexadecimal numbers to their ASCII character equivalents, for use as a
hex type editor function and with tcpdump. I don't know how to get 7-bits of
character data from the numbers, and I am a bit confused on how ASCII type
codes are stored.

Can anyone offer an explanation?

Thanks!
rt


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

Date: Tue, 30 Mar 1999 18:31:53 +0200
From: Dieter Ruppert <ru@swb.scn.de>
Subject: Re: flock() on Alpha/VMS
Message-Id: <3700FC79.BF58081B@swb.scn.de>

Techno wrote:
> 
> M.J.T. Guy wrote in message <7coqac$610$1@pegasus.csx.cam.ac.uk>...
> >Dan Sugalski  <sugalskd@netserve.ous.edu> wrote:
> >>
> >>The VMS port of perl doesn't support flock or fcntl at the moment.
> >>However... VMS has mandatory file locking--if you open a file for write,
> >>nobody else will be able to. (The open call will throw an error) You'll
> >>need a bit more checking on open to detect a locked file error, but you
> >>can skip flock entirely on VMS.
> >
> >Wouldn't it be politer, and assist portability, if flock() was implemented
> >as a no-op on this platform, since that is what it effectively is with
> >mandatory locking?
> >
> >
> >Mike Guy
> 
> Mike,
> 
> I couldn't agree more, especially as the error returned by flock() in $! is
> 'no more processes'.  This set me and my VMS admin guy off on a red-herring
> hunt as we couldn't see any problems with the way the account was set up !!

This is really odd, and it reveils an unexpected relationship to Unix SVR4:
they translate errno == EAGAIN (from mandatory file locking) to "No more
processes"...
Stevens (Advanced programming in the Unix environment) describes this as 
"nondescriptive message" in his explanation of mandatory file locking.

VMS has thus apparently somehow "inherited" this strange message (or perhaps
the other way?)


---------------------
D.Ruppert
RTS GmbH
Schwieberdingen/Germany
ru@swb.scn.de


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

Date: Tue, 30 Mar 1999 18:02:52 GMT
From: christianarandaOUT@OUTyahoo.com (Christian M. Aranda)
Subject: FTP automation w/o module
Message-Id: <37011009.7814666@news.bmc.com>

I have the need to automate an ftp action (put/get some files),
however I can not use a module because of sysadmin reasons (I know
we've all run into this).

My current thought is to put the module (Net::FTP) source code in my
script.  I have never attempted to do this before, so I don't know if
it will even work.  I assume it would, since it's just perl code,
right?

My other thought is to do something like:
(sorry.. it's off the top of my head)

`ftp $host <<ENDFTP
   user $name $pass
   prompt off
 ..
 ..
 ..
ENDFTP`

I'm not too sure if that would work, however I assume it would since
I've done similar things while going through Oracle (sqlplus).


All suggestions are welcome and appreciated!

Christian M. Aranda


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

Date: 30 Mar 1999 10:43:39 -0500
From: bradw@newbridge.com
Subject: Re: Getting parent process's environment variable to change when running a   perl script
Message-Id: <op1lngfhtjo.fsf@newbridge.com>

lr@hpl.hp.com (Larry Rosler) writes:

> 0800, Timothy Trinh <timothy.trinh@attws.com >says...
> > I am currently running perl5 on WinNT4.0 inside of a Z-Shell.  From what
> > I understand, when ever you run a perl script, it is run in a child
> > process.  In the child process, you can access all the environment
> > variables and make any modification to them within the child process.
> > When the script is done executing any modification you have made to the
> > environment variable does not affect the parent process.  How can I get
> > the modification or creation of environment variables to stick to the
> > parent process?
> 
> perlfaq8:  "I {changed directory, modified my environment} in a perl 
> script.  How come the change disappeared when I exited the script? How
> do I get my changes to be visible?"

Whilst this is very true and directly from the faq... :-) you can do this by
sourcing a shell script, that call a perl program, that creates a tmp
file that contains the changes you wish to make to the enviromental
variables, and then have the initial shell script source the tmp file
[how is that for a runon sentence?]. 

We do exactly that to build custom on the fly environments for the
various cad tools we support.

Total disclaimer: This works very nicely on Unix, and we use it to
support a login anywhere type of environment on SunOs, HP-UX, and
Solaris under csh, ksh, and tcsh. It relies on Unix's process magic
with sourcing scripts. I don't know if the same ability exists in NT.

Given that this is a Faq I am surprised that the Perl faq takes the
5th and points people at comp.unix.questions rather than supplying
more details.

Cheers,
bj

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
bradw@newbridge.com            Newbridge Networks Corporation
Brad Warkentin                 600 March Road, Kanata, Ontario K2K 2E6
CAE Architect                  (613) 599-3600 ext. 6117  FAX: 599-3654


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

Date: 30 Mar 1999 16:24:55 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Getting parent process's environment variable to change when running a  perl script
Message-Id: <7dqtsn$38f$1@client2.news.psi.net>

Timothy Trinh (timothy.trinh@attws.com) wrote on MMXXXVII September
MCMXCIII in <URL:news:3700277A.8A20BFC3@attws.com>:
[] I am currently running perl5 on WinNT4.0 inside of a Z-Shell.  From what
[] I understand, when ever you run a perl script, it is run in a child
[] process.  In the child process, you can access all the environment
[] variables and make any modification to them within the child process.
[] When the script is done executing any modification you have made to the
[] environment variable does not affect the parent process.  How can I get
[] the modification or creation of environment variables to stick to the
[] parent process?


You install VMS.



Abigail
-- 
perl -we '$_ = q ?4a75737420616e6f74686572205065726c204861636b65720as?;??;
          for (??;(??)x??;??)
              {??;s;(..)s?;qq ?print chr 0x$1 and \161 ss?;excess;??}'


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

Date: Mon, 29 Mar 1999 11:07:28 -0500
From: Steve Miles <smiles@wfubmc.edu>
Subject: Re: Graphics in Perl
Message-Id: <36FFA540.38954634@wfubmc.edu>

There's a module called GD.pm which handles graphics for Perl. A good book
just came out from O'Reilly called "Programming Web Graphics with Perl and GNU
Software" which you can easily find at Amazon.com and everything is
explained...



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

Date: Tue, 30 Mar 1999 10:22:14 -0500
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: I need to exchange email with a good database person.
Message-Id: <3700EC26.A67627E2@cthulhu.demon.nl>

Robert Saunders wrote:
> 
> I have some questions on a project coming up and I would like to
> exchange some emails with a good database person..

Perhaps posting this in a database group is more appropriate?

Erik


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

Date: Tue, 30 Mar 1999 15:18:30 GMT
From: anne@storm.ca (Chris Tremblay)
Subject: Re: Internal Timer
Message-Id: <3701ea21.57264850@news.storm.ca>


If you are on a Unix box you  can do a cron job.
If you are on a Windows box You could probably could in for it to wait
for 5 minutes and to loop until a certain key sequence is put in.

On Tue, 30 Mar 1999 21:53:24 -0800, "Alvin Yong"
<alyong@mbox3.singnet.com.sg> wrote:

>Hi,
>   I need some urgent help in perl...I wonder if I cld use an internal timer
>function or code one so I can execute my main program every 5 mins, do I
>have resort to writing a very large loop or do I have to use an external
>scheduler program to automate that.....also can I open a connection to a
>Unix server and execute unix commands on it while my program sits on an NT
>server...I need help pls !!!
>
>al
>



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

Date: Tue, 30 Mar 1999 18:14:01 +0200
From: "Ysteric's" <eyounes@aol.com>
Subject: Re: mget & mput ?
Message-Id: <7dqsuh$f3q@news.vtcom.fr>

@All = $ftp->dir("rech*"); # you can specify jockers

foreach $x (@All) {
 $ftp->get($x);
}

Eric






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

Date: Tue, 30 Mar 1999 16:08:03 GMT
From: Don Roby <droby@copyright.com>
Subject: Re: NT Kernel in Perl
Message-Id: <7dqsst$m3o$1@nnrp1.dejanews.com>

In article <x7yakfwnqb.fsf@home.sysarch.com>,
  Uri Guttman <uri@home.sysarch.com> wrote:
> >>>>> "CS" == Christopher Spence <ComputerShoppe@mediaone.net> writes:
>
>   CS> I am trying to rewrite the NT Kernel in Perl hoping i can get some
>   CS> performance gains.  Anyone want to help?
>
>   CS> :)
>
> check out larry wall's view on this theme:
>
> http://segfault.org/story.phtml?mode=2&id=36fc3f8c-0138b980
>

Wonderful!  Makes me nostalgic for the first OS written in Basic (RSTS/E). 
;-)

So has the kernel rewrite been officially added to the PPT project yet?

--
Don Roby

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 30 Mar 1999 07:43:52 -0800
From: jclark@asterion.com (Joe Clark)
Subject: Perl not running correctly
Message-Id: <bk6M2.749$dF4.3113829@WReNphoon1>

Using SCO Unix server with Perl installed, when I call my Perl script from a
browser, it simple brings up the Perl script source into my browser window
without running the script.

Any ideas?

Thanks in advance,
Joe
jclark@asterion.com



**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****


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

Date: Tue, 30 Mar 1999 15:46:40 GMT
From: jgangemi@ccf.rutgers.edu
Subject: Re: Perl question
Message-Id: <7dqrkt$kvd$1@nnrp1.dejanews.com>

In article <36f56f64.91746384@news.truman.edu>,
  q969@truman.edu wrote:

> It works fine except when a user tries to enter multiple lines
> separated by an enter (newline).  In this case, perl only displays the
> first line (i.e. everything up to the newline character).  I've been
> told that this is because a newline is a default record delimeter.
>
> I've tried to use the =~ command to parse out newlines and replace
> them with spaces (though any character would do).  The command I've
> used is $value[$n] =~ s/\n/ /;  But this never works (I've tried
> changing the 's' to a 'tr').  I get the same output to the text file
> whether I include this line or not.

  try this :  $value[$n] =~ s/.\n/\ /g;

  I was having the same problem, and this fixed it.

-Jae

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 30 Mar 1999 17:35:46 +0200
From: "G.Palm" <palm@ibs-aachen.de>
To: c_evans@my-dejanews.com
Subject: Re: Perl script ignoring system() command
Message-Id: <3700EF51.39A2CE6E@ibs-aachen.de>

I had the same problem with our Intranet-Server (NT 4.0 with  IIS 4, so
my solution only applies for that).

1.)  If you haven4t already done so, run the following command from
C:\winnt\system32\inetsrv\adminsamples:
adsutil.vbs  set  w3svc/1/CreateCGIWithNewConsole 1
(Go to http://www.4images.com/ntperl/iis4.htm for more information)

2.) Make sure the permission to run scripts is set for your web (set
in MMC, properties of the web, Home-Directory, under Application
settings)

3.) The 4anonymous4 IIS-Useraccount (usually IUSR_Server) needs to
have sufficient rights for the NT-System-Directories and the directory
where blat.exe is stored in.
You can test this by either giving IUSR_Server read and execute (RX)
rights on c:\winnt and c:\winnt\system32 or by setting up a test-web with
another NT-User as 4Anonymous User Account4 for this special web.
The latter method is easier to undo, so I would prefer trying this one.

This worked for me. I4m not an NT expert and I don4t know why I had to
give the IUSR_Server-User explicit RX-rights an the System-Dirs.
As I said above, I4m running NT on an Intranet only so security issues aren4t
a major concern for me.

Hope this helps,
GPa


c_evans@my-dejanews.com wrote:

> Hey, I'm trying to send email using blat in a perl script on NT. The system
> call to blat is being ignored. The system command won't execute anything. It
> works fine on one web server and gets ignored on another.  Here is the system
> command:
>
> system ("blat $tempfile -t tome@me.com ");
>
> The Path isn't an issue because I include the full path. Blat works fine from
> the command line but choaks in the Perl Script. It doesn't error, its just
> ignored.  It must be a server config issue because it works on one server but
> not another. Any thoughts?
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own



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

Date: 30 Mar 1999 15:40:18 GMT
From: Andrew Cox <coxad@falcon.jmu.edu>
Subject: Re: Perl with Access DB
Message-Id: <7dqr92$6tu$1@lark.jmu.edu>

Well, here's a web site that you can use to create an mSQL database from
an Access one (don't know if that'd help you or not).  All you have to do
is cut and paste the txt document into an Access query.  Here's the
address:

http://www.mysql.com/Contrib/exportsql.txt

Now all you need to do is figure out how to retrieve data from the mSQL
database which should be a bit easier.

Andrew

Mark Choi <choic@cs.man.ac.uk> wrote:
> Hi mates

> Do you know how to retrieve data from an Access DB using Perl? Anyone
> got a script about it??

> Thank for for your time.

> Mark



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

Date: Tue, 30 Mar 1999 10:18:16 -0500
From: "Dave McIntyre" <davem@nortak.com>
Subject: printing to LPT1
Message-Id: <7dqpsq$fs9$1@nntp2.uunet.ca>


Does anyone know if you can print directly to LPT1 on NT?
In the ActiveState FAQ it says you can open a serial port
directly, ie:

open( PORT, "+>COM1" ) or die "Can't open COM1: $!";

So I'm wondering if you can do the same to LPT1.
I tried:

 open( PORT, "+>LPT1" ) or die "Can't open LPT1: $!";
 print PORT "testing";

with no success.


Thanks,
Dave McIntyre





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

Date: Tue, 30 Mar 1999 10:27:52 -0500
From: "Jon Smirl" <jonsmirl@mediaone.com>
Subject: Re: PWS, Win95, CGI and Perl
Message-Id: <r36M2.4$cK1.302@wbnws01>

Next you need to move up to Apache/mod_perl on Win95 & Win/NT. PerlIS
doesn't support persistent db connections and this makes a really big
performance difference.

PerlIS ---- loads Perl into memory
mod_perl ----- loads Perl into memory, caches compiled versions of your
scripts, allows caching of things like db connections. Lot's of neat code in
Apache:: modules.

ActiveState sells a product like mod_perl for PerlIS, but why bother when
Apache/mod_perl are free and portable across Win95/NT and Unix.

--
Jon Smirl
jonsmirl@mediaone.net




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

Date: 30 Mar 1999 16:48:53 GMT
From: "Rod B. Nussbaumer" <bomr@lin01.triumf.ca>
Subject: Re: Question on how perl launches processes
Message-Id: <7dqv9l$p3g$2@nntp.ucs.ubc.ca>

Rod B. Nussbaumer <bomr@lin01.triumf.ca> wrote:

Sorry to followup my own posting, but I have added info that
maybe someone can use to help me.

>Perl Gurus:

>I am not sure this is completely a perl question, but since it 
>arises in the context of a perl progamming exercise, I will ask
>it.

>I am attempting to open a file, by piping the ouptput from
>the 'ps' program into my perl file, like this (excuse typos,
>this is from memory):

>	$Status = open( PSOUT, "/usr/bin/ps -agluwx |" );

>This is being done on a Solaris machine, which has two versions
>of ps, each behaving differently, and both taking different 
>command line args.

Posing this question to the folks over on comp.unix.solaris,
I got the answer that 'tcsh is broken and you can make it 
behave like perl and sh by upgrading it;' which sort of answers
my question, except I prefer the broken version, and would
like perl to be broken in the same way ;-)

So, how can I coerce perl to invoke the same version of ps
that tcsh is presently using?

Thanks,

	---   rod.




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

Date: Tue, 30 Mar 1999 14:10:03 +0100
From: "Cameron Paine" <carp@bton.ac.uk>
Subject: Setting directory privs in NT
Message-Id: <7dqion$8km$1@saturn.bton.ac.uk>

Hello everyone. This may sound a bit dopy, but here goes.

I have an NT 4 server, (SP4), and I want to migrate a set of users onto this
new server. I have a small PERL script to create the directories in the
right places, but upon creating the dirs the privs are set to exactly the
same as the enclosing folder.

Now I am either stupid, (very possible), or missing something. I am using

    mkdir($fields[0],0700);

Where $fields is the name of the dir that I want to use. Which should give
RWX for the owner and nothing to anyone else. Not the case. Now is this
simply because I am the administrator?

I am quite happy to change the privs later, but PERL doesn't seem to have a
function for that. I have played with umask and not got much

Any ideas?

Cameron,
xxx.




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

Date: Tue, 30 Mar 1999 17:24:48 GMT
From: dpdq@my-dejanews.com
Subject: use strict
Message-Id: <7dr1cl$qee$1@nnrp1.dejanews.com>

Hi,

The following code

	use strict;
	$a = 1;
	print "$a\n";

works on my Ultra5 and Linux machines, both running perl5.
As I understand, it should not work.  Anybody know why?
Email appreciated since I don't check newsgroup much.
Thanks!

PQ

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 30 Mar 1999 16:35:45 GMT
From: frogsmock@my-dejanews.com
Subject: Weird bug, need help
Message-Id: <7dquh0$nog$1@nnrp1.dejanews.com>

Hi folks,

Okay, most bugs have a logical explanation, and this one probably does too,
but it's certainly weird to me.

On rare occasions, I get the error message:  "Can't coerce GLOB to string in
entersub at /web/docs/list.phtml line 1300."  This is in a perl script running
under mod_perl.  Here's what I consider "weird":

   * As far as I know, I'm not using any GLOBs.  I'm semi-new, so I'm still
kinda fuzzy on symbol tables and such, but I'd have to have an asterisk
somewhere in my code to be using a glob, right?  I have 2, both used correctly
as part of a regex.

  * This bug seems to occur randomly and rarely.  I know running under
mod_perl can cause seemingly random behavior, but this seems too rare for
that. Everything will be fine for *days*, and then suddenly this will appear
for no apparent reason.  I'm running w/ 'use strict' and 'use diagnostics'.

  * The bug seems to occur AFTER my script is done executing.  The script
generates a web page, displays the closing HTML tag, and THEN the error
appears. It doesn't seem to interrupt the flow of my code at all, nor produce
any unwanted effects except the annoying message sent to the browser.

  * The error is sent to the browser, but not the apache error_logs.  I've
never seen this before.  For every other error I've seen, it gets written to
the browser and the log.

Can anyone offer advice on what might be causing this, or how I might go about
tracking it down?  Incidentally, I've found the line number reported in the
error message to be of limited use, as it doesn't seem to account for comments
or whitespace or something (the line number as Perl reports it doesn't seem to
match the line number I think it means - any tips on navigating to the actual
error line number?).

Thanks!

Jim

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Tue, 30 Mar 1999 15:58:18 GMT
From: solidice@my-dejanews.com
Subject: What does this variable mean?
Message-Id: <7dqsal$li6$1@nnrp1.dejanews.com>

$salt = substr($pwd, 0, 2);

What does this mean? Or can someone give me a link with a description of all
the CGI script variables?

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 5257
**************************************

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