[18863] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1031 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 31 21:05:42 2001

Date: Thu, 31 May 2001 18:05:16 -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: <991357516-v10-i1031@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 31 May 2001     Volume: 10 Number: 1031

Today's topics:
        *plonk* (was Re: test) (Tad McClellan)
    Re: *plonk* (was Re: test) <godzilla@stomp.stomp.tokyo>
    Re: *plonk* (was Re: test) <no@spam.thanks>
    Re: *plonk* (was Re: test) <godzilla@stomp.stomp.tokyo>
    Re: Appending to  a Text file <no@spam.please>
    Re: Can't get size value back when using $ftp->size <jdrumm@blazenetme.net>
    Re: FLOCK numericals? <enough@spam.already>
    Re: Frustrated people (not) answering questions <comdog@panix.com>
    Re: Frustrated people (not) answering questions <comdog@panix.com>
    Re: Frustrated people (not) answering questions <no@spam.please>
    Re: Frustrated people (not) answering questions <comdog@panix.com>
    Re: generating powerpoint presentations in perl <rsherman@ce.gatech.edu>
    Re: Getting Users' IP <flavell@mail.cern.ch>
    Re: Getting Users' IP <comdog@panix.com>
        Help with Understanding a Code Fragment <skpurcell@hotmail.com>
    Re: Help with Understanding a Code Fragment <der.prinz@gmx.net>
        NT environment variables <jon@zerodb.demon.co.uk>
    Re: NT environment variables (Damian James)
    Re: NT environment variables <wyzelli@yahoo.com>
    Re: NT environment variables <jurgenex@hotmail.com>
    Re: OT uploading to remote host with Apache for windows <davsoming@lineone.net>
    Re: OT uploading to remote host with Apache for windows <bart.lateur@skynet.be>
    Re: parsing perl again (Jordan Dimov)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 31 May 2001 18:30:16 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: *plonk* (was Re: test)
Message-Id: <slrn9hdhfo.6e2.tadmc@tadmc26.august.net>

Jim Liebgott <jliebgot@eni.net> wrote:

>this will never match


   % testers in non-test newsgroup
   Score:: -9998
           From: jliebgot@eni\.net


this will match from now on though.


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


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

Date: Thu, 31 May 2001 16:52:10 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: *plonk* (was Re: test)
Message-Id: <3B16D92A.2843101@stomp.stomp.tokyo>

Tad McClellan wrote:

> Jim Liebgott wrote:
 
> > this will never match
 
>    % testers in non-test newsgroup
>    Score:: -9998
>            From: jliebgot@eni\.net
 
> this will match from now on though.
 

Temptation overwhelms me on this.

Our newsgroup is being spammed with troll
articles out of comp.object as you know.

I have objected three times to this spam
out of comp.object, once in both our group
and the other, twice only in the other group.
Verbugger objected once in both groups.

Rather ironic this troll spam FAQ so closely
replicates your own personal FAQ for this group,
almost to the letter in format.

Here you are and all others, not vocalizing
a single complaint about this newsgroup being
troll spammed repeatedly, yet a person makes
two inappropriate test posts here and, you
totally wig-out, thump your chest and make
a subtle suggestion for all to killfile this
person wrongly posting tests here.

No objection by you and others to copious troll spam.
Major objection to two test posts, however.

Mr. McClellan, you well exemplify the rancid hypocrisy
running amok within this newsgroup.


Godzilla!   No. 1 Killfiled Perl Hacker.


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

Date: 1 Jun 2001 01:28:13 GMT
From: "Not Important" <no@spam.thanks>
Subject: Re: *plonk* (was Re: test)
Message-Id: <3b16e19d$1@news2.mibx.net>


If you know you are killfilled, then wouldn't this post be akin to screaming
through a megaphone at the back of the head of a deaf person?

