[10382] in Perl-Users-Digest
Perl-Users Digest, Issue: 3975 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 14 18:07:26 1998
Date: Wed, 14 Oct 98 15:00:21 -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 Wed, 14 Oct 1998 Volume: 8 Number: 3975
Today's topics:
Re: anyone got a rtf->html converter in perl? <jdporter@min.net>
Are there no PERL experts out there?? Is there no one w Rafely@xxiname.com
Are there no PERL experts out there?? Is there no one w Webby@cryogen.com
Batch-changing URL case in HTML pages with perl (Gordon Rankin)
Re: comp.lang.perl.win32?? <jdporter@min.net>
Re: Continuing s/// from the last position. <jdporter@min.net>
Re: Cool company has Perl jobs! <aperrin@mcmahon.qal.berkeley.edu>
Re: Deleteing a line <r28629@email.sps.mot.com>
Re: Equivalent of "unload" after "require"? <merlyn@stonehenge.com>
Re: Equivalent of "unload" after "require"? wyndo@cxo.com
Re: exit code... (Charles DeRykus)
Re: fcntl <caa@strata-group.com>
Re: How to Adduser/mail for NT ??? (Neil Francis)
Re: matching problems (Patrick Timmins)
Missing files for Win32::Registry <sai.prasad@nsc.com>
newbie: multidim array format <msda+@andrew.cmu.edu>
Re: newbie: multidim array format <ludlow@us.ibm.com>
Passing file handles in strict mode? (Jonas Bofjall)
Re: Passing file handles in strict mode? <tchrist@mox.perl.com>
Re: PERl and HTACCESS authentication (brian d foy)
perl recursion lietk@my-dejanews.com
Re: perl recursion <rootbeer@teleport.com>
Re: Perl/CGI with SUID question <rootbeer@teleport.com>
Re: Perl/CGI with SUID question <gellyfish@btinternet.com>
Re: Please help me!! Connecting to Oracle (John D Groenveld)
Re: Sending mail via CGI/Perl ? (brian d foy)
Re: Sorry <jdporter@min.net>
Re: sorting hack <jdporter@min.net>
Re: splitting on meta chars <rootbeer@teleport.com>
Re: Using Package Manager from the Win32 RK <gellyfish@btinternet.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 14 Oct 1998 16:18:46 -0400
From: John Porter <jdporter@min.net>
Subject: Re: anyone got a rtf->html converter in perl?
Message-Id: <36250726.2983E699@min.net>
Matt Curtin wrote:
>
> RTF isn't a bad idea. There is a general need for a markup format
> that can be written from standard "userland" applications on peecees
> that will allow us to get the data in other formats, without
> completely losing all formatting and whatnot.
You're right. Good idea. But bad implementation.
> RTF has problems. I suspect that these are things like Microsoft
> playing with the format so there is a slightly newer version of RTF
> for each release of their software.
Yes. And the fact that it is, um, NOT EASY to write programs
that grok the format.
> Sure there are some gross things in there, but it could be much,
> much worse.
I'll take almost any alternative.
> Blaming the people who use the evil applications doesn't make
> much sense, either. Many of them have edicts handed down from On High
> regarding what they'll use, and generally just have to deal with it.
Right. I blame the On High.
> I get data from people on Pee Cees from time to time, and ask them to
> send me RTF if they must send me something that they expect me to edit
> and return.
Too true. I've been there...
--
John "Many Jars" Porter
baby mother hospital scissors creature judgment butcher engineer
------------------------------
Date: Wed, 14 Oct 1998 22:45:25 GMT
From: Rafely@xxiname.com
Subject: Are there no PERL experts out there?? Is there no one who can solve this??
Message-Id: <362525ae.2780681@news.iaehv.nl>
Hello,
I'm making a form so users can send me information.
The also have to send me their name. How do I check
and see if the name only consists of letters and white
spaces?? So "My Name" is allowed but "Jj&*d d#fdhd"
is not allowed!!! I want to send a message saying that
the name was invalid! But how do I check and see if
the name is valid? I've posted this questions several
times in this newsgroup and other CGI newsgroup and
CGI forums. I've tried all the suggestions but none of
them work!! I'm a newbie to PERL, but this seems like
a very easy question and there must be someone out
there that knows the answer!! Here are a few
sufggestions I got that don't work!!
1. if ( /\w/ ) {
# do something
} else {
# do something else
}
}
2. /^[a-zA-Z0-9]+$/
3. $something =~ /^-?[a-zA-Z0-9.]+$/;
Or
$something =~ /[a-zA-Z0-9.]/;
4. $something =~ /^\w+$/;
5. /^[^\W_]*$/ # Matches "" or "\n"
or
/^[^\W_]+$/ # Requires at least one letter or digit
6. if( $a =~ /[^a-zA-Z ]+/ || $a !~ /\w/ ){ do error thing }
PLEASE HELP!!!!
------------------------------
Date: Wed, 14 Oct 1998 22:47:11 GMT
From: Webby@cryogen.com
Subject: Are there no PERL experts out there?? Is there no one who can solve this??
Message-Id: <362629d5.3844150@news.iaehv.nl>
Hello,
I'm making a form so users can send me information.
The also have to send me their name. How do I check
and see if the name only consists of letters and white
spaces?? So "My Name" is allowed but "Jj&*d d#fdhd"
is not allowed!!! I want to send a message saying that
the name was invalid! But how do I check and see if
the name is valid? I've posted this questions several
times in this newsgroup and other CGI newsgroup and
CGI forums. I've tried all the suggestions but none of
them work!! I'm a newbie to PERL, but this seems like
a very easy question and there must be someone out
there that knows the answer!! Here are a few
sufggestions I got that don't work!!
1. if ( /\w/ ) {
# do something
} else {
# do something else
}
}
2. /^[a-zA-Z0-9]+$/
3. $something =~ /^-?[a-zA-Z0-9.]+$/;
Or
$something =~ /[a-zA-Z0-9.]/;
4. $something =~ /^\w+$/;
5. /^[^\W_]*$/ # Matches "" or "\n"
or
/^[^\W_]+$/ # Requires at least one letter or digit
6. if( $a =~ /[^a-zA-Z ]+/ || $a !~ /\w/ ){ do error thing }
PLEASE HELP!!!!
------------------------------
Date: Wed, 14 Oct 1998 21:22:07 GMT
From: macalex@nospamvnet.net (Gordon Rankin)
Subject: Batch-changing URL case in HTML pages with perl
Message-Id: <362515d2.1673064@news.vnet.net>
Path: ralph.vnet.net!not-for-mail
From: macalex@nospamvnet.net (Gordon Rankin)
Newsgroups: comp.infosystems.www.authoring.html
Subject: Changing URL case automatically
Message-ID: <362498a7.13268960@news.vnet.net>
X-Newsreader: Forte Free Agent 1.11/32.235
Lines: 14
Date: Wed, 14 Oct 1998 12:30:39 GMT
NNTP-Posting-Host: 166.82.9.154
X-Trace: ralph.vnet.net 908368479 166.82.9.154 (Wed, 14 Oct 1998
08:34:39 EDT)
NNTP-Posting-Date: Wed, 14 Oct 1998 08:34:39 EDT
Organization: Vnet Internet Access
Xref: ralph.vnet.net comp.infosystems.www.authoring.html:13747
Hi,
Is anyone aware of any perl scripts, shareware utilities, or programs
etc. that will open a batch of HTML files, change the case of URLs in
the file from mixed or upper to all lower case, and save the file?
Any help would be greatly appreciated. We have thousands of files that
need this done to them.
If replying to me via email, please remove the "nospam" from my
address.
Thanks!
Gordon
------------------------------
Date: Wed, 14 Oct 1998 16:14:29 -0400
From: John Porter <jdporter@min.net>
Subject: Re: comp.lang.perl.win32??
Message-Id: <36250625.D4148C7C@min.net>
Daniel Grisinger wrote:
>
> John Porter <jdporter@min.net> writes:
> > Win32 programmers ought to have a forum in
> > which "NT Sucks!" is considered a troll.
>
> NT Sucks!!! ( hey, I'm not trolling, John said so :-).
No; if you thought I meant clpm should be that place,
then you are gravely mistaken.
(smiley noted)
--
John "Many Jars" Porter
baby mother hospital scissors creature judgment butcher engineer
------------------------------
Date: Wed, 14 Oct 1998 16:36:50 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Continuing s/// from the last position.
Message-Id: <36250B62.3A06FAEF@min.net>
Antti Boman wrote:
>
> $str="This is the thing I want to change";
> $str=~s/the/a/;
> $str=~s/want/need/;
my %repl = (
'the' => 'a',
'want' => 'need',
);
$str =~ s/the|want/$repl{$&}/g;
Not *exactly* what you asked for, but still only passes once
over the string.
--
John "Many Jars" Porter
baby mother hospital scissors creature judgment butcher engineer
------------------------------
Date: Wed, 14 Oct 1998 12:49:48 -0700
From: Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Cool company has Perl jobs!
Message-Id: <3625005C.86E6550F@mcmahon.qal.berkeley.edu>
'pparently not that cool.
David Alan Black wrote:
> versuslaw@my-dejanews.com writes:
>
> >Well-established Internet company seeks entry-level and experienced Perl
> >programmers. We are looking for a smart, self-starters who write good code!
> >Our systems run in a Windows NT environment, using ActiveState perl.
>
> I'm all confused. I thought you said it was cool.
>
> David Black
> dblack@pilot.njin.net
--
-------------------------------------------------------------
Andrew J. Perrin - NT/Unix/Access Consulting - (650)938-4740
aperrin@mcmahon.qal.berkeley.edu (Remove the Junk Mail King)
http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------
------------------------------
Date: Wed, 14 Oct 1998 15:39:04 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: Deleteing a line
Message-Id: <36250BE8.AF7612A0@email.sps.mot.com>
Keith L. Miller wrote:
>
> I have a perl script that opens one file and basically writes the contents
> to another file:
>
> ie:
>
> open (IN, file);
> open (OUT, newfile);
> while(<IN>){
> if ( blah blah blah){
> print OUT $_;
> }
> }
>
> if ( something ){
> delete last line printed from the newfile
> }
> close(OUT);
> close(IN);
>
> my problem is that I need to figure out that last if statement. I know it
> is actually like this
>
> if ($count == 5){
> something
> }
>
> I don't know what that something is. I have a cludge workaround, but I was
> wondering if you new a way to erase the last line from a file. Is there a
> UNIX command to strip the last line of a file?
>
> Any help would be greatly appreciated.
>
> Keith L. Miller
> Fathers Matter WebBoard
> http://www.fathersmatter.com
Wow, you actually posted the same message four (4) times!! Amazing.
------------------------------
Date: Wed, 14 Oct 1998 20:51:20 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Equivalent of "unload" after "require"?
Message-Id: <8c3e8qdfzw.fsf@gadget.cscaper.com>
>>>>> "Tom" == Tom Christiansen <tchrist@mox.perl.com> writes:
Tom> 4) use Module is like require Module, except the former:
Tom> 4.1: loads the module at compile time, not run-time.
Tom> 4.2: imports symbols and semantics from that package to the current one.
... for a *normal* "import()" class method. Nothing can be said for
non-standard import() methods, which may merely invoke NetHack with
the given arguments, if any.
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Wed, 14 Oct 1998 21:16:49 GMT
From: wyndo@cxo.com
Subject: Re: Equivalent of "unload" after "require"?
Message-Id: <7034c1$b66$1@nnrp1.dejanews.com>
> `require' is exactly the same as `do' except that it won't do the same
> file twice.
Well that would probably work for what I want too. If I "do" instead of
"require" then it *will* do the same file again? That's exactly what I want
(so that after loading a file, I can re-load to make it pick up any changes
made while the program was running). Very good.... "do" and "delete
$INC{'filename'};" ... 2 solutions.
Thanks!
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 14 Oct 1998 19:00:49 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: exit code...
Message-Id: <F0tzHE.9Ip@news.boeing.com>
In article <700si4$nv7$1@agate.berkeley.edu>,
Alan Su <alsu@soda.CSUA.Berkeley.EDU> wrote:
>
>i'm confused about the argument to exit. here's my little test script:
>
>i expect the output of this to be:
>exit code is 0
>exit code is 1
>...
>
>instead, i get:
>exit code is 0
>exit code is 256
>...
>
>basically, the exit codes are being scaled by a factor of 256. now i
>know i'm doing something stupid, but what is it? thanks!
perldoc -f system and look at the explanation of the return
value. Same 'wait' returns are applicable.
hth,
--
Charles DeRykus
------------------------------
Date: Wed, 14 Oct 1998 15:23:10 -0500
From: "Charlene Abrams" <caa@strata-group.com>
Subject: Re: fcntl
Message-Id: <703162$rft$1@newsin-1.starnet.net>
Tom Phoenix wrote in message ...
>On Wed, 14 Oct 1998, Charlene Abrams wrote:
>
>> I can't get fcntl to lock my file and have no idea why.
>
>Why aren't you using flock?
I was using fcntl because that's where I was pointed by those I thought In
The Know. Turns out flock does the job for me quite nicely - I had to set
LOCK_EX and LOCK_NB to get the behaviour I wanted.
I still can't figure out *why* fcntl didn't work though - I suspect the
problem was in the third argument (which in C is a structure), but I had no
luck with anything I tried.
Thanks
Charlene
Strata Group, St Louis, Missouri
mailto:caa@strata-group.com
------------------------------
Date: 14 Oct 1998 21:18:09 GMT
From: neilf@lem.prestel.co.uk (Neil Francis)
Subject: Re: How to Adduser/mail for NT ???
Message-Id: <7034eh$qen$1@phys-ma.sol.co.uk>
>I develp software in perl for UNIX, but now we are trying to port our
>programs to Windows. Now we need some function that can do a Adduser (just
>like unix) or a program that can be configured for that! or some documentatio
>to see HOW THE WINDOWS CREATES A USER! but we are bloqued in this point in
>the proyect ...
http://www.activestate.com/
THE WWW site for Win 32 Perl - loads of info.
http://www.roth.net/perl/
win32::AdminMisc module
http://www.vne.com/ora/useradmin/
for the UserAdmin module
>And we need too, a mail program that can be used similar to the sendmail
>command in UNIX...
http://www.demobuilder.com/sendmail.htm
>I.e :
>mail -s"hello this is a test" dragnovich@my-dejanews.com < filename.txt
>
>Note : that we need Perl-Windows help!
Doesn't everyone......
Regards
Neil F
------------------------------
Date: Wed, 14 Oct 1998 20:13:57 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
To: jdf@pobox.com
Subject: Re: matching problems
Message-Id: <7030m5$5ah$1@nnrp1.dejanews.com>
In article <702pd9$q0n$1@nnrp1.dejanews.com>,
ptimmins@netserv.unmc.edu (Patrick Timmins) wrote:
[snip]
> Wrap it in an 'unless':
>
> unless (/___:___/) {
> s/(\w{3}):(\w{3})/wrap stuff around $1 and $2/g;
> }
Jonathan Feinberg is right. The above is wrong. I was (mis)thinking
that there would only be one /(\w{3}):(\w{3})/ match per string,
which is obviously wrong, given the /g modifier :(
Patrick Timmins
$monger{Omaha}[0]
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 14 Oct 1998 20:52:17 GMT
From: sai prasad <sai.prasad@nsc.com>
Subject: Missing files for Win32::Registry
Message-Id: <36250EFF.B0163A31@nsc.com>
I just installed the new ActiveState Perl and it seems as though I am
missing some componets for the win32::registry. My scripts are getting
the following:
Can't locate auto/Win32/RegOpenKeyE.al in @INC (@INC con
tains: C:\Perl\5.00502\lib/MSWin32-x86-object C:\Perl\5.00502\lib
C:\Perl\site\5
.00502\lib/MSWin32-x86-object C:\Perl\site\5.00502\lib C:\Perl\site\lib
.) at C:
\Perl\site\5.00502\lib/Win32/Registry.pm line 625
Can anyone help, I would really appreciate it.
Thanks
------------------------------
Date: Wed, 14 Oct 1998 17:07:38 -0400
From: Michael D Sohn <msda+@andrew.cmu.edu>
Subject: newbie: multidim array format
Message-Id: <0q9F_O200YUf092us0@andrew.cmu.edu>
I'm a new hacker of perl. I've been reading the manuals but I can't
seem to understand how to setup and manipulate multidimensional arrays.
For example, say I have a text file that contains a 3 by 3 matrix of
values:
1 2 3 4
5 6 7 8
9 a b c
I would like to read this file into a variable/array and so that I can
do stuff to any of the `cells'. Something like:
A[2][3] = 4 + A[4][1]
I know Perl doesn't have direct configuration of multidimension. Could
some kind person explain the syntax and approach for doing something
like this?
Thanks,
Mike, trying to be a better perl programmer
------------------------------
Date: Wed, 14 Oct 1998 16:43:40 -0500
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: newbie: multidim array format
Message-Id: <36251B0C.D3614428@us.ibm.com>
Michael D Sohn wrote:
> I would like to read this file into a variable/array and so that I can
> do stuff to any of the `cells'. Something like:
>
> A[2][3] = 4 + A[4][1]
You can do that, you just have to remember to use the correct symbol in
front your variable.
$a[2][3] = 4 + $a[4][1];
Read the docs for more info on "$", "@", and "%".
It sounds like "Learning Perl" might be a good book for you. It comes
in regular and Win32 flavors. I used the regular, Unix, version and
found it to be an excellent source of info when I started learning. I
recommend going through the book page by page until you've used and
understand every example.
You can also check out http://language.perl.com/critiques/index.html for
a list of more books on Perl.
--
James Ludlow (ludlow@us.ibm.com)
(Any opinions expressed are my own, not necessarily those of IBM)
------------------------------
Date: 14 Oct 1998 19:36:28 GMT
From: m9418@abc.se (Jonas Bofjall)
Subject: Passing file handles in strict mode?
Message-Id: <702ufs$96n$1@oden.abc.se>
I read in the camel book that `use strict' was a good thing to do. So I did.
Now it complains a lot when I try to pass a file handle as parameter to a
subroutine. It says that bare words are not allowed to pass. How is the
proper way to do this?
Thanks
// Jonas <job@abc.se> [2:201/262.37]
------------------------------
Date: 14 Oct 1998 21:05:02 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Passing file handles in strict mode?
Message-Id: <7033lu$qu5$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
m9418@abc.se (Jonas Bofjall) writes:
:I read in the camel book that `use strict' was a good thing to do. So I did.
:Now it complains a lot when I try to pass a file handle as parameter to a
:subroutine. It says that bare words are not allowed to pass. How is the
:proper way to do this?
This is in perlsub and perldata.
$data = fn(*FH);
sub fn {
my $fh = shift;
open($fh, "/etc/motd");
my $data = do { local $/; <$fh> };
close $fh;
return $data;
}
Of course, you probably wouldn't bother passing it in, but
just create it locally.
--tom
--
"The reasonable man conforms himself to his environment. The
unreasonable man conforms his environment to himself. Therefore
all change depends on the unreasonable man."
------------------------------
Date: Wed, 14 Oct 1998 15:55:44 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: PERl and HTACCESS authentication
Message-Id: <comdog-ya02408000R1410981555440001@news.panix.com>
Keywords: from just another new york perl hacker
In article <3624E5A4.8DD1E634@planetpod.com>, Stewart Eastham <sme@planetpod.com> posted:
>I have implemented a system where a user logs in through HTACCESS and
>then from there on out I track who they are through the REMOTE_USER
>environment variable. What I would like to do though is to add a button
>that allows the user (or another user) to log in using a
>username/password different than the original. This would require a
>"clearing" of the original login information, so to speak.
see Nick Kew's "Login On the Web" tutorial referenced in the CGI
Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html">.
--
brian d foy <comdog@computerdog.com>
Kernel Steve Austin - stronger, faster, threaded
<URL:http://kernel.steve.austin.pm.org>
------------------------------
Date: Wed, 14 Oct 1998 20:09:47 GMT
From: lietk@my-dejanews.com
Subject: perl recursion
Message-Id: <7030eb$4uu$1@nnrp1.dejanews.com>
I am not able to create a new scope for variables in successive recursions of
a function.
#!/usr/local/bin/perl
$word = $ARGV[0];
scramble("",$word);
sub scramble {
local($lead,$rest) = @_;
local($lim) = length($rest);
for($i = 0;$i < $lim;$i++){
$leadstr = $lead.substr($rest,$i,1);
$remain = substr($rest,0,$i).substr($rest,$i+1);
if($remain eq undef){
print "$leadstr\n";
}
else {
scramble($leadstr,$remain);
}
}
}
if I run perl scramble cat, i get:
cat
when I should get
cat
cta
act
atc
tca
tac
which means that the $lim variable gets reset for all the iterations of the
function.
I must be using "local" incorrectly, but I can't figure out how. Please help.
And thanks in advance.
Karl
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 14 Oct 1998 20:42:07 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: perl recursion
Message-Id: <Pine.GSO.4.02A.9810141331580.1979-100000@user2.teleport.com>
On Wed, 14 Oct 1998 lietk@my-dejanews.com wrote:
> I am not able to create a new scope for variables in successive
> recursions of a function.
Then you're not doing it right. :-)
> #!/usr/local/bin/perl
Tell perl to warn you of suspicious code with the -w option. Any messages
it gives as a result will be found, with explanations, in the perldiag
manpage.
> $word = $ARGV[0];
> scramble("",$word);
> sub scramble {
> local($lead,$rest) = @_;
> local($lim) = length($rest);
Don't use 'local' until you know the difference between 'local' and 'my'.
Then, when you know the difference, you'll use 'my'. :-)
> for($i = 0;$i < $lim;$i++){
It's more perlish to use a foreach loop here. In fact, your algorithm
seems to be optimized for C. If you want to write Perl, you should try to
use Perl's strengths. :-)
> $leadstr = $lead.substr($rest,$i,1);
> $remain = substr($rest,0,$i).substr($rest,$i+1);
Now, you realize that these are global variables? To keep from using
globals by accident, put 'use strict;' at the top of your program. Of
course, if you intend these to be private variables for each iteration of
this subroutine, you should make them 'my' variables.
> if($remain eq undef){
Don't use undef like this. I think you're wanting to use the empty string
here, or to check the length of $remain.
> print "$leadstr\n";
> }
> else {
> scramble($leadstr,$remain);
> }
> }
> }
I recommend the Llama book (Learning Perl), which you should be able to
get through any good bookstore. Have fun with Perl!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 14 Oct 1998 19:43:49 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl/CGI with SUID question
Message-Id: <Pine.GSO.4.02A.9810141243031.1979-100000@user2.teleport.com>
On Wed, 14 Oct 1998, Timothy H. Heaton wrote:
> when you set SUID for the script, Perl disables many commands
No, it doesn't. But read the perlsec manpage to see what's really going
on. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 14 Oct 1998 20:16:21 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Perl/CGI with SUID question
Message-Id: <702ta5$g8$1@gellyfish.btinternet.com>
On Wed, 14 Oct 1998 13:58:45 -0500 Timothy H. Heaton <theaton@usd.edu> wrote:
> I have long been writing CGI scripts with Perl on UNIX, and I recently
> found that you can set the script for SUID (CHMOD 4711) to have the script
> run as you rather than the web (NOBODY or DAEMON). But when you set SUID
> for the script, Perl disables many commands such as SYSTEM, EXEC, and in
> some cases UNLINK, CHMOD, CHDIR, and even OPEN. Figuring out whether a
> given command will work or not seems very complicated (OPEN works for some
> paths but not for others, for example).
>
> Does anyone know where I can find a list of the commands that are disabled
> by Perl with SUID? Testing each one is driving me crazy &~%*&^@!
Check the perlsec manpage for details on this.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 14 Oct 1998 16:46:21 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: Please help me!! Connecting to Oracle
Message-Id: <7032it$m9b$1@tholian.cse.psu.edu>
http://www.perl.org/CPAN/modules/00modlist.long.html
John
groenveld@acm.org
------------------------------
Date: Wed, 14 Oct 1998 16:00:47 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Sending mail via CGI/Perl ?
Message-Id: <comdog-ya02408000R1410981600470001@news.panix.com>
Keywords: from just another new york perl hacker
In article <702h5k$4oj$1@news-1.news.gte.net>, Burt Adsit <burt.adsit@gte.net> posted:
>Ya, I just use sendmail:
>
> open(MAIL,"|/usr/lib/sendmail -t");
that's not the best way to do that either:
open MAIL, "| /usr/lib/sendmail -oi -odq -t";
--
brian d foy <comdog@computerdog.com>
Kernel Steve Austin - stronger, faster, threaded
<URL:http://kernel.steve.austin.pm.org>
------------------------------
Date: Wed, 14 Oct 1998 16:46:11 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Sorry
Message-Id: <36250D93.9044862E@min.net>
Tad McClellan wrote:
>
> New stuff, even stupid new stuff, is welcomed.
Right; like "Why is Perl so much worse than Python?"
--
John "Many Jars" Porter
baby mother hospital scissors creature judgment butcher engineer
------------------------------
Date: Wed, 14 Oct 1998 16:24:51 -0400
From: John Porter <jdporter@min.net>
Subject: Re: sorting hack
Message-Id: <36250893.6FB0A68E@min.net>
Larry Rosler wrote:
>
> Essentially what you are saying is that, absent an infinitely parallel
> computer, significant computation involves looping somewhere. Yes. But
> this is not what you were addressing in your generalization about the
> sort requested.
Or rather, that is not the kind of looping Xah was worried about
(I'm guessing), so to make an issue of it is a red herring.
Implicit loops that gather all the elements out of an array --
that's the kind of thing he's concerned about.
--
John "Many Jars" Porter
baby mother hospital scissors creature judgment butcher engineer
------------------------------
Date: Wed, 14 Oct 1998 20:17:16 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: splitting on meta chars
Message-Id: <Pine.GSO.4.02A.9810141315140.1979-100000@user2.teleport.com>
On Wed, 14 Oct 1998 valis@pacbell.net wrote:
> I have to split the records depending on the delimiter which could be
> any meta char (\, $, |, etc)
Sounds as if you want quotemeta. Or its cousin, \Q.
> $delim = $something;
> @fields = split /\$delim/;
You're close, but you've just backwhacked the dollar sign! :-)
@fields = split /\Q$delim/;
Look for quotemeta in the perlfunc manpage to see what this is doing
and whether it's what you need. Also, see whether the /o option for
the pattern is appropriate. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 14 Oct 1998 19:59:57 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Using Package Manager from the Win32 RK
Message-Id: <702sbd$fl$1@gellyfish.btinternet.com>
On Wed, 14 Oct 1998 11:39:28 -0600 Alex Tatistcheff <alext@cri-boi.nospam.com> wrote:
> I'm trying to install some perl modules using the Perl Package Manager
> in the O'Reilly Perl Resource kit. The problem is that I connect to the
> Internet via a proxy so the package manager can't find the ppd files.
> Is there a place I can go and download the PPD files so I can install
> them locally?
>
If you set the environment variable HTTP_PROXY appropriately then it
should work fine e.g:
set HTTP_PROXY=http://proxy.server:80
It works for me even through the accursed MS Proxy Server.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3975
**************************************