[13782] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1192 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 27 22:47:42 1999

Date: Wed, 27 Oct 1999 19:47:26 -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: <941078845-v9-i1192@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 27 Oct 1999     Volume: 9 Number: 1192

Today's topics:
    Re: permisson problem on WRITE -- strange (Jenda Krynicky)
    Re: permisson problem on WRITE -- strange edward_grossman@my-deja.com
        PM.org Gone Awry? <spudzeppelin@home.com>
    Re: PM.org Gone Awry? (Greg Bacon)
    Re: PM.org Gone Awry? (brian d foy)
    Re: PM.org Gone Awry? (Randal L. Schwartz)
        pop3 and perl <shad_sluiter@my-deja.com>
    Re: pop3 and perl <rootbeer@redcat.com>
        POST data to a perl program, from a perl program (Max)
        print to multiple lines <tom.kralidis@ccrs.nrcanDOTgc.ca>
    Re: print to multiple lines (Abigail)
    Re: print to multiple lines <lr@hpl.hp.com>
    Re: print to multiple lines <lr@hpl.hp.com>
    Re: print to multiple lines (Eric Bohlman)
    Re: print to multiple lines (Charles DeRykus)
    Re: print to multiple lines <r28629@email.sps.mot.com>
    Re: print to multiple lines <rootbeer@redcat.com>
    Re: print to multiple lines (Craig Berry)
    Re: print to multiple lines (Craig Berry)
        Problem with alarm() stuckenbrock@my-deja.com
    Re: Problem with alarm() (Clinton Pierce)
        Problem with Win32::Internet, solution is Net::FTP <maurice.maltbia@intel.com>
    Re: Problems with files <gellyfish@gellyfish.com>
    Re: Problems with files <christian@wix.dk>
    Re: Problems with files <rootbeer@redcat.com>
        Problems with loading DBD::Oracle <Harald.Galgon@lhsystems.com>
    Re: Problems with loading DBD::Oracle <james_peregrino@harvard.edu>
    Re: Processing database in Perl <gellyfish@gellyfish.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 26 Oct 1999 18:32:02 GMT
From: Jenda@Krynicky.cz (Jenda Krynicky)
Subject: Re: permisson problem on WRITE -- strange
Message-Id: <1103_940962722@prague_main>

On Sun, 24 Oct 1999 22:14:07 GMT, edward_grossman@my-deja.com wrote:
> However, on my ISPs server, the script ALWAYS allows me to write -- and
> even though the script is being run by the Web user, it seems to run AS
> the owner -- me, and since I have "write" perms everywhere on the site,
> it can do a lot of damage.

Review the "perms" of the script itself. Maybe the suid bit is on.

Or maybe the ISP on purpose changes the efective user to 
the owner of the site the script belongs to.
Ask them.

Jenda
http://Jenda.Krynicky.cz



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

Date: Mon, 25 Oct 1999 21:38:03 GMT
From: edward_grossman@my-deja.com
Subject: Re: permisson problem on WRITE -- strange
Message-Id: <7v2ijr$pdu$1@nnrp1.deja.com>

thx!! will do ... :)

In article <7v06a6$5n2$1@pollux.dnai.com>,
  "David Christensen" <dchrist@dnai.com> wrote:
> Edward:
>
> > I've written a CGI in Perl that allows users to create a photo
> album on
> > a Web site. The basics:
>
> Try putting your question on:
>
>     comp.infosystems.www.authoring.cgi
>
> It's a better forum for Perl and CGI.
>
> --
> David Christensen
> dchrist@dnai.com
>
>

--
Edward Grossman
dump NOSPAM to reply
edward_grossman@NOSPAMyahoo.com


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


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

Date: Tue, 26 Oct 1999 12:21:43 GMT
From: Spud Zeppelin <spudzeppelin@home.com>
Subject: PM.org Gone Awry?
Message-Id: <38159C11.E8D0875D@home.com>