"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
>Tad McClellan wrote:
>
>> Jim Liebgott wrote:
> 
>> > this will never match
> 
>>    % testers in non-test newsgroup
>>    Score:: -9998
>>            From: jliebgot@eni\.net
> 
>> this will match from now on though.
> 
>
>Temptation overwhelms me on this.
>
>Our newsgroup is being spammed with troll
>articles out of comp.object as you know.
>
>I have objected three times to this spam
>out of comp.object, once in both our group
>and the other, twice only in the other group.
>Verbugger objected once in both groups.
>
>Rather ironic this troll spam FAQ so closely
>replicates your own personal FAQ for this group,
>almost to the letter in format.
>
>Here you are and all others, not vocalizing
>a single complaint about this newsgroup being
>troll spammed repeatedly, yet a person makes
>two inappropriate test posts here and, you
>totally wig-out, thump your chest and make
>a subtle suggestion for all to killfile this
>person wrongly posting tests here.
>
>No objection by you and others to copious troll spam.
>Major objection to two test posts, however.
>
>Mr. McClellan, you well exemplify the rancid hypocrisy
>running amok within this newsgroup.
>
>
>Godzilla!   No. 1 Killfiled Perl Hacker.



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

Date: Thu, 31 May 2001 17:54:50 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: *plonk* (was Re: test)
Message-Id: <3B16E7DA.1E3B313F@stomp.stomp.tokyo>

Truly Not Important drooled:

> Godzilla! wrote:
> >Tad McClellan wrote:
> >> Jim Liebgott wrote:

(significant snippage)

> > Mr. McClellan, you well exemplify the rancid hypocrisy
> > running amok within this newsgroup.

 
> If you know you are killfilled, then wouldn't this post be akin to screaming
> through a megaphone at the back of the head of a deaf person?
 

I have elected to make three presumptions. My first presumption
is you support the troll spamming originating from comp.object.
A second personal presumption is you are too cowardly to make
use of a recognizable moniker, thus know you are doing wrong.
Finally, your lack of logic, your oxymoronic statement, clearly
indicates you are less than acceptably intelligent.

If I am killfiled, why are you responding with this idiotic tripe?


Godzilla!  Zorroette of Perl Perl Land.


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

Date: 1 Jun 2001 01:35:48 GMT
From: "Not Important" <no@spam.please>
Subject: Re: Appending to  a Text file
Message-Id: <3b16e364$1@news2.mibx.net>


That would give the same result (just with better error checking). His problem
stems from opening a file for writing, not appending. Should read:

open(CLIENTINFO,">>client.txt");

Henry Hartley <hartleh1@westat.com> wrote:
>"<< SilverSting >>" wrote:
>> 
>> Can anyone tell me how to append text to a file.
>> 
>> My open file code:
>> open(CLIENTINFO,">client.txt");
>
>first, you want to be sure the file was opened:
>
>open(CLIENTINFO,">client.txt") || die "Could not open client.txt:
>$!\n\n" ;
>print CLIENTINFO "A string you want printed to that file\n" ;
>
>You'll want to close the file later but I assume you know how to do
>that.
>
>-- 
>Henry Hartley



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

Date: Thu, 31 May 2001 19:29:25 -0400
From: Jeffrey Drumm <jdrumm@blazenetme.net>
Subject: Re: Can't get size value back when using $ftp->size
Message-Id: <1sjdhtchvp3n7t7m7l3rhf8eeof3950l2b@4ax.com>

[posted to comp.lang.perl.misc]

On 31 May 2001 13:16:41 -0700, as@inaday.com (Anand Sethupathy) wrote:

>Sorry about that, here is the cut and paste:
>
>$status = $ftp->size($file);
>print "Status: $status\n";
>
>Yes, we are using IIS 4.0 installed from the option pack. 
>
>Any thoughts?

For a start, please don't top-post. Quote relevant text, and trim anything
irrelevant.

What happens when you use the command line FTP client at the shell prompt,
with the following command:

ftp> quote SIZE <filename>

