[15456] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2866 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 26 06:05:22 2000

Date: Wed, 26 Apr 2000 03:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <956743510-v9-i2866@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 26 Apr 2000     Volume: 9 Number: 2866

Today's topics:
        adding a path <vivekvp@spliced.com>
    Re: adding a path <billy@arnis-bsl.com>
        Can anyone recommend a good book <rendle@clara.co.uk>
    Re: Date standardization without Date::Manip <gellyfish@gellyfish.com>
    Re: Efficient manipulation of simple date? <sb@muccpu1.muc.sdm.de>
        files redirection to an external program <alogean@pharma.ethz.ch>
        GD: Problem in installing GD 1.20-1.27 (Stearns25)
    Re: Has anyone used the pro ver of Perl Scripting Tool  <you.will.always.find.him.in.the.kitchen@parties>
    Re: How to delete multiple files from an array of file  <you.will.always.find.him.in.the.kitchen@parties>
        How to install perl on win98 <yk@pcmaul.com>
    Re: How to install perl on win98 <mattking@techie.com>
    Re: How to replace these  strings in a html file (2nd p <gellyfish@gellyfish.com>
    Re: HOW? auto execute perl on start session <gellyfish@gellyfish.com>
        Is there a script for testing DNS entries <csabine@ocdgb.jnj.com>
    Re: JPL install trouble on WinNT <gellyfish@gellyfish.com>
    Re: Keystrokes on Win32 (Eric Bohlman)
    Re: Matching "[" ? <gellyfish@gellyfish.com>
    Re: Newbie question (Sam Holden)
    Re: Newbie question <rhomberg@ife.ee.ethz.ch>
    Re: Newbie question <adams1015@worldnet.att.net>
    Re: newbie: camel vs. llama (ken_i_m)
    Re: newbie: camel vs. llama <jesucristo2@netscape.net>
    Re: Opening /var/spool/mail/username <ok@tor.ch>
    Re: oracle client instalation <gellyfish@gellyfish.com>
    Re: Passing arguments to a perl script on NT <you.will.always.find.him.in.the.kitchen@parties>
    Re: Perl database Access <gellyfish@gellyfish.com>
        Perlcrt.lib <Jens.Fudge.lpt@indbakke.dk>
    Re: question about formmail <gellyfish@gellyfish.com>
    Re: Security: why no '.' in path? <you.will.always.find.him.in.the.kitchen@parties>
    Re: SNMP module examples? (Hans J Jakobsen)
    Re: system return code problem <gellyfish@gellyfish.com>
    Re: win32 ftp module... <gellyfish@gellyfish.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 26 Apr 2000 09:26:23 GMT
From: vivekvp <vivekvp@spliced.com>
Subject: adding a path
Message-Id: <8e6cnl$g3v$1@nnrp1.deja.com>

 Hello,

I am getting this error when I install a cgi script - napster:

Can't locate CGISOCK.pm in @INC (@INC contains: /usr/lib/perl5/i386-
linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-
linux /usr/local/lib/site_perl .)
at /disk1/x/xxxxxx/public_html//inapster.cgi line 4.
BEGIN failed--compilation aborted
at /disk1/x/xxxxxxx/public_html//inapster.cgi line 4.

Can I put cgisock.pm into my local directory (public_html) and poing
@INC to it?  If so, how?
Or is CGISOCK.pm bombing because the file itself requires some other
files?

Thanks,

V

--
May your bad hair days be few.  This does not
apply to the bald.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 26 Apr 2000 09:39:16 GMT
From: Ilja <billy@arnis-bsl.com>
Subject: Re: adding a path
Message-Id: <8e6dg3$gp8$1@nnrp1.deja.com>

In article <8e6cnl$g3v$1@nnrp1.deja.com>,
  vivekvp <vivekvp@spliced.com> wrote:
>  Hello,
>
> I am getting this error when I install a cgi script - napster:
>
> Can't locate CGISOCK.pm in @INC (@INC contains: /usr/lib/perl5/i386-
> linux/5.004 /usr/lib/perl5 /usr/local/lib/site_perl/i386-
> linux /usr/local/lib/site_perl .)
> at /disk1/x/xxxxxx/public_html//inapster.cgi line 4.
> BEGIN failed--compilation aborted
> at /disk1/x/xxxxxxx/public_html//inapster.cgi line 4.
>
> Can I put cgisock.pm into my local directory (public_html) and poing
> @INC to it?  If so, how?