Yesterday I went to glance at hartford.pm.org... I got the www.pm.org
page instead.  As I delved deeper into the site, I noticed a number of
the includes were broken.  Later, I tried to send a message to
hartford-list@hfb.pm.org -- It bounced, saying "relaying forbidden".

Today, neither pm.org nor perl.org are available... both are being
stopped at the router between Panix and Smith-R* (the ad agency that was
hosting the sites).

Anyone else experiencing similar issues? Anyone have a clue why?

TIA,

Jeff D. "Spud (Zeppelin)" Almeida
Hartford, CT


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

Date: 26 Oct 1999 19:20:33 GMT
From: gbacon@ruby.itsc.uah.edu (Greg Bacon)
Subject: Re: PM.org Gone Awry?
Message-Id: <7v4uu1$121$7@info2.uah.edu>

In article <m1u2nexeon.fsf@halfdome.holdit.com>,
	merlyn@stonehenge.com (Randal L. Schwartz) writes:

: Brian has his hands full at the moment, so I'll jump in for him.  The
: machine running the pm.org and perl.org goodies (cname:
: happyfunball.pm.org) got smoked over the weekend.

Can you find JOB papers that are that stout? :-)

Greg
-- 
When going to visit the woman, do not forget the whip.
    -- Nietzsche


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

Date: Tue, 26 Oct 1999 11:27:35 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: PM.org Gone Awry?
Message-Id: <brian-ya02408000R2610991127350001@news.panix.com>

In article <38159C11.E8D0875D@home.com>, Spud Zeppelin <spudzeppelin@home.com> posted:

> Yesterday I went to glance at hartford.pm.org... I got the www.pm.org
> page instead.  As I delved deeper into the site, I noticed a number of
> the includes were broken.  Later, I tried to send a message to
> hartford-list@hfb.pm.org -- It bounced, saying "relaying forbidden".

the machine that was hosting the perl user group stuff is having
problems and i've been working furiously to get it back into shape.
sorry for the inconvenience. i'm hoping to have everything back to
normal before the end of the day.  until then, the main web sites, 
www.pm.org and www.perl.org, are on a temporary machine, which is why
the server side include stuff is showing up broken.

> Today, neither pm.org nor perl.org are available... both are being
> stopped at the router between Panix and Smith-R* (the ad agency that was
> hosting the sites).

fwiw, Smith Renaud is not an ad agency - the owners of Smith Renaud
are the same people who started Perl Mongers and still pay most of
its expenses :)

access wasn't being blocked at a router. the machine which is 
temporarily hosting those sites was temporarily unavailable this morning 
while some bad disks were replaced.  that was finished just about an
hour ago.

things have not been nice here.  for some reason this weekend was 
when a lot of hardware decided to revolt.

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>


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

Date: 26 Oct 1999 09:35:52 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: PM.org Gone Awry?
Message-Id: <m1u2nexeon.fsf@halfdome.holdit.com>

>>>>> "Spud" == Spud Zeppelin <spudzeppelin@home.com> writes:

Spud> Today, neither pm.org nor perl.org are available... both are being
Spud> stopped at the router between Panix and Smith-R* (the ad agency that was
Spud> hosting the sites).

Brian has his hands full at the moment, so I'll jump in for him.  The
machine running the pm.org and perl.org goodies (cname:
happyfunball.pm.org) got smoked over the weekend.  Stuff is being
restored from backup tapes, and all should be well within the next few
days.  Please be patient.

print "Just another Perl hacker," # and pm.org founding board member

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Mon, 25 Oct 1999 20:53:27 GMT
From: Shad Sluiter <shad_sluiter@my-deja.com>
Subject: pop3 and perl
Message-Id: <7v2g05$ngt$1@nnrp1.deja.com>

 I'd like to see some code that would do the following:

- periodically check an account on a pop3 server.
- save the messages in text files or in a data base.
- Another script should allow a web server to display and search all
messages that have been received.