You should get a status code (213) and the file size back, in bytes. If you
don't, the problem's with your server and is therefore more appropriately
addressed in a Windows NT group.

If you *do* get a file size back, you may have a buggy version of Net::FTP
and should check for updates. I've used size() on both Win98SE and AIX
communicating with an IIS4.0 server and have had no problems. I'm using
version 2.40 of Net::FTP, with 2.12 of Net::CMD, 1.25 of IO::Socket:INET,
1.26 of IO::Socket, and 1.21 of IO::Handle.

-- 
 - Jeff Drumm

   Insert dumb Dubya quote here . . . there are plenty to choose from



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

Date: 1 Jun 2001 00:54:54 GMT
From: "Anonymous Coward" <enough@spam.already>
Subject: Re: FLOCK numericals?
Message-Id: <3b16d9ce$1@news2.mibx.net>



Additionally don't unlock a file before closing it unless you have a very
specific reason.  The close() call will unlock the file if it is locked.
 Unlocking a file before closing it can result in a classic race scenerio.
 If you do not know what this means then don't use LOCK_UN.

michel.dalle@usa.net (Michel Dalle) wrote:
>In article <thcvg02sgude65@corp.supernews.co.uk>, "David Soming" <davsoming@lineone.net>
>=====================
>OPERATION is one of LOCK_SH, LOCK_EX, or LOCK_UN, possibly
>combined with LOCK_NB. These constants are traditionally valued
>1, 2, 8 and 4, but you can use the symbolic names if you import them
>from the Fcntl module, either individually, or as a group using the ':flock'

>tag. LOCK_SH requests a shared lock, LOCK_EX requests an exclusive
>lock, and LOCK_UN releases a previously requested lock. If LOCK_NB is
>bitwise-or'ed with LOCK_SH or LOCK_EX then flock will return immediately

>rather than blocking waiting for the lock (check the return status to see
if
>you got it).

No Sig Here.


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

Date: Thu, 31 May 2001 19:39:19 +0800
From: brian d foy <comdog@panix.com>
Subject: Re: Frustrated people (not) answering questions
Message-Id: <comdog-7508CF.19391931052001@news.panix.com>

In article <9f62fk$2p87$1@agate.berkeley.edu>, Ryan Travis Tate 
<ryantate@OCF.Berkeley.EDU> wrote:

> brian d foy <comdog@panix.com> wrote:
>  | indeed,
>  | look at the fecundity of Matt W.'s crap programming.
> 
> your use of 'crap' as an adverb and any other rhetorical foibles in

you mean as an adjective?

> your history of posting to Usenet (to be fair, there may be none! :-)
> ) do not prevent you from making a meaningful contribition to the
> medium.

conversational discourse is not programming or software though.
i would fully expect to be castigated for errors in grammar,
diction, and structure if i were a professional writer (and hey,
i am -- but i also have a proofreader and an editor that i pay
to correct my mistakes). 

> likewise, Matt's Script Archive makes an important, meaningful
> contribution to the Web, even if the Perl isn't idiomatic. 

it is not his style that is in question.  his code creates
severe and serious security issues whereever it is installed.
these are not new issues.

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: Thu, 31 May 2001 19:42:03 +0800
From: brian d foy <comdog@panix.com>
Subject: Re: Frustrated people (not) answering questions
Message-Id: <comdog-432CD4.19420331052001@news.panix.com>

In article <im5dhtcdr0gfhp95v221av0tbvg9596rfc@4ax.com>, Lou Moran 
<lmoran@wtsg.com> wrote:

> On Thu, 31 May 2001 02:42:03 -0400, brian d foy <comdog@panix.com>
> wrote wonderful things about sparkplugs:
> 
> 
> >look at the fecundity of Matt W.'s crap programming.

> I don't know much about Matt W except that he is loathed here.  I do
> know a bit about poor crafted information posted to websites.

> Point being even if Matt W is as bad as you say he's still helping.