1. Put CGISOCK.pm in /some/directory.

2. In your script:

use lib '/some/directory';

3. And  don't put your modules into your public_html directory.

Ilja.



Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 26 Apr 2000 10:31:58 +0100
From: "Mark Rendle" <rendle@clara.co.uk>
Subject: Can anyone recommend a good book
Message-Id: <VGyN4.3759$OO6.373175@nnrp4.clara.net>

I'm completely new to perl, never seen it before, but I've been programming
for over 10 years, used Unix ksh, still remember some awk, more recently
been using VC++ and VB, HTML and Javascript, need to learn CGI/Perl in a
hurry. Can somebody recommend the best book to go from knowing nothing of
perl to competent CGI scripting in about a week? Looked on amazon.co.uk but
the reviews contradict each other horribly...

Thanks in advance,

--

Mark R
http://www.markrendle.co.uk (new and improved!)





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

Date: 26 Apr 2000 07:51:21 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Date standardization without Date::Manip
Message-Id: <8e63l9$em4$1@orpheus.gellyfish.com>

On Tue, 25 Apr 2000 01:21:38 GMT drode@my-deja.com wrote:
[Tom Briles wrote]:
>>
>> Place your response *after* the quoted text.  Properly quote the message
>> so that the author is attributable.
>>
>> Did you bother following Tom Phoenix's advice?  Well, you should.
>>
>
> Your *opinion* on the proper method to quote is noted.
> 

It is not an opinion: it is a long standing convention and de facto standard.
Failure to comply due to ignorance or inadequate software will not result
in your posts being filtered by regular posters here.  *Refusal* to do so is
highly likely to do that.

> To your point: Yes, I did read the Date::Manip Perldoc and the "SHOULD I
> USE DATE::MANIP" section. I read this prior to my initial post.
> 
> My question remains unanswered. Has anyone done anything similar and
> would that person be willing to share a brief note on how the problem
> was solved.
> 

If your dates are sufficiently regular in form then you should be able
to parse them using a variety of regular expressions to obtain the
individual elements.  You should read the perlre manpage if you are
uncertain how you might do that.  To obtain a date of regular format
you can use the strftime() function in the POSIX module (which is Part
of the standard distribution).

/J\
-- 
There you go again, always taking someone else's side. Flanders, the
water department, God...
-- 
fortune oscar homer


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

Date: 26 Apr 2000 08:54:07 GMT
From: Steffen Beyer <sb@muccpu1.muc.sdm.de>
Subject: Re: Efficient manipulation of simple date?
Message-Id: <8e6arf$ssm$1@solti3.sdm.de>

In article <8e4kj9$f9h$1@panix.com>, Jesse T Sheidlower <jester@panix.com> wrote:

> I have a relatively simple problem with manipulating date
> formats, but the recent thread on Date::Manip seems to
> suggest that it's a large and slow module to use, so I
> was hoping to get some advice on the best way of approaching
> my problem.

> I am getting data into a bibliographic field that can be in
> various formats, such as "21 Nov.", "Nov. 21," "21 November,"
> plain "Nov." or "November", and things without months such
> as "Spring".

> I want to have two variables, one with an abbreviated month
> name and one with the name in full; if there is a day-date
> it should precede the month. Thus "21 Nov." and "21 November"
> with a day, "Nov." and "November" without, and anything without
> a month, such as "Spring," should be untouched.

> This isn't a major part of my program so I don't want to 
> clog it up with Date::Manip if that's really such a slow
> module,

Date::Manip is not a slow module. It is very mighty (i.e., offers
a lot of functionality) and therefore there is an (unavoidable)
speed penalty involved in using it. For some people and some
applications this natural speed penalty can be too much. But for
what you want, it sounds like the ideal match.

> but it does seem as if that module would make it
> easy to deal with this. On the other hand, unlike the poster
> in the previous thread, I'm not doing especially complex
> manipulations,