This makes your server look and and similar to deja.com

Has anyone seen something like this done with cgi?

shad sluiter

--
http://www.naturephotogallery.com  nature images,
travel guides, equipment reviews, photo tips
and contests.


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


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

Date: Mon, 25 Oct 1999 14:34:13 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: pop3 and perl
Message-Id: <Pine.GSO.4.10.9910251430550.29843-100000@user2.teleport.com>

On Mon, 25 Oct 1999, Shad Sluiter wrote:

>  I'd like to see some code that would do the following:
> 
> - periodically check an account on a pop3 server.

Have you seen the modules on CPAN? I'm sure there's one which can be made
to do this, possibly with one or two additional lines of code.

> - save the messages in text files or in a data base.

See the docs for open() in the perlfunc manpage.

> - Another script should allow a web server to display and search all
> messages that have been received.

Well, there may be nothing exactly like you want, but something close
should be here.

    http://www.stonehenge.com/merlyn/WebTechniques/

> This makes your server look and and similar to deja.com

So does renaming it 'deja.com'. :-)

> Has anyone seen something like this done with cgi?

Isn't this still the newsgroup about Perl?
comp.infosystems.www.authoring.cgi is down three doors.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 27 Oct 1999 20:03:49 GMT
From: nihilist@kenobiz.com (Max)
Subject: POST data to a perl program, from a perl program
Message-Id: <381759d3.165735012@news.acronet.net>

how can i send data via POST method from one perl script to another
without having to print any html code, just using strictly perl??