he is not helping.  he refuses to maintain or fix the severe
security issues in his code and he continues to distribute
code with known security problems.  this is nothing new.  see
the usenet archives for details.

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: 1 Jun 2001 01:05:31 GMT
From: "not important" <no@spam.please>
Subject: Re: Frustrated people (not) answering questions
Message-Id: <3b16dc4b$1@news2.mibx.net>


brian d foy <comdog@panix.com> wrote:
>In article <3b158516.9384143@news.usenet.com>, michael@visionpro.com 
>(Michael D. Risser) wrote:
>
>> If you feel that the question is stupid, ignore it. I for one would
>> rather have my question go unanswered than have someone attempt to
>> degrade me for asking. 
>
>those aren't the only options or consequences though.  there are
>network effects.
>
>unanswered posts often become answered when a less-than-proficient
>poster guesses at an answer.  this answer is archived on various
>usenet search engines for everyone to see later.  bad answers live
>forever and cause more confusion and the cycle continues.  indeed,
>look at the fecundity of Matt W.'s crap programming.
>
>or, you can just get used to taking your lumps.  just about everyone
>gets their lumps at one point or another, and i certainly take my
>share when i have genuinely stupid ideas at work.  the only
>difference is how you personally decide to handle it.
>
>-- 
>brian d foy <comdog@panix.com>
>CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
>Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html
>

But don't stupid (ie degrading posts) also get archived.  Your point applies
to useless posts period.  Which includes degrading posts, yes?



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

Date: Thu, 31 May 2001 20:47:42 +0800
From: brian d foy <comdog@panix.com>
Subject: Re: Frustrated people (not) answering questions
Message-Id: <comdog-0ADA33.20474231052001@news.panix.com>

In article <3b16dc4b$1@news2.mibx.net>, "not important" 
<no@spam.please> wrote:

> brian d foy <comdog@panix.com> wrote:
> >In article <3b158516.9384143@news.usenet.com>, michael@visionpro.com 
> >(Michael D. Risser) wrote:

> >> If you feel that the question is stupid, ignore it. I for one would
> >> rather have my question go unanswered than have someone attempt to
> >> degrade me for asking. 

> >those aren't the only options or consequences though.  there are
> >network effects.

> >unanswered posts often become answered when a less-than-proficient
> >poster guesses at an answer.  this answer is archived on various
> >usenet search engines for everyone to see later.  bad answers live
> >forever and cause more confusion and the cycle continues.  indeed,
> >look at the fecundity of Matt W.'s crap programming.

> But don't stupid (ie degrading posts) also get archived.  Your point applies
> to useless posts period.  Which includes degrading posts, yes?

degrading posts are just that.  they don't pretend to be an authority
or give an answer.  whether or not they are archived makes no intrinsic
difference to the life of bad answers.  they do however, as a side 
effect, make some people consider whether or not they should post.
that is a good thing.

but nobody is going to confuse degrading posts with the right way
to solve their problem. they are easily ignored.  bad answers are
not easily ignored because the new Perl user cannot distinguish
between good and bad advice.  they can easily tell when they are
being degraded, apparently.

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: Fri, 01 Jun 2001 04:03:36 +0500
From: Robert Sherman <rsherman@ce.gatech.edu>
Subject: Re: generating powerpoint presentations in perl
Message-Id: <3B16CDC8.747D9E93@ce.gatech.edu>

Steven wrote:

> Has anyone ever heard of powerpoint presentations being generated by a
> module. I checked cpan, and the news groups and did many searchs on
> google and the like...
>
> I know that PP can open HTML files ... any ideas are appreciated
>
> thanx
>
> -Steven

This may be helpful:

"The Win32::OLE module provides OLE Automation capabilities to Perl.
It is based on the OLE module distributed by ActiveState with
their "Perl for Win32" port of Perl 5.003_07. Win32::OLE replaces
the older OLE module, which is now considered obsolete. Win32::OLE
is already included in the ActivePerl binary distribution."



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