That's what you *think* - but you're mistaken! :-)

> so perhaps there's a simpler way.

Good luck!
-- 
    Steffen Beyer <sb@engelschall.com>
    http://www.engelschall.com/u/sb/whoami/ (Who am I)
    http://www.engelschall.com/u/sb/gallery/ (Fotos Brasil, USA, ...)
    http://www.engelschall.com/u/sb/download/ (Free Perl and C Software)


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

Date: Wed, 26 Apr 2000 11:42:41 +0200
From: Logean Antoine <alogean@pharma.ethz.ch>
Subject: files redirection to an external program
Message-Id: <3906BA11.D2B3962E@pharma.ethz.ch>

Hy,

I use a program XXX that needs as input :


complex17.topol
1
complex17.mincrd
1
complex17.min.pdb


I can store these 5 lines in a script "input.txt" and direct or pipe
it to XXX :

% input.txt > XXX

or 

% cat input.txt | XXX

OK

Now I must perform that a lot of times so I want to write a perl script
to automatize that :

I wrote this perl script :
------------------------------------------------------------------ 
#!/usr/sbin/perl -w

$num = 17;
$input = "complex" . $num . ".topol\n";
$input .= "1\n";
$input .= "complex" . $num . ".mincrd\n";
$input .= "1\n";
$input .= "complex" . $num . ".min.pdb\n";
open TRANS, "| pamb" or die "can not open the pipe : $!";
print TRANS $input;
close TRANS or die "can not close the pipe : $!";

-------------------------------------------------------------
error :

Can't exec "pamb": Permission denied at concane.pl line 9.
can not close the pipe :  at concane.pl line 11. 


or 
--------------------------------------------------------------
#!/usr/sbin/perl -w
 
$num = 17;
$input = "complex" . $num . ".topol\n";
$input .= "1\n";
$input .= "complex" . $num . ".mincrd\n";
$input .= "1\n";
$input .= "complex" . $num . ".min.pdb\n";

system("$input > pamb");
----------------------------------------------------------------


error :

sh: complex17.topol: cannot execute
sh[2]: 1:  not found
sh[3]: complex17.mincrd: cannot execute
sh[4]: 1:  not found
sh[5]: complex17.min.pdb:  not found       

so it does not work.

How can i do that properly, I mean creation of an input file and
redirection of it to an external program ?

How can I store permanently this input-file (in my case $input) in a
file on the hard disc ?

What is exactly the difference between a redirection ant a pipe ?

Thank you for your help 


Antoine


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

Date: 26 Apr 2000 09:51:41 GMT
From: stearns25@aol.com (Stearns25)
Subject: GD: Problem in installing GD 1.20-1.27
Message-Id: <20000426055141.13019.00000482@ng-ch1.aol.com>

hello all,

I need some help in installing the GD.pm  package in my RH 6.0 box.  Perl 5.005
is already fully installed and functional.  We need GD in order to use the
Barcode module.

The problem I ran into is:  perl Makefile.PL  said everything is OK, but when I
do a make,  I got the following errors:

     In function 'XS_GD__Image-gd2':
     'GD2_FMT_COMPRESSED' undeclared (first use in this function)

I also saw several warning about "assignment makes pointer from integer without
a cast'.

The make session ended with  "make: *** [GD.o] Error 1.

Judging from the last message, I guess  make failed because of an undeclared
identifier.   I tried all versions 1.20 - 1.27 with no success.

How do I resolve this to install GD?

Thanks.

-Stearns


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

Date: Wed, 26 Apr 2000 19:11:44 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: Has anyone used the pro ver of Perl Scripting Tool if so is it any good?
Message-Id: <956733033.575068@shelley.paradise.net.nz>


"Scotty" <scotnet@sympac.com.au> wrote in message
news:39052E52.4096E1E5@sympac.com.au...
> Hi there,
>
> I was looking into buying the pro version of the program Perl Scripting
> Tool just wondering if
> other have found it worth the money?
>
> http://www.perlscriptingtool.com/

You've already posted this to comp.infosystems.www.authoring.cgi, so why did
you post another copy here?  Learn about cross posting, but first learn how
to post to appropriate newsgroups.




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

