[7648] in Perl-Users-Digest
Perl-Users Digest, Issue: 1274 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 5 12:07:13 1997
Date: Wed, 5 Nov 97 09:00:22 -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 Wed, 5 Nov 1997 Volume: 8 Number: 1274
Today's topics:
Re: AUTOLOAD and sort <qdtcall@esb.ericsson.se>
Re: AUTOLOAD and sort (Mike Stok)
Re: AUTOLOAD and sort (Andrew M. Langmead)
Creating "Cutoff" date routine to delete files? <ahecker@dowjones.net>
Re: Creating "Cutoff" date routine to delete files? <rootbeer@teleport.com>
Re: crontab -l reformating (Reinvent the wheel?) (Toutatis)
Re: Dbase and Fox Pro <gurra@imneverwrong.com>
Re: ExecCGI <rootbeer@teleport.com>
Re: file locking on win95 (Eric Bohlman)
Re: HELP : Setting an Environment Variable/ERRORLEVEL i (I R A Aggie)
Re: How do I get rid of HTTP/1.0 200 OK??? (Robert G. Ferrell)
Re: How do I test my Perl (Jason Earl)
Re: how to get a program name ($0 etc.) <rootbeer@teleport.com>
Re: NT/ Reading command output <Steve_Kilbane@cegelecproj.co.uk>
Re: NT/ Reading command output (Pete Barker)
Re: open() redirection failing under NT/CGI. <Steve_Kilbane@cegelecproj.co.uk>
Perl Build Failure <josepj00@molbio.sbphrd.com>
Re: Perl debug <barnett@houston.Geco-Prakla.slb.com>
Re: Perl->Java? Java->Perl? Gaaaaa! <sverkerw@Zeke.Update.UU.SE>
Probleme mit linux und perl <rene_p@sbox.tu-graz.ac.at>
Re: Puzzle: palindromep (Ronald L. Parker)
SSI Parameters <tpryor@ctron.com>
Re: SSI Parameters <rootbeer@teleport.com>
Re: Stoopid Question ??? (Robert G. Ferrell)
SUID perl script... <lisak@atrey.karlin.mff.cuni.cz>
Re: SUID perl script... (brian d foy)
Win32 Net::Ping using icmp with IIS <vcuya@mindspring.com>
Re: Yet another gethostbyaddr question (Eric Bohlman)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 05 Nov 1997 13:02:54 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: AUTOLOAD and sort
Message-Id: <ispvofo8ep.fsf@godzilla.kiere.ericsson.se>
Calle Dybedahl <qdtcall@esb.ericsson.se> writes:
> perl -e 'print join "\n", sort { print $a } 1..5;'
Refinement:
perl -e '@a = sort {1} 1..2;'
also dumps. As fas as I can see with the debugger, sort somehow messes
up the low-level array stuff. The problem does not appear on HPUX and
Linux, so it may well be a problem in Solaris' libc.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: 5 Nov 1997 15:15:59 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: AUTOLOAD and sort
Message-Id: <63q2jf$ffb@news-central.tiac.net>
In article <ispvofo8ep.fsf@godzilla.kiere.ericsson.se>,
Calle Dybedahl <qdtcall@esb.ericsson.se> wrote:
>Calle Dybedahl <qdtcall@esb.ericsson.se> writes:
>
>> perl -e 'print join "\n", sort { print $a } 1..5;'
>
>Refinement:
>
> perl -e '@a = sort {1} 1..2;'
>
>also dumps. As fas as I can see with the debugger, sort somehow messes
>up the low-level array stuff. The problem does not appear on HPUX and
>Linux, so it may well be a problem in Solaris' libc.
The sort routine needs to be stable - it can't say 1 > 2 and 2 > 1 - on my
solaris box this works fine:
% perl -e 'print join "\n", sort {print "$a vs $b\n"; $a <=> $b} (1..5)'
1 vs 2
1 vs 3
1 vs 4
1 vs 5
1 vs 2
2 vs 3
3 vs 4
4 vs 5
1
2
3
4
5%
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: Wed, 5 Nov 1997 15:58:29 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: AUTOLOAD and sort
Message-Id: <EJ6KDH.426@world.std.com>
Calle Dybedahl <qdtcall@esb.ericsson.se> writes:
>Calle Dybedahl <qdtcall@esb.ericsson.se> writes:
>> perl -e 'print join "\n", sort { print $a } 1..5;'
>Refinement:
> perl -e '@a = sort {1} 1..2;'
>also dumps. As fas as I can see with the debugger, sort somehow messes
>up the low-level array stuff. The problem does not appear on HPUX and
>Linux, so it may well be a problem in Solaris' libc.
Perl's sort calls the c libraries qsort() function. Many
implementations of qsort() fail when they get answers that aren't
consistent.
If you change the sort code block to
"{ print "$a is greater than $b\n";1; }" you'd see something like:
1 is greater than 3
3 is greater than 5
2 is greater than 3
3 is greater than 4
5 is greater than 4
4 is greater than 3
3 is greater than 2
2 is greater than 4
is greater than 4
Bus error
Now how can you sort things so that 3 is greater than 4 but 4 is
greater than 3? The computer isn't into Zen-like riddles, so it just
bails.
--
Andrew Langmead
------------------------------
Date: Wed, 05 Nov 1997 10:15:22 -0500
From: Alan Hecker <ahecker@dowjones.net>
Subject: Creating "Cutoff" date routine to delete files?
Message-Id: <34608D8A.FED82094@dowjones.net>
Folks,
I'm in need of a quick routine (and what else is new?) that allows me to
read in a directory (this I can do via READDIR), check file dates, then
unlink the files if there date is before, let's say, September 30th of
this year.
I'm a little stuck on how to get to the file dates in perl, so I can
then parse them & unlink the little devils.
Any and all help would be, as usual, greatly appreciated.
- Alan Hecker
--
"Never Send a Monster to do the work of an Evil Scientist."
__________________________________________________
Alan Hecker phone: 212-885-5754
Consultant fax: 212-885-5780
Dow Jones Markets TIE-line: 8-247-5754
ahecker@dowjones.net
------------------------------
Date: Wed, 5 Nov 1997 08:46:36 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Alan Hecker <ahecker@dowjones.net>
Subject: Re: Creating "Cutoff" date routine to delete files?
Message-Id: <Pine.GSO.3.96.971105084612.23365O-100000@usertest.teleport.com>
On Wed, 5 Nov 1997, Alan Hecker wrote:
> I'm a little stuck on how to get to the file dates in perl, so I can
> then parse them & unlink the little devils.
Check out the stat() function, documented in perlfunc(1). Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 5 Nov 1997 12:21:07 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: crontab -l reformating (Reinvent the wheel?)
Message-Id: <toutatis-ya023180000511971321100001@news.euro.net>
Jedi Master Yoda <yoda@dagoba.org> wrote:
> What would be nice would be a script that takes crontab -l and outputs:
>
> On the 1st of every month, at 9.15am: /home/admin/foo.sh
> At 2 minutes past every hour, between 9am and 6pm: /home/admin/bar.sh
> Every Thursday morning at 6am: /home/admin/baz.sh
> &c.
Including a form with fancy buttons and pulldown menu's to set the
crontab... Cool.
--
Toutatis
------------------------------
Date: Wed, 05 Nov 1997 14:55:45 +0100
From: Gustaf Edgren <gurra@imneverwrong.com>
Subject: Re: Dbase and Fox Pro
Message-Id: <34607AE1.50C8C3F5@imneverwrong.com>
Martin Bolduc wrote:
> Help,
>
> I want help for using Dbase III and Fox Pro database's on a Unix
> system
> with Perl 5.
>
> Martin
> martinbolduc@littera.com
So would I but only for reading and writing, no creating.Gustaf Edgren
gurra@imneverwrong.com
------------------------------
Date: Wed, 5 Nov 1997 07:54:49 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Nuno Gomes <ee95195@tom.fe.up.pt>
Subject: Re: ExecCGI
Message-Id: <Pine.GSO.3.96.971105075331.23365K-100000@usertest.teleport.com>
On 5 Nov 1997, Nuno Gomes wrote:
> Apache error message when i tried to run a script that handles a form
> and creates & save files - " ExecCGI off in this directory " And yes
> i'm new at perl cgi progaming...what i'm doing wrong?
You're asking about it in a Perl newsgroup. :-) That sounds like an error
message from Apache, so check the docs and FAQs about that server. If you
still can't find the answer, you can ask in a newsgroup about servers.
Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 5 Nov 1997 13:08:56 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: file locking on win95
Message-Id: <ebohlmanEJ6CIw.J31@netcom.com>
Cameron Dorey (camerond@mail.uca.edu) wrote:
: No. (at least not to my knowledge). However, you can always create a
: dummy file when you want to flock your file, delete it when you want to
: unlock, and check for the existance of that dummy file when you need to
: find out whether "flock" has been invoked or not. This is probably the
: same thing as the Win32::Semaphore module, but I don't haven't used the
: latter, and the former works just fine for my applications.
Your method has a gotcha. Before locking your file, you have to make sure
nobody else has locked it. Unfortunately, there's no atomic "test for
file and create if it doesn't already exist" operation. This means that
it's entirely possible that you test for the existence of a lock file,
don't find it, and go ahead and create it, but in between the test and
creation, someone else also went ahead and created it. Now both you and
that someone else think you have exclusive rights to the file.
OS semaphore mechanisms are safe because the test-and-set operation is
uninterruptable. If you must use files as semaphores, the safest way
would be to generate a unique (process-specific) filename with a standard
extension. You would first check to see if any files with that extension
existed. If so, you know you're locked out. If not, you'd go ahead and
create one and then check again to see if yours was the only file with
that extension. If so, you've got the lock; if not, you delete it, wait
a random amount of time (in order to avoid the possibility of a deadlock)
and go back to step 1.
------------------------------
Date: Wed, 05 Nov 1997 09:07:52 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: HELP : Setting an Environment Variable/ERRORLEVEL in PERL for NT
Message-Id: <-0511970907520001@aggie.coaps.fsu.edu>
In article <346039d2.0@news.cranfield.ac.uk>, "A Farrow"
<a.n.farrow@cranfield.ac.uk> wrote:
+ Dear All,
+ Does anybody know how I can set a WINNT Environment Variable
+ from within PERL 5 for NT? I can get the listing using $ENV
+ but I do not appear to be able to change it.
If this is like the unix version of %ENV, then you can only change
it for the _current_ process and any _child_ processes. It does
not permanently modify the %ENV.
James
--
Consulting Minister for Consultants, DNRC
Support the anti-Spam amendment <url:http://www.cauce.org/>
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: Wed, 5 Nov 1997 13:33:23 GMT
From: rferrell@usgs.gov (Robert G. Ferrell)
Subject: Re: How do I get rid of HTTP/1.0 200 OK???
Message-Id: <EJ6Dnn.G68@igsrsparc2.er.usgs.gov>
In article <345eb32a.8853295@news.mindspring.com>,
e.phillips@mindspring.com says...
>
>I have a page that is a SSI page at
>http://www.starhosting.com/ephillips/index.stm that will display
>random text. My only problem is that when the SSI CGI script is
>executed, it also place the text "HTTP/1.0 200 OK" to the left of
>this random text. How do I get rid of this?
>
>Please let me know!
This seems to be an artifact of the MS Front Page WebBot generator. I
suggest you consult the Front Page documentation, or Microsoft's Web
site, or better yet, ditch MS altogether and write your own CGI scripts
in Perl ;-) An SSI script simply places whatever your program returns
in the indicated space; it doesn't care what generates the output.
Robert Ferrell
Systems Administrator
US Geological Survey
Office of Information Services
rferrell@usgs.gov
------------------------------
Date: 5 Nov 1997 16:01:11 GMT
From: jearl@bf_jearl.baf.com (Jason Earl)
Subject: Re: How do I test my Perl
Message-Id: <slrn6616dc.kui.jearl@bf_jearl.baf.com>
On Tue, 04 Nov 1997 10:25:33 -0800, Jason Deabill <147107@swansea.ac.uk> wrote:
:I am about to write my first Perl script. I want it to run as a CGI
:script on a UNIX server. However I only have access to a windows 3.1
:OS and don't know how to go about testing my script to ensure it will
:run when I upload it. Can someone please help me??
You might consider putting Linux on your PC...
I realize that this is probably overkill if you are just writing a perl
script or two. But Linux makes a great environment for testing perl
scripts that are going to be used with a web server.
Just a thought...
------------------------------
Date: Wed, 5 Nov 1997 07:48:40 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Parillo <lparillo@newshost.li.net>
Subject: Re: how to get a program name ($0 etc.)
Message-Id: <Pine.GSO.3.96.971105074718.23365J-100000@usertest.teleport.com>
On 4 Nov 1997, Parillo wrote:
> Is use constant a new part of Perl?
It was new when version 5.004 came out, but it's not so new anymore. :-)
> Can you tell me which man page it is on?
The command 'perldoc constant' should tell you about it, if it's properly
installed on your system. If that doesn't work, ask your admin to install
5.004. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 05 Nov 1997 13:31:32 GMT
From: Steve Kilbane <Steve_Kilbane@cegelecproj.co.uk>
To: vernon.peets@beasys.com
Subject: Re: NT/ Reading command output
Message-Id: <b57cd$d1f20.171@news.cegelecproj.co.uk>
In article <345E6B16.7D4F@beasys.com>, "Vernon E. Peets" <vernon.peets@beasys.com> writes:
> open( TF, "$command | ") || die "could not open command output $!";
As it happens, I'm having the same problem. The cmd
produces output when invoked with system(), but not
when invoked via open() - when it's running under a webserver.
It's fine when invoked from the command line. I suspect
a bug in the 5.004_01 release of perl, in the NT port, or
that there's a permissions problem with invoking a
temporary file in the background. Something like that.
See the "open() redirection failing under NT/CGI." thread...
--
<Steve_Kilbane@cegelecproj.co.uk> - All opinions are mine alone.
Kilbane's law of integration: standardise on protocols and file
formats, and the applications take care of themselves.
------------------------------
Date: 5 Nov 1997 15:04:22 GMT
From: on.maps.barker@cix.co.uk (Pete Barker)
Subject: Re: NT/ Reading command output
Message-Id: <memo.19971105150305.111A@mt.cix.co.uk>
In article <63p20q$4ga$2@comdyn.comdyn.com.au>, mgjv@comdyn.com.au
(Martien Verbruggen) wrote:
> In article <345E6B16.7D4F@beasys.com>,
> "Vernon E. Peets" <vernon.peets@beasys.com> writes:
> > I'm converting a script from Unix to NT, in it several
external
> > commands are used but the output is not being picked up on NT.
>
> Does the command you're using in the pipe write to standard
output? Or
> does it by any chance write to standard error?
Or even worse, direct to the screen?
Pete Barker
P.S. Please remove on.maps. to mail me.
------------------------------
Date: Wed, 05 Nov 1997 13:11:11 GMT
From: Steve Kilbane <Steve_Kilbane@cegelecproj.co.uk>
Subject: Re: open() redirection failing under NT/CGI.
Message-Id: <b57cd$dbb.13a@news.cegelecproj.co.uk>
In article <63o6br$m7p$1@daily.bbnplanet.com>, jgloudon@bbn.remove.com (Jason Gloudon) writes:
> Are you using the full path name to cmd ? Your script may inherit a different
> environment when run from the Web Server.
Yep. Furthermore the cmd is invoked both via open() and via system()
within the same CGI script, as a test - the system one returns
data (written to a file via redirection within the system() string),
but the open() call doesn't. Hence the theory that something
weird is happening within the pipe-setup within open().
--
<Steve_Kilbane@cegelecproj.co.uk> - All opinions are mine alone.
Kilbane's law of integration: standardise on protocols and file
formats, and the applications take care of themselves.
------------------------------
Date: Wed, 05 Nov 1997 11:27:08 -0500
From: "Jonathan B. Joseph" <josepj00@molbio.sbphrd.com>
Subject: Perl Build Failure
Message-Id: <34609E5C.446B@molbio.sbphrd.com>
I am trying to build perl 5.004_04 for Unixware 2.1.2. I obtained it
from ftp.perl.org and downloaded latest.tar.gz.
My build attempt is crashing during the linker stage and I get the
following message:
dynamic linker : ./miniperl : error opening libperl.so
Killed
Does anyone have any suggestions on how to properly configure the build
so that I can fix the linker problem and successfully build Perl ?
Thanks for any help,
Jonathan Joseph
---------------
jon.joseph@jbjnet.com
jjoseph@voicenet.com
------------------------------
Date: Wed, 05 Nov 1997 10:14:32 -0600
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: Perl debug
Message-Id: <34609B68.BDA@houston.Geco-Prakla.slb.com>
> In article <82pvogs2oq.fsf@shell2.shore.net>, Jay Rogers <jay@rgrs.com> wrote:
> > Support for debugging perl programs comes standard with Emacs and
> > XEmacs. As Kevin pointed out there is an improved version called
> > perldb+.el and I'm maintaining it.
Hmmm..... Been trying to track down how to use perldb in xemacs.
Apparently
our system doesn't have the perldb.el file. Where can someone (such as
myself) locate said file? I've looked on the xemacs home page, and done
an
internet search, but am having little luck in tracking either one
down.....
Thanks.
Regards,
Dave Barnett
--
"Security through obscurity is no security at all."
-comp.lang.perl.misc newsgroup posting
------------------------------------------------------------------------
* Dave Barnett U.S.: barnett@houston.Geco-Prakla.slb.com *
* DAPD Software Support Eng U.K.: barnett@gatwick.Geco-Prakla.slb.com *
------------------------------------------------------------------------
------------------------------
Date: 05 Nov 1997 14:12:00 +0100
From: Sverker Wiberg <sverkerw@Zeke.Update.UU.SE>
Subject: Re: Perl->Java? Java->Perl? Gaaaaa!
Message-Id: <uamoh3z7ae7.fsf@Zeke.Update.UU.SE>
"Scott Vachalek" <nospam_scottv@dnai.com> writes:
>
> One final thing: applets are by default not allowed to access the file
> system. In order to do that you'll have to look into "signed" applets.
Or write it as an application.
/Sverker
--
``Och vet du vad? Han tycker om smekakor ockse!''
--- Morfars granne angeende mosters hund.
------------------------------
Date: 5 Nov 1997 14:15:28 GMT
From: "Rene Pachernegg" <rene_p@sbox.tu-graz.ac.at>
Subject: Probleme mit linux und perl
Message-Id: <01bce9f5$c3658180$1110e08f@ima017.joanneum.ac.at>
Hi,
I am actually writing a library-museum search engine using CGI scripts in
Perl.
Everything works excellent on a Sun. But now my task is to install my
programm
on a Pentium 100 with S.u.S.E. Linux.
The problem is that when I was editing and saving a script, sometimes (not
always but quite often) nothing works anymore (Browser: 500 Server Error).
When I try to execute
the scripts from the shell command-line it reports:
bash: ./<filename.cgi>: Text file busy
The hard disk of the linux mashine is mounted at the Sun. When I call the
same file
from the Sun it works fine and gives me a correct HTML-Output.
There is nobody using the same files at the same time, there are no zombies
around
and the rights are ok.
I suppose there is some problem with the system settings but I dont have
the faintest idea what exactly.
Does anybody have any ideas ?????????????????????????????
Rene
------------------------------
Date: Wed, 05 Nov 1997 13:33:48 GMT
From: ron@farmworks.com (Ronald L. Parker)
Subject: Re: Puzzle: palindromep
Message-Id: <3463719e.673929@news.supernews.com>
On 04 Nov 1997 02:06:21 -0500, A Man of the 90's
<brenner@lbrenner.ne.mediaone.net> wrote:
>I was reading the unrolling a loop section of Mastering Regular
>Expressions and started thinking about palindromes. The problem
>is given the string:
> a) dgfdabcdefedcbatrd
> b) dgfdab cd ef edc batrd
>Write a pattern that returns:
> a) abcdefedcba
> b) ab cd ef edc ba
What are the rules? I've included a possible solution below, but I
don't know if it's elegible since it isn't just a pattern. Also, for
the strings I've included with the sample, what should the "correct"
answer be?
1) Should we ignore punctuation? (I do.)
2) Match early or match long? (I match early.)
3) How to handle overlapping palindromes? (I get the one that ends
first, so in the case of "Madam, I'm Adam" below, I get just
"Madam")
4) What is the appropriate response when there is no acceptable
palindrome?
-------------8<---- cut here -------------
#!/usr/bin/perl
while (<DATA>) {
$a='.?';
$a=quotemeta($1) while ( /((\w)\W*$a\W*\2)/i ) ;
$a='*** no palindromes ***' if ( $a eq '.?' );
$a=eval "\"$a\""; #"unquotemeta"
print "$a\n";
}
__DATA__
dgfdabcdefedcbatrd
dgfdab cd ef edc batrd
dgabcdeedcbard
yyabcbaxx
abc bdefedb cba
Able was I ere I saw Elba.
Madam, I'm Adam.
A man, a plan, a canal: Panama!
dgfdab cd, ef. edc batrd
no palindromes in this line
-------------8<---- cut here -------------
------------------------------
Date: Wed, 5 Nov 1997 12:25:37 -0000
From: "Tom Pryor" <tpryor@ctron.com>
Subject: SSI Parameters
Message-Id: <63pkks$ohm$1@roc-news.ctron.com>
Is this even possible?
Im trying to pass parameters via a SSI to ISAPI perl.dll.
I would like to use this syntax <!--#exec cgi="/cgi-bin/some_script.pl
param"-->
However it doesnt work. I suspect IIS doesnt like the space.
I can get it tork this way
<!--#exec cgi="/cgi-bin/some_script.pl?paramName=param"-->
but id rather use the old way due to legacy data.
System: NTserver4.0, IIS3.0, PERL5 build 312
many thanks in advance
------------------------------
Date: Wed, 5 Nov 1997 07:57:09 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Tom Pryor <tpryor@ctron.com>
Subject: Re: SSI Parameters
Message-Id: <Pine.GSO.3.96.971105075608.23365L-100000@usertest.teleport.com>
On Wed, 5 Nov 1997, Tom Pryor wrote:
> Is this even possible?
> Im trying to pass parameters via a SSI to ISAPI perl.dll.
I don't know if it's possible or not. But if it is, it should be in the
docs for your server. If you can't find what you want in the docs and FAQs
about a server, check with a newsgroup about servers. Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 5 Nov 1997 13:47:55 GMT
From: rferrell@usgs.gov (Robert G. Ferrell)
Subject: Re: Stoopid Question ???
Message-Id: <EJ6EBw.J2E@igsrsparc2.er.usgs.gov>
In article <346000C2.44C7@enid.com>, ziggy2@enid.com says...
>
>I am trying to run a CGI script on WIN95. How do I use the "chmod"
>command?
CHMOD is a Unix command that sets file permissions. It is similar in
some respects to the DOS command "attrib." For example:
attrib -w file.txt
will cancel write protection for file.txt. In Unix, all permissions are
denied by default unless explicitly allowed by umask or chmod. The
equivalent Unix command for the above is
chmod +w file.txt.
Unix files have three sets of permissions: owner, group, and other. DOS
files simply have write, read, system, and hidden attributes.
In summary, you can't use chmod in Win95 because it isn't a DOS-based
command. I haven't used WinPerl in a while, but try
eval ("attrib -w file.txt");
or something like that.
Robert Ferrell
Systems Administrator
US Geological Survey
Office of Information Services
rferrell@usgs.gov
------------------------------
Date: Wed, 5 Nov 1997 12:54:52 +0100
From: Jan Liska <lisak@atrey.karlin.mff.cuni.cz>
Subject: SUID perl script...
Message-Id: <Pine.LNX.3.94.971105124913.27202A-100000@atrey.karlin.mff.cuni.cz>
I write some SUID scripts in Perl and I've (as usuall...) problems with
security - I don't know, how to write secure glob() operation - I read
the Camel book, so I know, there is a way through new (not SUID) process
that send its data to a pipe, but I can't sucessfully accomplish it. Any
hints || advices?
Lisak
--
_______________________________________________________________
Somewhere, just out of the sight, the unicorns are gathering...
_______________________________________________________________
lisak@atrey.karlin.mff.cuni.cz | jlis5284@ss1000.ms.mff.cuni.cz
---------------------------------------------------------------
------------------------------
Date: Wed, 05 Nov 1997 10:46:17 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: SUID perl script...
Message-Id: <comdog-ya02408000R0511971046170001@news.panix.com>
In article <Pine.LNX.3.94.971105124913.27202A-100000@atrey.karlin.mff.cuni.cz>, Jan Liska <lisak@atrey.karlin.mff.cuni.cz> wrote:
>I write some SUID scripts in Perl and I've (as usuall...) problems with
>security - I don't know, how to write secure glob() operation -
you don't since a glob invokes a csh subshell. there are a few comments
on this in the perldelta manual page for 5.004
>I read
>the Camel book, so I know, there is a way through new (not SUID) process
>that send its data to a pipe, but I can't sucessfully accomplish it. Any
>hints || advices?
perhaps you can elaborate on what you are trying to do. the perlipc
man page offers several ways to accomplish such a thing, along with
examples.
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Wed, 5 Nov 1997 11:21:42 -0500
From: "Victor A. Cuya" <vcuya@mindspring.com>
Subject: Win32 Net::Ping using icmp with IIS
Message-Id: <63q6ja$lmk@camel12.mindspring.com>
I am writing an asp script for NT IIS and using the Net::Ping module that
allows icmp pinging of a host instead of tcp pinging and I get a message
back in the browser saying:
$proto = 'icmp'; $p = Net::Ping->new($proto, 5); error '80004005'
icmp socket error - Unknown Error: 0x0000271d
/asp/adduser.asp, line 23
Here is the code:
<script language="PerlScript" runat=server>
sub PingNTServer {
# ping NT Server to verify it is valid
$proto = 'icmp';
$p = Net::Ping->new($proto, 5);
$rc = $p->ping($NTSrv);
$p->close();
}
</script>
Amazingly enough, the same piece of code works fine from the command line.
Any ideas will be greatly appreciated.
TIA
Victor A. Cuya
vcuya@mindspring.com
victor_cuya@ccmail.prusec.com
------------------------------
Date: Wed, 5 Nov 1997 11:03:23 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Yet another gethostbyaddr question
Message-Id: <ebohlmanEJ66pn.EzM@netcom.com>
Kristian Halle (krist@oslo.sgi.com) wrote:
: I'm trying to get the hostname of the machine accessing my cgi script.
: This is the code I'm using (found somewere on the net), but it doesn't
: work. The $remoteaddr gets the correct value, but $remotehost becomes
: empty.
: $remoteaddr = $ENV{'REMOTE_ADDR'} ;
: $remotehost = (gethostbyaddr($remoteaddr, AF_INET))[0];
gethostbyaddr() is expecting a 4-byte packed (binary) value for the
remote address. Your $remoteaddr, OTOH, is almost certainly a
dotted-quad (human-readable) version of the address. You need to convert
it into a packed value; the easiest way to do this is to use inet_aton()
which can be found in the Socket module.
------------------------------
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 1274
**************************************