Date: Fri, 1 Jun 2001 01:07:09 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Getting Users' IP
Message-Id: <Pine.LNX.4.30.0106010104280.22163-100000@lxplus003.cern.ch>

On Thu, 31 May 2001, James wrote:

> I too have this problem. Suggestions I have recieved include using server
> side includes to get the IP of the local machine and using headers to tell
> the proxy server not to cache pages. Both sound like complete non starters
> to me . . .

Indeed.  Nonsense, in fact.

But this is the wrong place to discuss such issues - see you perhaps
on
a suitable WWW-related group sometime.



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

Date: Thu, 31 May 2001 19:34:18 +0800
From: brian d foy <comdog@panix.com>
Subject: Re: Getting Users' IP
Message-Id: <comdog-86892A.19341831052001@news.panix.com>

In article <mb1dhtgp9goth1vt6f32skl1klinc6dhho@4ax.com>, Bart Lateur 
<bart.lateur@skynet.be> wrote:

> brian d foy wrote:
> 
> >> my $userip=HTTP_CLIENT_IP;

> >if this particular ISP is indeed putting the client IP number in that environment 
> >variable, you need to look in %ENV to get it.

> >    my $userip=$ENV{'HTTP_CLIENT_IP'};

> The ISP? Isn't it the proxy that defines what header (-> environment
> variable) that contains the address?

we don't know where this proxy is or what it is really doing.  it
seems reasonable that someone could have configured some sort of
proxy to insert that header.  perhaps the original poster could
look at the environment and see what is really there then choose
the information they need. ;)

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: Thu, 31 May 2001 17:03:59 -0500
From: "spurcell" <skpurcell@hotmail.com>
Subject: Help with Understanding a Code Fragment
Message-Id: <3b16c02b$0$166@wodc7nh6.news.uu.net>

Does anyone out there understand what the BEGIN block is doing? And I cannot
figure out what this line does
$PerlEx::Samples::spell::words{$_} =  1;
it looks like it is creating a hash, but I have never seen words separated
by :: before except when talkng about modules? or Paths?

Thanks
Scott





#!perl -w

use CGI;
use LWP::UserAgent;
use HTTP::Request::Common;
use strict;

my $query = CGI::->new();

BEGIN {
    my $url = "http://www.vb.vb.vision-bank.com/maintest/PerlEx/words";
    my $ua = LWP::UserAgent->new;
    my $response = $ua->request(GET $url);
    if ($response->is_success) {
        foreach $_ (split(".\n", $response->content)) {
            $PerlEx::Samples::spell::words{$_} =  1;
        }
    }
    else {
        print STDERR "Error getting $url: " .
        $response->code . " " . $response->message . "\n";
    }
}

print $query->header;
print <<"EOF";
<TITLE>ActiveState PerlEx Spellcheck demo</TITLE>





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

Date: Fri, 1 Jun 2001 00:16:42 +0200
From: "Stefan Weiss" <der.prinz@gmx.net>
Subject: Re: Help with Understanding a Code Fragment
Message-Id: <3b16c2b4$1@e-post.inode.at>

spurcell <skpurcell@hotmail.com> wrote:

> Does anyone out there understand what the BEGIN block is doing? And I cannot
> figure out what this line does
> $PerlEx::Samples::spell::words{$_} =  1;
> it looks like it is creating a hash, but I have never seen words separated
> by :: before except when talkng about modules? or Paths?

Something like that. "PerlEx::Samples::spell" is the name of a package,
in this case a Perl module (=library), and "words" is a hash in that
package.

A BEGIN block will be executed before your script starts to run. And,
surprisingly enough, an END block will do the opposite ;-)

It looks like you were just starting to learn Perl (no offense
intended), because the questions you asked are about basic Perl syntax.
Maybe at this stage a good book or online tutorial might be more helpful
than this group.


cheers & HTH,
stefan





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