Date: Wed, 26 Apr 2000 19:16:23 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: How to delete multiple files from an array of file names?
Message-Id: <956733312.286352@shelley.paradise.net.nz>


"Scotty" <scotnet@sympac.com.au> wrote in message
news:3905A964.3E4CB5A1@sympac.com.au...

You've already posted this in comp.infosystems.www.authoring.cgi, so why did
you do it again?  Learn how to use crossposting, but first learn how to post
to appropriate newsgroups.




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

Date: Wed, 26 Apr 2000 16:50:21 +0800
From: "kk" <yk@pcmaul.com>
Subject: How to install perl on win98
Message-Id: <8e6a91$pqb@netnews.hinet.net>

plese show me the way for install perl on win 98!!
thanks!!




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

Date: Wed, 26 Apr 2000 11:18:42 +0200
From: "Matt King" <mattking@techie.com>
Subject: Re: How to install perl on win98
Message-Id: <8e6ca5$26hc$1@news2atm.raleigh.ibm.com>

Download the Active Perl version for Win32. Works just fine on Windows
95/98/NT/2000. (Yes, I tried this on all these OS's)

Matt




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

Date: 26 Apr 2000 07:27:56 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How to replace these  strings in a html file (2nd post)
Message-Id: <8e629c$a6n$1@orpheus.gellyfish.com>

On Tue, 25 Apr 2000 10:54:48 -0700 Tom Phoenix wrote:
>               you must have noticed at least two or three people who
> post frequently, politely, and accurately.
> 

And some who post frequently, impolitely and inaccurately ;-}

/J\
-- 
You couldn't fool your mother on the foolingest day of your life if you
had an electrified fooling machine.
-- 
fortune oscar homer


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

Date: 26 Apr 2000 07:25:43 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HOW? auto execute perl on start session
Message-Id: <8e6257$9pc$1@orpheus.gellyfish.com>

On Tue, 25 Apr 2000 05:56:44 GMT Joshua Cheng wrote:
> 
> 
> Hi..
> does PERL have features like global.asa (in ASP) (to execute command
> lines on start session) ? plz let me know the filename?
> 

No.  Perl doesnt even have the idea of a 'Session' in the way that you
mean.  Perl is a programming language whereas ASP is a proprietary
technology for server side scripting on Microsoft systems.  If you
want to ask general questions about the 'Common Gateway Inerface' which
I assume is what you are talking about then you will be better off asking
in the group : comp.infosystems.www.authoring.cgi

/J\
-- 
Aah! Bogeyman! You nail the windows shut, I'll get the gun!
-- 
fortune oscar homer


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

Date: Wed, 26 Apr 2000 09:59:29 +0100
From: "Colin Sabine" <csabine@ocdgb.jnj.com>
Subject: Is there a script for testing DNS entries
Message-Id: <8e6b5f$g6411@news.jnj.be>

Hi
Does any one know of a script that scans through a DNS zone file and tests
to see if a host is alive. I know this would be simple to write, but hey why
re-invent the wheel!

Regards
Colin.




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

Date: 26 Apr 2000 08:22:15 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: JPL install trouble on WinNT
Message-Id: <8e65f7$kjg$1@orpheus.gellyfish.com>

On Tue, 25 Apr 2000 07:52:36 GMT Jens Fudge wrote:
> I've downloaded the JPL, and by following the "Installation under Microsoft
> Windows" in the readme, I come to the following problem...
> 
> 1) I edit the setvars.pl script as described
> 
> 2) I CD to the JLP dir, I type:
>     perl Makefile      result is ok
>     nmake                I get the "The name specified is not rcognized as
> an internal or external command..." error, I cannot find anything on my disk
> with this name
>     nmake install      Same as above..
> 
> What am I doing wrong???  I have also tried with just "make" but this is
> likewise not working
> 

If you havent got 'nmake' you will not have a compilation system and you
need that to build this.

/J\
-- 
Beer. Now there's a temporary solution.
-- 
fortune oscar homer


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

Date: 26 Apr 2000 09:21:00 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Keystrokes on Win32
Message-Id: <8e6cds$461$1@nntp9.atl.mindspring.net>

