[9166] in Perl-Users-Digest
Perl-Users Digest, Issue: 2784 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 1 23:07:41 1998
Date: Mon, 1 Jun 98 20:00:26 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 1 Jun 1998 Volume: 8 Number: 2784
Today's topics:
Re: Best tool? (Jeremy D. Zawodny)
Re: Best tool? (Stuart McDow)
Re: Bug in NET::FTP or am I just stupid? <broom@voicenet.com>
Cropping Images with PERL <jcj@visi.com>
Re: Don't Know how to decrypt using PERL (Ken Fox)
Re: File Upload Script <bowlin@sirius.com>
Re: How do I tell if Perl is in foreground or backgound <dorfmanr@netlabs.net>
Re: More double standards out of the FSF <peterm@zeta.org.au>
Re: More double standards out of the FSF <hp@pobox.com>
Re: More Perlish file size (bytes, KB, MB) (Craig Berry)
network and system programming using perl <jackiech@ktweb.kotel.co.kr>
Re: new to OO Perl (Larry Rosler)
PERL5_003_05 build <cbeerup@ssvec.org>
Re: Permissions, permissions, permissions.... (Jeremy D. Zawodny)
san francisco perl users group is online <lanier@shell6.ba.best.com>
Re: Saving variable in $ENV{'REMOTE_USER'} (Martien Verbruggen)
Re: Saving variable in $ENV{'REMOTE_USER'} (Craig Berry)
Script to download file from password-protected dir wit <gnielson@charlotte.infi.net>
Re: Script to download file from password-protected dir <rootbeer@teleport.com>
Re: String to Hash utilty anyone? (brian d foy)
Re: String to Hash utilty anyone? <danboo@negia.net>
Re: Visibility of "my" vars <metcher@spider.herston.uq.edu.au>
www.pm.org is down (brian d foy)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 01 Jun 1998 20:50:22 -0400
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Best tool?
Message-Id: <m3zpfw39v5.fsf@peach.z.org>
abigail@fnx.com (Abigail) writes:
> Stuart McDow (smcdow@arlut.utexas.edu) wrote on MDCCXXXIV September
> MCMXCIII in <URL: news:6kq9ke$sp7$1@ns1.arlut.utexas.edu>:
> ++
> ++ Probably a good web server and a good web browser. I'd use apache and
> ++ navagator. ^^^^^^^^^^^^^^^^
> ^^^^^^^^^
>
> Why don't you practise what you preach?
What are you suggesting?
I wouldn't ask if I actually knew your bias on the matter...
Jeremy
--
Jeremy D. Zawodny Web Geek, Perl Hacker, etc.
http://www.wcnet.org/~jzawodn/ jzawodn@wcnet.org
LOAD "LINUX",8,1
------------------------------
Date: 2 Jun 1998 01:38:46 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Best tool?
Message-Id: <6kvl36$ftb$1@ns1.arlut.utexas.edu>
abigail@fnx.com (Abigail) writes:
> Stuart McDow (smcdow@arlut.utexas.edu) wrote on MDCCXXXIV September
> ++
> ++ Probably a good web server and a good web browser. I'd use apache and
> ++ navagator. ^^^^^^^^^^^^^^^^
> ^^^^^^^^^
>
> Why don't you practise what you preach?
Why, I already do. Thanks for asking.
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"Look for beauty in roughness, unpolishedness"
------------------------------
Date: Tue, 02 Jun 1998 00:17:31 GMT
From: Barry Roomberg <broom@voicenet.com>
Subject: Re: Bug in NET::FTP or am I just stupid?
Message-Id: <35730BEC.50CB6C64@voicenet.com>
Barry Roomberg wrote:
> &status("Starting uncompress");
>
> open (UNCOMPRESS, "uncompress < $from|") ||
> &my_die("Could not start uncompress for file [$from]:[$!]");
>
> &status("Starting upload");
>
> if (! $ftp->put(UNCOMPRESS, $to)){
> &my_die("Could not ftp-put file [$to]:[$@][$!]");
> }
As usual, I was just being stupid. I love posting my stupidity
to the world, only to solve my problem 2 minutes later.
If my ego got in my way, I'd just cancel the post, but
since others might run into this, I'm posting the
solution along with my original problem.
You can't pass a file handle directly to a function.
You are supposed to use a typglob, ie:
*UNCOMPRESS
But: Since this function was checking for a reference that
contains a filehandle, to have to do:
$ptr = \*UNCOMPRESS;
which then gets passed to ftp->put($ptr,$o);
Thank you to whoever wrote the ftp interface,
it's a HELL of a lot nicer to do it this way than
to send "expect" scripts to "ftp".
Barry Roomberg
------------------------------
Date: Tue, 02 Jun 1998 00:36:46 GMT
From: "Justin C. Johnson" <jcj@visi.com>
Subject: Cropping Images with PERL
Message-Id: <3572E5AE.A99066DC@visi.com>
ALL,
I need to crop a large amount of pictures in exactly the same fashion and
would like to write a script in PERL that will take care of this for me.
I have heard of PerlMagick but had some troubles installing it on Redhat
5.0. Does anybody know if there is a PERL module that allows for image
cropping via something like say Xview? Any options are welcome.
Thanks in advance,
Justin
------------------------------
Date: 1 Jun 1998 23:49:54 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: Don't Know how to decrypt using PERL
Message-Id: <6kven2$cj3@eccws1.dearborn.ford.com>
Larry Rosler <lr@hpl.hp.com> writes:
LR> Please, folks. Get your heads out of the Unix sandbox. Continued
LR> blind Unix-centrism will hinder Perl, not help it.
Ken Fox wrote:
KF> How is not copying the definition of crypt() out of the C
KF> documentation being Unix-centric?
LR> There is absolutely no requirement that Perl use a C library or,
LR> therefore, that Perl users have access to C library documentation.
That's true. In that case, I think the distributor of the binary
release of Perl should include the relevant portions of the C
documentation that describes how *that* binary of Perl will behave.
There are many places where Perl is at the mercy of the underlying C
library. The docs either have to have a appendix for every platform or
just refer the reader to where to find out more information. I prefer
the references, but I guess you don't.
Can the build automatically patch the documentation to match the
functionality of a specific platform? This sounds kind of tricky to
me, but it might be possible. You want to volunteer?
BTW, the "README.win32" says:
| crypt() is not available due to silly export restrictions. It may
| become available when the laws change. Meanwhile, look in CPAN for
| extensions that provide it.
If this is true, I'm not sure how *any* version of Perl can have
crypt if the underlying C library doesn't have it.
KF> The Perl docs don't define all the oddities of printf() either.
KF> Anybody going to complain about that too?
LR> No ...
My mistake -- Perl doesn't use the C printf. I guess that was a
bad example. ;) How about chroot or umask? Should Perl explain
all the behavior there? Or why unlink has such a funny name?
This isn't Unix-centrism, but more an accident of history combined
with strong support for backwards compatibility. ;)
- Ken
--
Ken Fox (kfox@ford.com) | My opinions or statements do
| not represent those of, nor are
Ford Motor Company, Powertrain | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section | "Is this some sort of trick
| question or what?" -- Calvin
------------------------------
Date: Mon, 01 Jun 1998 19:20:57 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: "Media Kitchen Inc." <info@mediakitchen.ca>
Subject: Re: File Upload Script
Message-Id: <35736189.84D64D2B@sirius.com>
Media Kitchen Inc. wrote:
>
> Hi,
>
> I would like to know where i could
> find a script that will allow users to
> upload files into a certain directory
> on my server.
>
> Thanks
> PHil
It comes with the CGI.pm module.
-- Jim Bowlin
------------------------------
Date: Mon, 01 Jun 1998 21:41:29 -0400
From: Robert Dorfman <dorfmanr@netlabs.net>
Subject: Re: How do I tell if Perl is in foreground or backgound?
Message-Id: <35735849.3DF80493@netlabs.net>
This is a multi-part message in MIME format.
--------------9A9A19E59F4069CD66BE6741
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Thanks for everyone's help. Checking for isattty() on STDIN doesn't
work because you have STDIN/STDOUT/STDERR associated with a background
process (E.g. nohup.out; bg process hangs when waiting for STDIN). But,
perlfaq8 does have a good method for checking using process IDs.
Thanks again.
Robert Dorfman
Charles DeRykus wrote:
>
> In article <3570BCA8.82100FDA@netlabs.net>,
> Robert Dorfman <dorfmanr@netlabs.net> wrote:
> >
> > I have a Perl/Sybperl script that logs into a Sybase Adaptive Server
> > and starts a database backup. This is run automatically by cron.
> > However, I'd like to use the same script and allow it to be called by a
> > user.If running in the foreground I'll display a list of databases that
> > may be selected for backup. Then I'll fork the process to do the actual
> > database dump. How can I tell if my script is running in foreground or
> > background? Also, would running in the background be different from
> > being started by cron?
> >
>
> Among other things, cron differs both in PATH handling and
> disposition of stdout/stderr. (man cron).
>
> To check if background: perldoc perlfaq8 and look at the section:
>
> "How do I find out if I'm running interactively or not?"
>
> HTH,
> --
> Charles DeRykus
--------------9A9A19E59F4069CD66BE6741
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Robert Dorfman
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Robert Dorfman
n: Dorfman;Robert
org: Dorfman Consulting
email;internet: dorfmanr@netlabs.net
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------9A9A19E59F4069CD66BE6741--
------------------------------
Date: Tue, 02 Jun 1998 00:11:04 +0000
From: "Peter G. Martin" <peterm@zeta.org.au>
Subject: Re: More double standards out of the FSF
Message-Id: <35734318.7FA9454D@zeta.org.au>
robert havoc pennington wrote:
>
> "Peter G. Martin" <peterm@zeta.org.au> writes:
> >
> > Thomas Bushnell, n/BSG wrote:
> > >
> > > If I need to ask permission, then the manual isn't free in the FSF
> > > sense. Tom says he's been quite liberal in giving permission, which
> > > is a nice thing. But being given permission is not the same thing as
> > > freedom, and the FSF wants free documentation--specificall
> > > documentation free of the need to ask permission to distribute or
> > > modify.
> >
> > In other words:
> >
> > My freedom is better than your freedom.
> >
> > I am holier than thou.
> >
> > Your god might be +like+ mine, but mine's better, anyway, naah naaah
> > !
> >
>
> No one is saying this. Re-read the quote, it has none of the tone
> you're perceiving, IMO.
>
I don't attribute the tone specifically to anyone (although I have
my ideas of what I think is right and wrong in this area).
I'm saying this has been the root cause of the whole thing: that
people have been making disparaging remarks about others of similar
bent and views because they want to insist on some kind of pristine
"purity" of approach to free software (or free documentation) which
is the direct equivalent of religious zealotry and bigotry transferred
to the web.
This has all been Christians against Christians stuff.... Northern
Ireland all over again.
And the only answer is to understand that nothing's +provable+ in
this area: it's all a question of belief or faith or personal morality
or whatever.
As far as I'm concerned, if TC, having made a HUGE contribution to
the free software community, wants to hold onto a few moral rights
to his works, while giving away slabs and slabs, why carry on about
it ?
Those who want "purity" are doomed to bitterness.
They just shouldn't try imposing it on others.
--
peterm
Peter G. Martin, Tech.Writer & Perl User, The Scribe & Chutney Trust
peterm@zeta.org.au, http://www.zeta.org.au/~peterm
ROZELLE, Australia +61 2 9818 5094
------------------------------
Date: Tue, 2 Jun 1998 01:08:00 GMT
From: robert havoc pennington <hp@pobox.com>
Subject: Re: More double standards out of the FSF
Message-Id: <wsng1hor4pb.fsf@harper.uchicago.edu>
"Peter G. Martin" <peterm@zeta.org.au> writes:
>
> This has all been Christians against Christians stuff.... Northern
> Ireland all over again.
>
True enough. Only I don't think it's a coincidence that these threads
are almost always started by those who *don't* like the GPL. Plenty of
people seem to enjoy posting comments that the FSF is "too radical"
and has to be eliminated. Most of them are ignorant of the facts.
> As far as I'm concerned, if TC, having made a HUGE contribution to
> the free software community, wants to hold onto a few moral rights
> to his works, while giving away slabs and slabs, why carry on about
> it ?
>
Because he posted a flame titled "GPL == unspeakable evil." I don't
want to get into "he started it," but it is indeed the case that
everyone was happily letting TC do whatever he wanted until he
randomly posted some very inflammatory material. The much-cited
gnu.org comment simply didn't merit this. Thus he got
flamed. Basically an unsurprising outcome.
Nonetheless, the thread appears to have died, and undoubtedly Tom
C. and the FSF will both continue doing the same things they were
doing before, e.g. working on their respective projects and ignoring
each other.
> They just shouldn't try imposing it on others.
>
Even given Tom's flame, people have mostly been saying "the FSF has the
right to do it their way, and Tom has the right to do it his." I don't
think that's imposition.
Havoc Pennington ==== http://pobox.com/~hp
------------------------------
Date: 2 Jun 1998 00:49:40 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: More Perlish file size (bytes, KB, MB)
Message-Id: <6kvi74$o0c$2@marina.cinenet.net>
C.W.Holeman II (choleman@simpact.com) wrote:
: This works but how about something more Perlish?
Here's my version. Note that you probably want to use 1024 and 1024^2 for
your divisors, rather than 1e3 and 1e6...but I've left it your way, for
comparison purposes. Note also that formatting the numbers would be a
useful extra step, which would be easy to add to the map in my function.
#!/usr/bin/perl -w
# fsfmt - format file sizes.
use strict;
sub fmtFileSize
{
my $size = shift;
my @szmap = ( [ 5e2, 1, 'bytes' ],
[ 5e5, 1e3, 'KB' ],
[ -1, 1e6, 'MB' ] );
foreach (@szmap) {
my $scale = $_->[0];
if ($size < $scale || $scale < 0) {
$size /= $_->[1];
return "$size $_->[2]";
}
}
}
my @test = qw(0 4 418 501 999 1000 1050 600000 20000000);
foreach (@test) {
printf "%10d = %s\n", $_, fmtFileSize($_);
}
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Tue, 02 Jun 1998 11:41:53 +0900
From: Jackie Chong <jackiech@ktweb.kotel.co.kr>
Subject: network and system programming using perl
Message-Id: <35736671.F218420A@ktweb.kotel.co.kr>
Hi, there
I am about to launch into network and system programming world.
Even though I have a programming experience, I have not picked the most
comfortable language for me. Among Java, perl and perhaps other
languages, which one is most suitable for network and system
programming. Personally perl that I know is a simple and realatively
easy one than c. I don't know about Java but I am afraid it would take
more time to be familiar with it. what do you ,who are familiar with all
three, think?
Any feedback will be so helpful.
Thanks
------------------------------
Date: Mon, 1 Jun 1998 19:22:44 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: new to OO Perl
Message-Id: <MPG.fdd01d49a76a50f989680@hplntx.hpl.hp.com>
In article <896740552.122693@thrush.omix.com>, zenin@bawdycaste.org
says...
...
> With or with out the speed however, you do get the advantage of
> compile time field name typo checking. -Use strict will catch
> misspelled bare word field names at compile time, unlike hash
> keys which often will never even warn at run time. The down
> side is your name space is a mess...
You are making a very convincing argument that if the accessors into an
aggregate are constants, there is little reason not to use array indexes
rather than hash keys, especially so if performance is an issue. Should
this become a Perl tip of some sort?
> #!/usr/local/bin/perl
> use Benchmark;
>
> @array = 0 .. 9;
> %hash = ( NAME => 8 );
> *EIGHT = sub () { 8 };
> sub EIGHT_SUB { 8 };
> use constant EIGHT_MOD => 8;
> $eight = 8;
I would also add this case: *Eight = \8; which makes $Eight 'more of a
constant' than $eight. There is no perceptible difference in
performance.
>
> timethese (2 << 18, {
> array => q{ $x = $array[8] },
> constant => q{ $x = $array[EIGHT] },
> constant_sub => q{ $x = $array[EIGHT_SUB] },
> constant_mod => q{ $x = $array[EIGHT_MOD] },
constant_ref => q{ $x = $array[$Eight] },
> variable => q{ $x = $array[$eight] },
> hash => q{ $x = $hash{NAME} },
> base => q{ $x = $x },
> } );
>
> __END__
>
> --
> -Zenin
> zenin@archive.rhps.org
>
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: 2 Jun 98 00:27:41 GMT
From: "cullen Beerup" <cbeerup@ssvec.org>
Subject: PERL5_003_05 build
Message-Id: <01bd8dbc$0c1df5a0$c8319ace@anpw707.ssvec.org>
Just trying to do a build on a AXP, I'm not much of a C programmer so I
need a little help.
Thanks in advance. Any ideas ?
Cullen Beerup
Cbeerup@ssvec.org
vms 7.1
$ MMK/DESCRIP=[.VMS]
Copy/Log/NoConfirm [.vms]config.vms []config.h
%COPY-S-COPIED, DISK$BADGER0:[000000.PERL.PERL5_003_05.VMS]CONFIG.VMS;1
copied t
o DISK$BADGER0:[000000.PERL.PERL5_003_05]CONFIG.H;1 (106 blocks)
Copy/Log [.VMS]PERLY_H.VMS PERLY.H
%COPY-S-COPIED, DISK$BADGER0:[000000.PERL.PERL5_003_05.VMS]PERLY_H.VMS;1
copied
to DISK$BADGER0:[000000.PERL.PERL5_003_05]PERLY.H;1 (3 blocks)
Copy/Log/NoConfirm [.vms]vmsish.h []vmsish.h
%COPY-S-COPIED, DISK$BADGER0:[000000.PERL.PERL5_003_05.VMS]VMSISH.H;1
copied to
DISK$BADGER0:[000000.PERL.PERL5_003_05]VMSISH.H;1 (32 blocks)
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st MINIPERLMAIN.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st PERL.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st GV.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st TOKE.C
Copy/Log [.VMS]PERLY_C.VMS PERLY.C
%COPY-S-COPIED, DISK$BADGER0:[000000.PERL.PERL5_003_05.VMS]PERLY_C.VMS;1
copied
to DISK$BADGER0:[000000.PERL.PERL5_003_05]PERLY.C;1 (192 blocks)
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st PERLY.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st OP.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st REGCOMP.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st DUMP.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st UTIL.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st MG.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st PERLIO.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st HV.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st AV.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st RUN.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st PP_HOT.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st SV.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st PP.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st SCOPE.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st PP_CTL.C
CC
/Define=(DEBUGGING)/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoL
i
st PP_SYS.C
(void)times((tbuffer_t *)×buf); /* time.h uses different name for
*/
................^
%CC-W-PTRMISMATCH, In this statement, the referenced type of the pointer
value "
(tbuffer_t ...)&Perl_timesbuf" is "struct tbuffer", which is not compatible
with
"struct tms".
at line number 3091 in file
DISK$BADGER0:[000000.PERL.PERL5_003_05]PP_SYS.C;1
%MMK-F-ERRUPD, error status %X10B91260 occurred when updating target
PP_SYS.OBJ
$
Cullen Beerup
Cbeerup@ssvec.org
------------------------------
Date: 01 Jun 1998 20:48:25 -0400
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Permissions, permissions, permissions....
Message-Id: <m31zt84oiu.fsf@peach.z.org>
Robert.Webb@yeg.dot.co.dot.uk (Robert Webb) writes:
> Hi All, not sure if this is a Perl thing, or an NT thing.
Probably an NT thing... (I work on NT, so I'm allowed to bash it. :-)
> I have a script which is called from a form in a web page, updates a
> simple text file and runs quite happily on a web server.
Simple enough.
> However, if I try to run the same script from *another* web server but
> I still want fred.txt to be updated on thisserver.com I get a
> "Permission Denied" error.
Is the script running on a second [different] web server, or have you
launched a browser on a second "server" and called the script on the
first server?
Your use of "from" in the above is what confuses me... For the moment,
I'll assume we're talking about running the script ON a second server
(otherwise it's an authentication issue, most likely).
> where script.pl writes to a file c:/data/fred.txt (on thatserver.com)
>
> Given that both web server (and the client PC) is on an intranet, and
> I have directory permissions on c:/data set to Everyone | Full control
> I'm not sure what I'm doing wrong.... any advice (other than "use
> Unix", thanks) gratefully appreciated.
Have you pinpoined the exact line at which your script bombs? Is it
indeed the line that looks like:
open(BLAH, ">>$file") or die "$!";
Or does the second server have trouble running *any* Perl scripts?
Have you turned on Auditing for C:/data, run the script, and looked in
the security log to see what failures appear?
Jeremy
--
Jeremy D. Zawodny Web Geek, Perl Hacker, etc.
http://www.wcnet.org/~jzawodn/ jzawodn@wcnet.org
LOAD "LINUX",8,1
------------------------------
Date: Mon, 1 Jun 1998 17:07:38 -0700
From: "matthew d. p. k. lanier" <lanier@shell6.ba.best.com>
Subject: san francisco perl users group is online
Message-Id: <Pine.BSF.3.96.980601170621.21202L-100000@shell6.ba.best.com>
hello all-
the san francisco perl users group is online and functioning.
if you're interested, send mail to matt@saturn5.com and i'll fill you in!
the mailing list is quite sparse right now, as we've been up and running
since friday with very little traffic. that will change ;)
matt =)
........................................................
: matthew d. p. k. lanier : sf perl user's group :
: matt@lanier.org : sfpug-request@pootpoot.com :
: matt@saturn5.com : http://www.pm.org :
........................................................
------------------------------
Date: 2 Jun 1998 00:00:31 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Saving variable in $ENV{'REMOTE_USER'}
Message-Id: <6kvfav$17t$4@comdyn.comdyn.com.au>
In article <e$xVr$Yj9GA.284@upnetnews02.moswest.msn.net>,
"Ric Alcazar" <alcazar@netcomp.net> writes:
> Quick newbie question. When I save a value to the environment variable
> "REMOTE_USER" how come that value returns nothing when I call it in a
> separate pl script?
You set the environment variable for the environment of the CURRENT
script, not the machine or web server or whatever you imagine is
changing.
Also have a look at:
# perldoc 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?
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | In the fight between you and the world,
Commercial Dynamics Pty. Ltd. | back the world - Franz Kafka
NSW, Australia |
------------------------------
Date: 2 Jun 1998 00:27:03 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Saving variable in $ENV{'REMOTE_USER'}
Message-Id: <6kvgsn$o0c$1@marina.cinenet.net>
Ric Alcazar (alcazar@netcomp.net) wrote:
: Quick newbie question. When I save a value to the environment variable
: "REMOTE_USER" how come that value returns nothing when I call it in a
: separate pl script?
Each instance of your Perl app gets its own local copy of the environment
variables. Setting them influences what it sees, and what any forked
children see, but *not* what the calling shell nor any other sibling
instance of the app sees. Yes, it's annoying -- but trust me, it's for
the best. Life would be far worse if random apps could diddle with the
calling shell's view of the environment.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Mon, 01 Jun 1998 20:20:33 -0400
From: Gary Nielson <gnielson@charlotte.infi.net>
Subject: Script to download file from password-protected dir with http protocol
Message-Id: <3573454D.D8BEAEB3@charlotte.infi.net>
Hi,
I am trying to figure out a way with perl to download a file from a
password-protected dir
with the http protocol. Basically each day I need to download our raw
web logs from a
remote server. The logs are not accessible via ftp, only http and
require a username
and password. The system administrator has perl.5001 installed on our
machine. Is there
a package I can use that will accomplish this?
Any help appreciated. Please email as well.
Gary
Charlotte NC
------------------------------
Date: Tue, 02 Jun 1998 00:46:20 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Script to download file from password-protected dir with http protocol
Message-Id: <Pine.GSO.3.96.980601174552.15370d-100000@user2.teleport.com>
On Mon, 1 Jun 1998, Gary Nielson wrote:
> I am trying to figure out a way with perl to download a file from a
> password-protected dir with the http protocol.
Sounds like the LWP module. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 01 Jun 1998 20:04:21 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: String to Hash utilty anyone?
Message-Id: <comdog-ya02408000R0106982004210001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6kv87b$gr7$1@malgudi.oar.net>, "Eric Youngquist" <ewy@iti-oh.com> posted:
>Basically, I have the following strings
>
> "dir1/sdir1/sdir11/file11.txt"
> "dir1/sdir2/file2.txt"
>and I would like to place them in a hash based on the delimiter "/":
>
> $hash{dir1}{sdir1}{sdir11}=file11.txt
> $hash{dir1}{sdir2}=file11.txt
here's some pseudo-code:
split the original string appropriately.
save the last item of the resulting list for the final value
use the other keys to build up a string which you will eval
here's some real code
#!/usr/bin/perl
use vars qw(%hash $string $value);
my @array = split m|/|, "you/must/wear/socks";
$value = pop @array;
$string = '$hash';
for ( @array )
{
$string .= "{$_}";
}
eval("$string = q/$value/");
print "$hash{you}{must}{wear}\n";
__END__
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>
------------------------------
Date: Mon, 01 Jun 1998 20:23:36 -0400
From: Dan Boorstein <danboo@negia.net>
Subject: Re: String to Hash utilty anyone?
Message-Id: <35734608.E4E1CBA5@negia.net>
Eric Youngquist wrote:
>
> I would like to convert a string to a hash where keys are created based on a
> delimiter. Before I write it myself, I was wondering if it has already been
> done before.
this came up in march, and can be researched using dejanews. the
relevant keywords are 'splitting string hash keys' and the
group of course is 'comp.lang.perl.misc'. a variety of eval
and iterative procedures were presented.
hope this helps,
--
Dan Boorstein home: danboo@negia.net work: danboo@y-dna.com
"THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER."
- Cosmic AC
------------------------------
Date: Tue, 02 Jun 1998 12:46:53 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: Visibility of "my" vars
Message-Id: <3573679D.174E7929@spider.herston.uq.edu.au>
? the platypus {aka David Formosa} wrote:
>
> Nope closures work on all subs, for example.
>
> {
> my $x=0;
>
> sub getx {
> return $x;
> }
>
> sub setx {
> $x = shift;
> }
> }
>
> The value of $x is only acceable via setx and getx.
>
Well, that's good to know. I don't want this to sound like sour grapes,
but could this be considered to be a documentation bug? The word
"anonymous" appears six times in the page and a half on closures in the
Blue Camel. In perlsub, this kind of sentence appears several times:
"To do this with a subroutine requires the use of a closure (anonymous
function)."
I can't find anywhere the documentation refers to the meaning of
"closure" without using the word "anonymous". And the one example in
perlsub that *does* use a named function appears in the context of a
discussion about lexical variables and *doesn't* use the word "closure".
--
Jaime Metcher
------------------------------
Date: Mon, 01 Jun 1998 21:00:22 -0400
From: comdog@computerdog.com (brian d foy)
Subject: www.pm.org is down
Message-Id: <comdog-ya02408000R0106982100220001@news.panix.com>
Keywords: from just another new york perl hacker
thanks for everyone's concern and emails, but i know about the problem
and am taking care of it :)
last night bad things starting happening to the boot disk of the
server and modules literally starting disappearing as bad blacks
developed on the disks. the server is down while i take care of
the problem by installing a brand new disk and so on.
since some of the user groups' web thingys are also hosted on that
server, they are also not available.
sorry for the inconvenience - i'll have it back up as soon as
possible :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers T-shirts! <URL:http://www.pm.org/tshirts.html>
luckily i had a full backup up from the day before :)
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 2784
**************************************