Date: Fri, 1 Jun 2001 00:19:42 +0100
From: "0dB" <jon@zerodb.demon.co.uk>
Subject: NT environment variables
Message-Id: <991351094.2284.0.nnrp-07.9e98d096@news.demon.co.uk>

In DOS (Perl on NT 4), the following sets an environment variable:

c:\SET DEF=abc

which can be verified by the following exchange:
c:\echo %DEF%
abc

The following Perl program sends a command to DOS:
#!/usr/bin/perl -w
system "echo SET DEF=abc";

I can verify that this is passed to DOS by this exchange:
c:\perl quickie.pl
SET DEF=abc

So, remove the echo statement and actually run the SET command:
#!/usr/bin/perl -w
system "SET DEF=abc";

But this only gives me the following:
c:\perl quickie.pl

c:\echo %DEF%
%DEF%

i.e. nothing has taken place. Why?




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

Date: 31 May 2001 23:43:21 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: NT environment variables
Message-Id: <slrn9hdlor.d0e.damian@puma.qimr.edu.au>

0dB chose Fri, 1 Jun 2001 00:19:42 +0100 to say this:
>#!/usr/bin/perl -w
>system "SET DEF=abc";
>
>But this only gives me the following:
>c:\perl quickie.pl
>
>c:\echo %DEF%
>%DEF%
>
>i.e. nothing has taken place. Why?
>

This is because system() starts a new command interpreter session to execute
your external command in. Consider the following:

C:\>set BLAH=test
C:\>echo %BLAH%
test
C:\>command
Microsoft(R) Windows NT DOS
(C)Copyright Microsoft Corp 1990-1996.
C:\>set BLAH=not_the_same
C:\>echo %BLAH%
not_the_same
C:\>exit
C:\>echo %BLAH%
test

If you want the environment variable to be available within the Perl
program, you can set it in the %ENV hash. It still won't outlive the
program, though, for the same reason as above (ie, the Perl program is a
separate process). 

This is a FAQ, but is usually asked WRT unix shells rather than DOS. You
should have a look at:

	perldoc -q environment

but I don't think it helps you. You might want to consider using a shell
script (err, I mean 'batch file' :-) for this instead.

HTH

Cheers,
Damian
-- 
@:=grep!($;+=m!$/|#!),split//,<DATA>;@;=0..$#:;while(@;){for($;=@;;--$;;)
{@;[$;,$:]=@;[$:,$;]if($:=rand$;+$|)!=$;}push@|,shift@;if$;[0]==@|;select
$,,$,,$,,1/80;print qq x\bxx((@;+@|)*$|++),@:[@|,@;],!@;&&$/} __END__
Just another Perl Hacker # rev 3.1 -- a JAPH in progress, I guess...


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

Date: Fri, 1 Jun 2001 09:18:55 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: NT environment variables
Message-Id: <dJAR6.4$7g4.4499@vic.nntp.telstra.net>

"0dB" <jon@zerodb.demon.co.uk> wrote in message
news:991351094.2284.0.nnrp-07.9e98d096@news.demon.co.uk...
> In DOS (Perl on NT 4), the following sets an environment variable:
>
> c:\SET DEF=abc
>
> which can be verified by the following exchange:
> c:\echo %DEF%
> abc
>
> The following Perl program sends a command to DOS:
> #!/usr/bin/perl -w
> system "echo SET DEF=abc";
>
> I can verify that this is passed to DOS by this exchange:
> c:\perl quickie.pl
> SET DEF=abc
>
> So, remove the echo statement and actually run the SET command:
> #!/usr/bin/perl -w
> system "SET DEF=abc";
>
> But this only gives me the following:
> c:\perl quickie.pl
>
> c:\echo %DEF%
> %DEF%
>

A child (the Perl program) cannot set the environment of it's parent (the
command shell).

To do this you need to put the set commands into a .bat file (shell script)
and use that to call the Perl script with the environment already set.

Otherwise the environment settings are taking place, but only 'within' the
environment of the Perl program itself, and when it ends, they go out of
scope.