neilmoomey@my-deja.com wrote:
: Is it possible to use Perl to open up a Windows
: application like MS Word or Adobe Acrobat and
: enter short cut keystrokes.  I am trying to
: automate word to pdf on a server.  Thanks a bunch.

The usual way of accomplishing this would be to use Win32::OLE, which 
doesn't actually work by faking keystrokes, but rather by manipulating 
Word's or Acrobat's object model.



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

Date: 26 Apr 2000 08:05:33 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Matching "[" ?
Message-Id: <8e64ft$hct$1@orpheus.gellyfish.com>

On Mon, 24 Apr 2000 20:22:14 GMT psyshrike@my-deja.com wrote:
> Hey,
> 
> I want to match /\c[[A/ (up arrow) but \ does not escape [

You almost certainly dont want to use a regular expression to do that
anyhow as nearly any system that has multi-character codes for special
keys will return them one character at a time for successive calls of
getc() (or whatever).

So for the first call to getc() you will get chr(27) (ESC) so you know
you will need to read more characters.  The next read will be '[' so
you now know this is a cursor key and need to read a further character
to find out which one.

If for some reason you do have that sequence of characters in a $variable
that you need to check you are better off with the equality operator:

  my $down_key = chr(27) . "[A";

  print "Down !\n" if $variable eq $down_key;
 
BTW 'A' indicates the 'down' key.  I have code here that thinks it
does and it certainly works ;-}

/J\
-- 
Marge! Look at all this great stuff I found at the Marina. It was just
sitting in some guy's boat!
-- 
fortune oscar homer


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

Date: 26 Apr 2000 07:29:04 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Newbie question
Message-Id: <slrn8gd6m0.f2e.sholden@pgrad.cs.usyd.edu.au>

On Wed, 26 Apr 2000 15:05:22 +0800,
	Maciej Mastalarczuk <maciek@treko.net.au> wrote:
>> For security reason, never put a password in a script.
>> Hackers may access to it and get root password.
>> Very dangerous.
>>
>> Better to run it from root user or use synchronize processes.
>>
>> regards
>> Frederic Aussedat
>
>Thanks for the reply.
>The problem is that I need to run this script from a webpage. That means I
>would have to run Apache as root. This is dangerous too.

So make the perl program setuid root...

And read the perlsec documentation...

twice...

-- 
Sam

the Emacs editor is horrible
	--Linus Torvalds


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

Date: Wed, 26 Apr 2000 11:30:14 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Newbie question
Message-Id: <3906B726.93E7E654@ife.ee.ethz.ch>

Maciej Mastalarczuk wrote:

> Thanks for the reply.
> The problem is that I need to run this script from a webpage. That means I
> would have to run Apache as root. This is dangerous too.

Make the script suid root and read the perlsec manpage as suggested by
Sam.

Better yet, write a program/script that does only the root action, chmod
that to suid root and call it from your script.

- Alex


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

Date: Wed, 26 Apr 2000 09:38:32 GMT
From: "Veronica Adams" <adams1015@worldnet.att.net>
Subject: Re: Newbie question
Message-Id: <sOyN4.35342$WF.1703836@bgtnsc04-news.ops.worldnet.att.net>


Maciej Mastalarczuk <maciek@treko.net.au> > It possible to substitute user
within perl script? Say script is
> executed by nobody, but has to perform root action. Can I put encrypted
> root password inside the script and revoke root rigths when the action
> is finished?
>
Don't do this. If you do send me the url to the site :P

No, but seriously,
I'll assume that  you know what root is. I'm no unix guru but I do know how
serious root access is. If you don't know get a book on unix or find an
appropriate newsgroup for unix.
Now onto the script issue. You never want to put any password or other
critical information inside your script. Why? A hacker can simply download
the scipt and take the password out of the script. Simple. Encryption is
just an irritation to a decent hacker. Naming the file .cgi won't stop them.
Neither will placing it in a executable dir.  Then they've got root to your
ENTIRE system. This includes the other web developers/sites that may be
sharing that server with you. This could potentially cost more than a little
dough. At the very least an enormous headache.

What exactly do you need to do that requires root?
If you absolutely need root use setuid




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

Date: Wed, 26 Apr 2000 08:13:15 GMT
From: ken_i_m@linuxstart.com (ken_i_m)
Subject: Re: newbie: camel vs. llama
Message-Id: <3906a406.63230426@news.mcn.net>


>Well there are these big furry things with legs at the corner.  Some of
>them are smaller and live in the Andes and have rather an unpleasant
>reaction to things that displease them. 

There is a racher here in the valley where I live that is using
llama's to guard her sheep flocks from wolves. It is a cool
alternative to the old school habit of shooting the wolves on sight.

I think, therefore, ken_i_m


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

Date: Wed, 26 Apr 2000 09:22:58 GMT
From: octinomos endemoniado <jesucristo2@netscape.net>
Subject: Re: newbie: camel vs. llama
Message-Id: <8e6ch8$fk2$1@nnrp1.deja.com>

On Tue, 25 Apr 2000 14:15:47 GMT, Elaine Ashton <elaine@chaos.wustl.edu>
wrote:
#
# in article 8e3fib$di3$1@nnrp1.deja.com, octinomos endemoniado at
# jesucristo2@netscape.net quoth:
# > what do you mean it doesn't spit?
#
# Well...I was being flip with regard to llamas and camels.

OIC - I was just wondering if it was related to Perl somehow...
there must be a reason why each animal was chosen for each
book, but i don't know enough about them to figure it out...
it might be a clue as to content...  i know a camel will go for
a long time with no water, but it evades me what that might mean.

#
# > is amazon really 50% off? i saw them at 20% off
# > at Fatbrain.com... but if they're really that cheap
#
# http://www.bookpool.com/ often has the best discounts,

thanks, looks like a good site! :>

# fatbrain isn't bad either. The thing is though is that you have to
# take the sum of the amount saved per book then weigh that against
# shipping vs. taxes in your state. Sometimes it isn't worth it.

i know what you mean, one time i ordered some diving lights through
the internet for 18 dollars each plus 10 dollars shipping--
and like an idiot didn't realize it was only one, so i had
to order a second one so i ended up paying 20 dollars shipping--
and a couple of weeks later saw them at the mall for 15 dollars each.
i would have never known about them being at the mall, tho, if it
weren't for the fact i was looking for replacement bulbs and wasn't
willing to pay the ridiculous shipping cost...and whoever said you
don't pay taxes on the internet is full of crap... i paid taxes, too.

#
# e.
#

Jesus Christ 2

                      Esoterick : Linkz
                 http://dennes.freeshell.org

_________________________________________________


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Wed, 26 Apr 2000 11:10:52 +0100
From: "Oli Kessler" <ok@tor.ch>
Subject: Re: Opening /var/spool/mail/username
Message-Id: <8e6bpd$bvb$1@dino.active.ch>

In article <390632E6.D9E3D185@searchy.net>, Penpal International
<ppi@searchy.net> wrote: 
> I have a little problem with opening /var/spool/mail/username . The 
> permission of it is -rw------ and it the owner of it is 'username'. But
> how can I open this file via the HTTPDeamon? Is it possible anyway? If
> it is possible it could save me a lot of trouble with all kind of
> strange modules (I'm not realy a big fan of those modules).
> 
> Thanks, 
> 
> Frank de Bot 
> 
> 

It will only be possible if you set your perl script suid root, a practice
commonly used when implementing webmailers that access the mailboxes directly.
Notice however, this is a major security risk (assuming you will be accepting 
input over the web .......). 

Consider also using a Imap or POP server in-between like the following:

mailer.cgi <-----> IMAP server <-----> /var/spool/mail/X

and restrict the access to the IMAP server to localhost 
(via /etc/hosts.[allow|deny] )

-ok




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

Date: 26 Apr 2000 06:51:54 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: oracle client instalation
Message-Id: <8e605q$37u$1@orpheus.gellyfish.com>

On Tue, 25 Apr 2000 16:51:55 GMT jumac@my-deja.com wrote:
> Hi,
> 
> I need install an perl Oracle client in a Linux box to make querys
> to a Oracle database installed in another machine (running HPUX).
> 
> Somebody knows what packages I need install?
> 
> I need files/packages form Oracle?
> 

Yes.  You will need at the very least the oracle client libraries.  I
am pretty sure that you can download them for nothing for a variety of
platforms from their website.

/J\
-- 
Look at this country--U R Gay.
-- 
fortune oscar homer


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

Date: Wed, 26 Apr 2000 19:18:24 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: Passing arguments to a perl script on NT
Message-Id: <956733433.789896@shelley.paradise.net.nz>


"Ivo Swartjes" <i.m.t.swartjes@wmw.utwente.nl> wrote in message
news:8e4bvf$2rd$1@dinkel.civ.utwente.nl...
> Hello all,
>
> Call me weird or not, but I've browsed to many perldocs and perlfaqs to
find
> out how to pass arguments to a perl script when runned on an NT server.
>
> I would like to debug a script I made, and would like to have
functionality
> that the following line implies:
>
> perl   log.pl   "name=Test&password=Test"
>
> I'm pretty sure something like that can be done, I just don't know the
> syntax.

This is nothing to do with Perl as it is the same issue for any language and
CGI.  You need to read up CGI FAQ's.




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

Date: 26 Apr 2000 06:59:01 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl database Access
Message-Id: <8e60j5$4j9$1@orpheus.gellyfish.com>

On Tue, 25 Apr 2000 14:54:22 -0300 Gil Vautour wrote:
> 
> I was wondering if it is possible to access a MS Access database on a
> Solaris box using Perl and DBI?  If so, are there any good resources
> on the Web for this sort of thing?
> 

There are at least two optons.  Neither of which involves reading Access
file directly on the Solaris box.  Firstly you can export the data to
some format that can easily be read on the Unix machine (such as CSV) or
you can export it and import it into some database running on the
Solaris machine.  Alternatively you can run dbiproxy on some windows
machine with an ODBC DSN set up for your Access database and use the
DBI driver DBD::Proxy to access it from your Solaris.  Bear in mind that
Access is by no means a proper multiuser database and you are highly
likely to break it if you put it under any significant load.

/J\
-- 
Marge, it takes two to lie. One to lie and one to listen.
-- 
fortune oscar homer


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

Date: Wed, 26 Apr 2000 07:42:08 GMT
From: "Jens Fudge" <Jens.Fudge.lpt@indbakke.dk>
Subject: Perlcrt.lib
Message-Id: <k5xN4.239$pR5.14430@news.worldonline.dk>

Hi all

I have been trying to install JPL (Java Perl Lingo), I'm not very
successfull though, as it seems I need a file called perlcrt.lib. Apparently
this file should be located in \perl\lib\core but it is not there.
I have seen the file referenced i several newsgroups, I need to copy it into
my JNI library (in JPL).
I have downloaded and installed activePerl version 5.6.0. 613

Any help (send the file via email, or point me to somewhere where I can
download it...) would be appreciated.

Jens Fudge, LPTdata aps




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

Date: 26 Apr 2000 07:02:36 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: question about formmail
Message-Id: <8e60ps$59s$1@orpheus.gellyfish.com>

On Tue, 25 Apr 2000 15:55:10 +0200 Patrick wrote:
> I have made a form In this form the user can type their email address. Now I
> want to sent a copy to us and to the email address provided by the user.
> I have the following, but this is just for own our:
> 
> $should_i_mail = "yes";
> $should_i_send_user_email = "yes";
> $email_of_sender = "name\@domain.com;
> $email_to = "name\@domain.com;
> $email_subject = "test";
> 
> 
> What is the line to enter to use for user emailaddress??
> Is it something like:
> 
> $email_cc = $emailbsm;
> 
> emailbsm is the variable i use in the form.
> 

Probably but as you dont show use either where those variables are
assigned or used its a little difficult to be more specific.

/J\
-- 
I'm a white male, age 18 to 49. Everyone listens to me, no matter how
dumb my suggestions are.
-- 
fortune oscar homer


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

Date: Wed, 26 Apr 2000 19:22:16 +1200
From: "Tintin" <you.will.always.find.him.in.the.kitchen@parties>
Subject: Re: Security: why no '.' in path?
Message-Id: <956733665.870548@shelley.paradise.net.nz>


<jlamport@calarts.edu> wrote in message news:8e4ldb$jvs$1@nnrp1.deja.com...
> Okay, I've been reading the CGI security FAQs, and there's one
> recommendation that I'm not sure I understand:  why is it bad to have the
> current directory in the search path?  And does this only apply to the
> path, or to @INC as well?  I mean, the directory in which the current
> script is running is *obviously* one that I'm not going to let random
> people write to.  So why is it any more dangerous to search in '.' than
> in any other part of the system?

Let's say someone copies rm to /tmp/ls.  You do a ls *.pl and voila, there
goes all the *.pl files.




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

Date: 26 Apr 2000 09:55:43 +0200
From: hjj@news1.tele.dk (Hans J Jakobsen)
Subject: Re: SNMP module examples?
Message-Id: <8e67dv$lc1$1@news1.tele.dk>

Mike Ayers <do.not.mail.me@null.net> writes:


>	I have UCD-SNMP installed, and the SNMP module for it as well.  However
>'perldoc SNMP' is a bit obtuse.  Can anyone point me to some elementary
>code that uses the SNMP module?  I just need to see some sets typed out,
>etc. so that I can grasp the format, since I couldn't quite interpret
>what the doc said.

Is it the SNMP-1.8.2 module you have installed?
Have you read the README that is part of the module?
There are some examples in the examples directory.

I have with succes used the pingmib.pl script as starting point.
(but now my problem is that I want to it all in parrallel)

/hjj
-- 
Hans Jørgen Jakobsen


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

Date: 26 Apr 2000 08:19:34 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: system return code problem
Message-Id: <8e65a6$k2p$1@orpheus.gellyfish.com>

On Tue, 25 Apr 2000 11:27:14 -0600 Al Bundy wrote:
> I am trying to execute a system call such as:
> 
> system( "myprogram | tee afile.log" );
> 
> In a Unix shell, executing "myprogram | tee afile.log" always
> returns the exit status of myprogram, which is what I desire.
> 
> When I do this in Perl 5, forcing a return code of 127 in myprogram,
> the above  system call returns 0.
> 

This will be the exit code of the shell that Perl execs to run your
pipeline. Unavoidable I'm afraid.
 

> If I remove the "| tee afile.log" from the system command, the
> return value is as expected, 32512.  (127 * 256).
> 

Because there are no shell metacharacters in there the shell does not
need to be used and 'myprogram' is exec'ed directly.

> Any ideas on how to get around this?  I can not simply add
> "> afile.log" to the command due to other requirements.

Implement the functionality of 'tee' within your perl program ?

I recall Tom Christiansen posting an example of tee'ing here some time
ago and i am fairly sure there is a 'tee' replacement in the 'Perl Power
Tools' which you might want to take a look at the code of. I'm sure
someone will come up with the URL ;-}

/J\
-- 
America's health care system is second only to Japan... Canada, Sweden,
Great Britain, ... well all of Europe. But you can thank your lucky
stars we don't live in Paraguay!
-- 
fortune oscar homer


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

Date: 26 Apr 2000 07:14:30 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: win32 ftp module...
Message-Id: <8e61g6$7kj$1@orpheus.gellyfish.com>

On Tue, 25 Apr 2000 15:06:16 +0100 Kourosh A Mojar wrote:
> Dear all,
> 
> I am a moderately novice perl programmer. I am using perl (win32) to
> automate some ftp tasks. I was using cross platform perl before which
> worked great. Now I am using win32 I have installed the NetLib module (I
> think I did it properly) although I cannot continue to work with my ftp
> scripting. I get an error:
> 
> "can't call method "login" without a package or object reference at ...
> line... etc."
> 

You should set the 'Debug' property for the new Net::FTP object and check
the success of the contructor :


  my $ftp = Net::FTP->new("some.host.name", Debug => 10)
            || die "$@\n";

You will then most probably get enough information to be able to resolve
your problem.

/J\
-- 
No matter how good you are at something, there's always about a million
people better than you.
-- 
fortune oscar homer


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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

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

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


------------------------------
End of Perl-Users Digest V9 Issue 2866
**************************************


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