the problem is that the real program that i wish the data to
eventually get to i have to use my username and password to access
but obviously i dont want the public to be able to view my HTML source
code and see my username and password in the action attiribute of my
form.  therefore bringing in the need for a middle man
but im clueless as how to do this
HELLP!!!!!!!!!!! =(
reply to my email address if you could please, no biggy though

thanx in advance


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

Date: Tue, 26 Oct 1999 18:46:40 -0400
From: Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca>
Subject: print to multiple lines
Message-Id: <38162F50.34A229CC@ccrs.nrcanDOTgc.ca>

Hi,

I'm writing a CGI script that results in lines that can run on and on. 
I'd like to break up these lines so that it
will be easy to debug.

I would like to make:

print "fffffffffffffffffffffff.   ddddddddddddddddddddddddddddd\n";

into:

print "fffffffffffffffffffffff.
       ddddddddddddddddddddddddddddd\n";

so that the text is processed like a single string, but coded like this
for clarity.

Anyone have any pointers??  I've tried putting \ at the end of the first
line, no luck.

Thanks

-- 

-----------------------------------------------------------------------------------------
Tom Kralidis                                  Geo-Spatial Technologist 
Canada Centre for Remote Sensing              Tel: (613) 947-1828
588 Booth Street , Room 241                   Fax: (613) 947-1408
Ottawa , Ontario K1A 0Y7                     http://www.ccrs.nrcan.gc.ca
-----------------------------------------------------------------------------------------


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

Date: 27 Oct 1999 07:13:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: print to multiple lines
Message-Id: <slrn81dr28.bjj.abigail@alexandra.delanet.com>

TK Soh (r28629@email.sps.mot.com) wrote on MMCCXLVII September MCMXCIII
in <URL:news:3815E01A.ED64450C@email.sps.mot.com>:
<> Larry Rosler wrote:
<> > Or, for many lines of this, use a 'here-document' (best?):
<> > 
<> >   print <<EOT;
<> > fffffffffffffffffffffff.
<> > ddddddddddddddddddddddddddddd
<> > EOT
<> 
<> I don't quite like the way the text is indented. I tried this, but it
<> looks even worse, ie. over complicated:
<> 
<> print do { local $_ = <<EOT; s/^\s+//gm; $_};
<>    fffffffffffffffffffffff.
<>    ddddddddddddddddddddddddddddd
<> EOT


    print <<EOT =~ /^\s*(.*\n)/mg;
        fffffffffff.
        dddddddddddddddddd.
    EOT


Abigail
-- 
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 26 Oct 1999 22:37:21 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: print to multiple lines
Message-Id: <MPG.12802f694c4eed2c98a138@nntp.hpl.hp.com>

In article <3815E01A.ED64450C@email.sps.mot.com> on Tue, 26 Oct 1999 
12:08:42 -0500, TK Soh <r28629@email.sps.mot.com> says...
> Larry Rosler wrote:
> > Or, for many lines of this, use a 'here-document' (best?):
> > 
> >   print <<EOT;
> > fffffffffffffffffffffff.
> > ddddddddddddddddddddddddddddd
> > EOT
> 
> I don't quite like the way the text is indented. I tried this, but it
> looks even worse, ie. over complicated:
> 
> print do { local $_ = <<EOT; s/^\s+//gm; $_};
>    fffffffffffffffffffffff.
>    ddddddddddddddddddddddddddddd
> EOT
> 
> Any better way?

Several similar ways are discussed in perlfaq4: "Why don't my <<HERE 
documents work?"

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 26 Oct 1999 16:24:00 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: print to multiple lines
Message-Id: <MPG.127fd7ebb39e4f8198a134@nntp.hpl.hp.com>

In article <38162F50.34A229CC@ccrs.nrcanDOTgc.ca> on Tue, 26 Oct 1999 
18:46:40 -0400, Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca> says...
> I'm writing a CGI script that results in lines that can run on and on. 
> I'd like to break up these lines so that it
> will be easy to debug.
> 
> I would like to make:
> 
> print "fffffffffffffffffffffff.   ddddddddddddddddddddddddddddd\n";
> 
> into:
> 
> print "fffffffffffffffffffffff.
>        ddddddddddddddddddddddddddddd\n";
> 
> so that the text is processed like a single string, but coded like this
> for clarity.
> 
> Anyone have any pointers??  I've tried putting \ at the end of the first
> line, no luck.

Perl is not C.  Newlines are permitted in strings.  It would work just 
the way you show it!  There will be a newline and a bunch of spaces in 
there, but for HTML it will show up with a single space, like the first 
attempt.

Alternatively, you could concatenate two strings (good):

  print "fffffffffffffffffffffff. " .
        "ddddddddddddddddddddddddddddd\n";

Or you could print a list of strings (better):

  print "fffffffffffffffffffffff. ",
        "ddddddddddddddddddddddddddddd\n";

Or, for many lines of this, use a 'here-document' (best?):

  print <<EOT;
fffffffffffffffffffffff.
ddddddddddddddddddddddddddddd
EOT

Read about "Quote and Quote-like Operators" in perlop.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 27 Oct 1999 00:11:06 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: print to multiple lines
Message-Id: <7v5fuq$lt1$2@nntp2.atl.mindspring.net>

Tom Kralidis (tom.kralidis@ccrs.nrcanDOTgc.ca) wrote:
: I would like to make:
: 
: print "fffffffffffffffffffffff.   ddddddddddddddddddddddddddddd\n";
: 
: into:
: 
: print "fffffffffffffffffffffff.
:        ddddddddddddddddddddddddddddd\n";
: 
: so that the text is processed like a single string, but coded like this
: for clarity.

Look at the section in perlop on "quoting operators," specifically the 
part about "here documents."



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

Date: Wed, 27 Oct 1999 00:29:33 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: print to multiple lines
Message-Id: <FK8K19.M2E@news.boeing.com>

In article <38162F50.34A229CC@ccrs.nrcanDOTgc.ca>,
Tom Kralidis  <tom.kralidis@ccrs.nrcanDOTgc.ca> wrote:
>Hi,
>
>I would like to make:
>
>print "fffffffffffffffffffffff.   ddddddddddddddddddddddddddddd\n";
>
>into:
>
>print "fffffffffffffffffffffff.
>       ddddddddddddddddddddddddddddd\n";
>

printf is useful sometimes:

printf "%s%s\n" ,  "fffffffffffffffffffooooooooo" ,
                   "dddddddddddddddddddooooooooo" ;

--
Charles DeRykus


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

Date: Tue, 26 Oct 1999 12:08:42 -0500
From: TK Soh <r28629@email.sps.mot.com>
Subject: Re: print to multiple lines
Message-Id: <3815E01A.ED64450C@email.sps.mot.com>

Larry Rosler wrote:
> Or, for many lines of this, use a 'here-document' (best?):
> 
>   print <<EOT;
> fffffffffffffffffffffff.
> ddddddddddddddddddddddddddddd
> EOT

I don't quite like the way the text is indented. I tried this, but it
looks even worse, ie. over complicated:

print do { local $_ = <<EOT; s/^\s+//gm; $_};
   fffffffffffffffffffffff.
   ddddddddddddddddddddddddddddd
EOT

Any better way?


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

Date: Tue, 26 Oct 1999 16:17:11 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: print to multiple lines
Message-Id: <Pine.GSO.4.10.9910261615320.29843-100000@user2.teleport.com>

On Tue, 26 Oct 1999, Tom Kralidis wrote:

> I would like to make:
> 
> print "fffffffffffffffffffffff.   ddddddddddddddddddddddddddddd\n";
> 
> into:
> 
> print "fffffffffffffffffffffff.
>        ddddddddddddddddddddddddddddd\n";

Could you want something like this, perhaps?

    print "fffffffffffffffffffffff.   ",
        "ddddddddddddddddddddddddddddd\n";

But do you really want your output lines to be wider than you can
comfortably have your source code? Oh, well!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 26 Oct 1999 23:23:49 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: print to multiple lines
Message-Id: <s1ce05bnr088@corp.supernews.com>

Tom Kralidis (tom.kralidis@ccrs.nrcanDOTgc.ca) wrote:
: I'm writing a CGI script that results in lines that can run on and on. 
: I'd like to break up these lines so that it
: will be easy to debug.
: 
: I would like to make:
: 
: print "fffffffffffffffffffffff.   ddddddddddddddddddddddddddddd\n";
: 
: into:
: 
: print "fffffffffffffffffffffff.
:        ddddddddddddddddddddddddddddd\n";
:
: so that the text is processed like a single string, but coded like this
: for clarity.

print() takes a list of arguments, and outputs them without intervening
characters, just providing the chunks of the string as comma-separated
strings works fine (example uses fewer chars than you had):

  print 'fffffffff.   ',
        "dddddddddddd\n";

You could also replace the comma with a dot (period), which would have the
effect of concatenating the strings 'manually' before print() sees them.
This has the same net effect, but probably involves more work at runtime
and is stylistically not favored.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Tue, 26 Oct 1999 23:26:40 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: print to multiple lines
Message-Id: <s1ce5gglr0859@corp.supernews.com>

Tom Kralidis (tom.kralidis@ccrs.nrcanDOTgc.ca) wrote:
: print "fffffffffffffffffffffff.   ddddddddddddddddddddddddddddd\n";

One thing I forgot to mention in my previous post on this thread is that,
if you really are printing long runs of the same character as in your
example, it's less error-prone to do this via the 'string multiplier'
operation:

  print 'f' x 20, '.   ', 'd' x 25, "\n";

(No attempt to get those counts right.)  This massively beats
hand-counting the characters.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Wed, 27 Oct 1999 09:40:06 GMT
From: stuckenbrock@my-deja.com
Subject: Problem with alarm()
Message-Id: <7v6h9m$juc$1@nnrp1.deja.com>

Hello all!

I've got the following problem:
The following Routine is a signalhandler for SIGALRM:

sub checkdev {
   eval {
      $SIG{ALRM} = sub { die "alarm\n" };
      alarm 10;
      print $devicefile "\n";
      $readtemp = <$devicefile>;
      alarm 0;
   };
   if ($@){
      #Read from device timed out...
   }
   else {
      #Read from device not timed out...
   }
}

If I call it normally it works without any Problems, but if I install
a signalhandler like
$SIG{ALRM} = sub { checkdev() };
then the read-operation just won't time out. I don't know why the alarm
set in the checkdev-routine should interfere with one that just timed
out.

Does anyone know that problem?
Im using Perl 5.005_03 on Linux 2.2.10

Thanx for your attention
Soeren


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


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

Date: Wed, 27 Oct 1999 14:57:56 GMT
From: cpierce1@ford.com (Clinton Pierce)
Subject: Re: Problem with alarm()
Message-Id: <38190e53.1893641031@news.ford.com>

[poster cc'd in e-mail]

On Wed, 27 Oct 1999 09:40:06 GMT, stuckenbrock@my-deja.com wrote:
>I've got the following problem:
>The following Routine is a signalhandler for SIGALRM:
>
> [...]
>
>Does anyone know that problem?
>Im using Perl 5.005_03 on Linux 2.2.10

In general, signal handlers should be kept small and simple.  In Perl
(especially) you should try to do as little as possible in a signal
handler.  I thnk at TPC it was brought up that the only _really_ safe
thing to do in a signal handler was to change the value of a pre-defined
integer global variable.

Also, some system calls (read) try to restart after a signal is received.
This can cause problems.  The classic way to avoid this and remain
somewhat safe is to use a "die" in the handler and then set a flag to
indicate that something went wrong.  Like this:

$timed_out=0;

sub handler {
	$timed_out=1;
	$SIG{ALRM}='DEFAULT';
	die;
}

eval { 
	$SIG{ALRM}=\&handler;
	# Do your reading...
);

if ($timed_out) {
	# Your read timed out!
}






-- 
   Clinton A. Pierce       "If you rush a Miracle Man, you
 clintp@geeksalad.org       get rotten Miracles."  -- Miracle Max,
http://www.geeksalad.org                       The Princess Bride


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

Date: Tue, 26 Oct 1999 20:04:38 -0700
From: "Maurice Maltbia" <maurice.maltbia@intel.com>
Subject: Problem with Win32::Internet, solution is Net::FTP
Message-Id: <7v5q3p$kvc@news.or.intel.com>

I have attempted to transfer the stripped file in ASCII mode,
but that failed.
I installed Activestate's "netlib" module and used Net::FTP with no
problems.


>Transfer 'stripped' (i.e., binary) files using binary mode.  Transfer
>'text' files using 'ascii' mode.  FTP will then handle the line endings
>correctly, in either direction.
>
>--
>(Just Another Larry) Rosler
>Hewlett-Packard Laboratories
>http://www.hpl.hp.com/personal/Larry_Rosler/
>lr@hpl.hp.com




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

Date: 26 Oct 1999 20:11:23 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Problems with files
Message-Id: <7v51tb$io6$1@gellyfish.btinternet.com>

On Tue, 26 Oct 1999 17:05:21 +0200 Christian Wix wrote:
> Do I have to install something in my cgi-bin dir. ? It was empty until I
> put my script there.
> Thanks for all the help.
> Chris.
> 
> Christian Wix wrote:
>> 
>> Please help with the following code. Something is not working. (Server
>> error). The file "inform" is in the same dir. as the the script and
>> "navn" is correct.
>> 
>> #!/usr/bin/perl
>> # This is a test program
>> use CGI;
>> my $longname = param("navn");
>> open (FILE, ">> inform") or die "can't append to filename: $!";
>> print FILE $longname;
>> close (FILE);
>> 

A) What message do you have in your HTTP servers error log ?

B) Have you read what it says in perlfaq9 about debugging 'Server errors'

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

Date: Tue, 26 Oct 1999 17:05:21 +0200
From: Christian Wix <christian@wix.dk>
Subject: Re: Problems with files
Message-Id: <3815C331.66E4100A@wix.dk>

Do I have to install something in my cgi-bin dir. ? It was empty until I
put my script there.
Thanks for all the help.
Chris.

Christian Wix wrote:
> 
> Please help with the following code. Something is not working. (Server
> error). The file "inform" is in the same dir. as the the script and
> "navn" is correct.
> 
> #!/usr/bin/perl
> # This is a test program
> use CGI;
> my $longname = param("navn");
> open (FILE, ">> inform") or die "can't append to filename: $!";
> print FILE $longname;
> close (FILE);
> 
> Thank you,
> 
> --
> Christian Wix
> Bergsøekollegiet 23,st - 2309
> Søllerød
> 2850 Nærum
> Denmark
> Phone: +45 45505171-(tone)-2309 / +45 26258162
> Email & www: mailto:christian@wix.dk - http://www.wix.dk
> ICQ #21322285

-- 
Christian Wix
Bergsøekollegiet 23,st - 2309
Søllerød
2850 Nærum
Denmark
Phone: +45 45505171-(tone)-2309 / +45 26258162
Email & www: mailto:christian@wix.dk - http://www.wix.dk
ICQ #21322285


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

Date: Mon, 25 Oct 1999 13:22:58 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Problems with files
Message-Id: <Pine.GSO.4.10.9910251321390.29843-100000@user2.teleport.com>

On Sun, 24 Oct 1999, Christian Wix wrote:

> Please help with the following code. Something is not working. (Server
> error). 

When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.

   http://www.perl.com/CPAN/
   http://www.cpan.org/
   http://www.cpan.org/doc/FAQs/cgi/idiots-guide.html
   http://www.cpan.org/doc/manual/html/pod/

> The file "inform" is in the same dir. as the the script and
> "navn" is correct.
> 
> #!/usr/bin/perl
> # This is a test program
> use CGI;
> my $longname = param("navn");
> open (FILE, ">> inform") or die "can't append to filename: $!";

The CGI spec doesn't specify which directory will be the current working
directory when a CGI program is started.

    http://hoohoo.ncsa.uiuc.edu/cgi/

It may be the root directory, the server's working directory, the home
directory for user nobody, the home directory for root, the directory the
program is stored in, the directory the server is stored in, the base
cgi-bin directory, the /tmp directory, a directory you don't have access
to from the shell, a directory named after an annoying character from
Saturday Night Live, a directory chosen at random, or some other
directory.

A CGI program which uses a relative path before chdir()ing to a
non-relative path is in a state of sin.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 26 Oct 1999 10:06:23 +0200
From: Harald Galgon <Harald.Galgon@lhsystems.com>
Subject: Problems with loading DBD::Oracle
Message-Id: <381560FF.8223573C@lhsystems.com>

Hi folks

I've compiled and installed perl 5.005_03 on HP-UX 10.20, but perl won't
load Oracle.sl.
The output of perl -V is

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=hpux, osvers=10.20, archname=PA-RISC
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-D_HPUX_SOURCE -Aa -I/usr/local/include +DAportable'
    ccflags ='-D_HPUX_SOURCE -Aa -I/usr/local/include +DAportable'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=undef, longlongsize=, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib
    libs=-lnsl_s -lndbm -lmalloc -ldld -lm -lc -lndir -lcrypt
    libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-B,defer'
    cccdlflags='+z', lddlflags='-b -L/usr/local/lib'

Characteristics of this binary (from libperl):
  Built under hpux
  Compiled at Oct 20 1999 16:00:32
  @INC:
    /usr/local/perl5/lib/5.00503/PA-RISC
    /usr/local/perl5/lib/5.00503
    /usr/local/perl5/lib/site_perl/5.005/PA-RISC
    /usr/local/perl5/lib/site_perl/5.005
    .

But whenever I tried to connect to the database, I got the following
message:

$ export PERL_DL_DEBUG=1
$ perl testconnect.pl
DynaLoader.pm loaded (/usr/local/perl5/lib/5.00503/PA-RISC
/usr/local/perl5/lib/5.00503
/usr/local/perl5/lib/site_perl/5.005/PA-RISC
/usr/local/perl5/lib/site_perl/5.005 ., /usr/
local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib)
DynaLoader::bootstrap for Data::Dumper (auto/Data/Dumper/Dumper.sl)
DynaLoader::bootstrap for DBI (auto/DBI/DBI.sl)
DynaLoader::bootstrap for DBD::Oracle (auto/DBD/Oracle/Oracle.sl)
install_driver(Oracle) failed: Can't load
'/usr/local/perl5/lib/site_perl/5.005/
PA-RISC/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such file
or direc
tory at /usr/local/perl5/lib/5.00503/PA-RISC/DynaLoader.pm line 169.

The file
/usr/local/perl5/lib/site_perl/5.005/PA-RISC/auto/DBD/Oracle/Oracle.sl
is readable.

Does someone know what's going wrong?

Thanx in advance
Hucky




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

Date: 26 Oct 1999 11:36:21 -0400
From: James Peregrino <james_peregrino@harvard.edu>
Subject: Re: Problems with loading DBD::Oracle
Message-Id: <x7k8oab0cp.fsf@bert.dce.harvard.edu>

Harald Galgon <Harald.Galgon@lhsystems.com> writes:

> Hi folks
> 
> I've compiled and installed perl 5.005_03 on HP-UX 10.20, but perl won't
> load Oracle.sl.
> The output of perl -V is
[chomp] 
> But whenever I tried to connect to the database, I got the following
> message:
> 
[chomp]
> install_driver(Oracle) failed: Can't load
> '/usr/local/perl5/lib/site_perl/5.005/
> PA-RISC/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such file
> or direc
> tory at /usr/local/perl5/lib/5.00503/PA-RISC/DynaLoader.pm line 169.
> 
> The file
> /usr/local/perl5/lib/site_perl/5.005/PA-RISC/auto/DBD/Oracle/Oracle.sl
> is readable.

	You didn't mention whether you already installed DBI and DBD::Oracle.
Does 5.005_03 come with these by default?   I'd try reinstalling DBI and
DBD::Oracle.

-James

-- 
James Peregrino
Harvard Div. Continuing Education


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

Date: 26 Oct 1999 20:40:46 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Processing database in Perl
Message-Id: <7v53ke$ioh$1@gellyfish.btinternet.com>

On Mon, 25 Oct 1999 16:06:33 -0500 Kris Franzen wrote:
> I really don't know anything about Perlscript, but I took over a webmaster
> job at my school for someone who had a couple of perlscripts on their site.
> I'm working on converting the stuff that I understand to VBScript, but I
> need a back end for Netscape users, so I need to modify the existing
> Perlscript.
> 
> What I have in the attached file is a script where we're reading from an
> access 97 database, and grabbing student information, and displaying it on
> the page.  The garbage about $bioname is just some *.bio files we have on
> the server instead of in the database in case anyone needs to know.  What
> this page does is displays ALL the students in the database, but I want it
> to only have it display the students that have a checkbox in the database
> called "resume" checked.  Perl looks so encryptic to me, I already tried to
> do it myself, but got no where.
> 

What checkbox ? what database ?  It looks like *everything* is held in
separate files.  I think you have to provide a student name that ties
up to a .bio file.

i.e.  http://blah.edu/Resume.asp?student=Blah_Woof

But I also think that the thing isnt finished ...

Oh and please dont post uuencoded stuff here - unencoded is just fine.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


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

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 1192
**************************************


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