Similar to the effect of running a command shell, and setting some
environment variables, then closing that shell, running another and checking
for them.

Wyzelli
--
($a,$b,$w,$t)=(' bottle',' of beer',' on the wall','Take one down, pass it
around');
$d='$_$a$s$b$w';$e='$_$a$s$b';sub d{$h=shift;$h=~s/\$(\w+)/${$1}/g;return$h}
sub
e{return(shift!=1)?'s':''}for(reverse(1..100)){$s=e($_);$f=d($d);$g=d($e);
$c.="$f\n$g\n$t\n";$_--;$s=e($_);$e=d($d);$c.="$e\n\n";}print"$c*hic*";




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

Date: Thu, 31 May 2001 16:48:04 -0700
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: NT environment variables
Message-Id: <3b16d834$1@news.microsoft.com>

"0dB" <jon@zerodb.demon.co.uk> wrote in message
news:991351094.2284.0.nnrp-07.9e98d096@news.demon.co.uk...
> In DOS (Perl on NT 4), the following sets an environment variable:
[...]
>
> But this only gives me the following:
> c:\perl quickie.pl
>
> c:\echo %DEF%
> %DEF%
>
> i.e. nothing has taken place. Why?

See the answer to
    perldoc -q environment

jue




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

Date: Fri, 1 Jun 2001 00:37:48 +0100
From: "David Soming" <davsoming@lineone.net>
Subject: Re: OT uploading to remote host with Apache for windows 
Message-Id: <thdl2slc4p1c4d@corp.supernews.co.uk>

OK!
I got ng -- comp.infosystems.www.servers.ms-windows
thanks everyone.

David




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

Date: Thu, 31 May 2001 23:31:01 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: OT uploading to remote host with Apache for windows
Message-Id: <otkdhtkr58g3rpgoeh6510iisehfrv9v1c@4ax.com>

David Soming wrote:

>Sorry if this is OT but I'm looking for a 'hand-holding' tutorial to access
>my remote host
>for uploading and setting permissions .htaccess + htpasswd (user
>authentication) using apache for windows v1.3.9. IE. from my local machine
>to the remote address. I wish to properly protect my directories. This is
>not possible using FTP, (will always return error attempting to set up these
>files .htaccess + .htpasswd --without Telnet--using FTP clients)

But it is. Probably there's an error in your .htaccess and/or .htpasswd
file. Start with stripping everything you're not sure of, adding one
feature at a time, and see if it barfs.

BTW perhaps you might be interested in the module HTTPD::UserAdmin and
friends.

-- 
	Bart.


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

Date: 31 May 2001 16:29:45 -0700
From: jdimov@cis.clarion.edu (Jordan Dimov)
Subject: Re: parsing perl again
Message-Id: <7447a59a.0105311529.3b9e9973@posting.google.com>

I think I'm liking that whole Text::Balanced magic.  

How do I use it to extract a list of arguments passed to a function?  The 
assumption is that the code is nice and clean (passed through Deparse,-p for 
example).  How do I get from here:  

  function(arg1, "arg2 is text, you see", arg3(is, tricky), arg4);

to here:

  arg1
  "arg2 is text, you see"
  arg3(is, tricky)
  arg4

Question mark.  I know I could have came up with a more subtle example, but 
I really don't insist on 100% reliability for this task.  

damian@cs.monash.edu.au (Damian Conway) wrote in message news:<9eh8hu$v2f$1@towncrier.cc.monash.edu.au>...
> jdimov@cis.clarion.edu (Jordan Dimov) writes:
> 
>    > I think I've heard rummors that there's a Perl 5 grammar for Damian's 
>    > Parse::RecDescent?
> 
> Not yet. It's high on the ToDo list, but not yet at the top.
> 
> Meanwhile, you might want to take a peak inside Text::Balanced (particularly
> the C<extract_codeblock> subroutine). You might find you can adapt the code
> to your needs.
> 
> Damian


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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


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


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