[11733] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5333 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 8 19:07:32 1999

Date: Thu, 8 Apr 99 16:00:19 -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           Thu, 8 Apr 1999     Volume: 8 Number: 5333

Today's topics:
        /usr/local/apache/bin/httpd: can't resolve symbol 'cloc <dirk@moria.in-berlin.de>
        Apache.pm failed to load <nessus@shell5.ba.best.com>
    Re: Beginner PERL Question, Inserting into Sql database <horizon@internetexpress.com.au>
    Re: Can you stepthrough a Perl program? (Tad McClellan)
        Change File Name in application/download <thunting@sun1.lib.uci.edu>
    Re: Change File Name in application/download (Bill Moseley)
    Re: choping off whitespace (Dmitry Epstein)
    Re: embedded Perl and Borland C++ Builder 4 <dchristensen@california.com>
    Re: help me I'm a new Perl User!!! (Bob Trieger)
    Re: Help with foxbase .dbf file open <gellyfish@gellyfish.com>
    Re: Help with Perl return value 134 (Tad McClellan)
    Re: Help! Script works in Linux-dies in Windows <kperrier@blkbox.com>
    Re: Help! Script works in Linux-dies in Windows <gellyfish@gellyfish.com>
    Re: How do I send an email attachment with sendmail pip <greg.wimpey@waii*removetomail*.com.invalid>
    Re: minimal pattern matching (Bart Lateur)
    Re: minimal pattern matching <emschwar@rmi.net>
    Re: Perl and Personal Web Server (Bill Moseley)
    Re: Perl and Personal Web Server <kperrier@blkbox.com>
    Re: Perl and Personal Web Server <gellyfish@gellyfish.com>
    Re: perldoc and PAGER (Bill Moseley)
    Re: perldoc and PAGER (Ilya Zakharevich)
    Re: Q: redefined subroutines (Kevin Reid)
        Signal stuff on NT <evonzee@tritechnet.com>
    Re: stumped on regex - someone slay the dragin - please <uri@home.sysarch.com>
    Re: Trouble with DBI and Oracle (Darren Greer)
    Re: Trouble with DBI and Oracle (Darren Greer)
    Re: Verifying existance of a file <emschwar@rmi.net>
    Re: Verifying existance of a file (Tad McClellan)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 08 Apr 1999 23:05:55 +0000
From: Dirk Slaghekke <dirk@moria.in-berlin.de>
Subject: /usr/local/apache/bin/httpd: can't resolve symbol 'clock'
Message-Id: <370D3653.C34060FB@moria.in-berlin.de>

I want to use perl 5.005_03, Apache 1.3.6, mod_perl 1-1.18 and
HTML-Embperl-1.2b4

These packages can be compiled without erros.

httpd -l says that 

"Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_setenvif.c
  mod_perl.c
"

these modules are now included. Is there some modules missing?

When I test the included testfiles with for example
 ./embpexec.pl test/html/var.htm 
I get this error message 
perl: can't resolve symbol 'clock'.
Calling var.htm with a browser produces the same errormessage in the
httpd-logfile and an error message "No Object Data" in the browser.


Does anybody have a clue?

d.


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

Date: 08 Apr 1999 20:17:34 GMT
From: "J. David Eisenberg" <nessus@shell5.ba.best.com>
Subject: Apache.pm failed to load
Message-Id: <370d0ede$0$225@nntp1.ba.best.com>

That's the message I get when I try to start my
version of Apache, which does have mod_perl compiled into it.

Apache.pm does exist in /usr/lib/perl5/5.00502/CGI.
---
J. David Eisenberg    http://www.best.com/~nessus


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

Date: Fri, 09 Apr 1999 08:02:24 +1000
From: Mick <horizon@internetexpress.com.au>
To: coldfusion200029@my-dejanews.com
Subject: Re: Beginner PERL Question, Inserting into Sql database
Message-Id: <370D2770.75361DDD@internetexpress.com.au>

Hi....don't really know what you wanted but - (Hope this helps)..

OK...on a UNIX system (Using postgresql), this is how I do it -

#Split up your data first
( my $pid , my $ptitle, my $pfname, my $psname, my $paddress ) = split ( "," ,
$tmp );

#Connect to database
my $dbh = DBI->connect( "dbi:Pg:dbname=mydatabase","mydatabase","" ) or die
"Error:
$DBI::errstr\n";
my $p_id, $p_title, my $p_fname, my $p_sname, my $p_address  =
$cursor->fetchrow
$cursor1->execute;

# if they do exist do something like this -
$sql = "UPDATE person SET p_title = '$ptitle', p_fname = '$pfname', p_sname =
'$psname',
p_address = '$paddress' WHERE p_id = '$pid'";

#If person doesn't exist do something like this -
$sql = "INSERT INTO person ( p_id, p_title, p_fname, p_sname,p_address ) VALUES
(
'$pid','$ptitle','$pfname','$psname','$paddress' )";

$cursor1->finish;
$dbh->disconnect;

Mick

coldfusion200029@my-dejanews.com wrote:

> I was wondering how to enter data in to a sql database, I have a bunch of
> lists of users, and addresses that I wanted to enter into a Sql Database. I
> have read that using the split command I can split the data and enter them
> seperatly into the database.....but I am not sure exactl how this
> works....please help!!!!
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

--
----------------------------------------------------------------
HORIZON Software Solutions

Visit Site - http://www.deakin.edu.au/~bellears/horizon/index.html
e-mail     - mailto:horizon@internetexpress.com.au

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




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

Date: Thu, 8 Apr 1999 15:20:36 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Can you stepthrough a Perl program?
Message-Id: <4ivie7.oj1.ln@magna.metronet.com>

Philip Newton (Philip.Newton@datenrevision.de) wrote:
: apriya@my-dejanews.com wrote:
: > 
: > U dont need to User all those buttons.. All u need to do is put -d
: > switch in your perl script..
: > 
: > e.g.
: > 
: > #!/usr/local/perl -d
: > 
: > # write ur code here..
: > ----------------------------
: > 
: > When U run this script.. Step-by-step execution will be done....
: > I hope it works..

: Methinks U dont no how 2 spel


   Yes, but everybody is most impressed with how stylin' he is...


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 08 Apr 1999 14:37:59 -0700
From: Ted Huntington <thunting@sun1.lib.uci.edu>
Subject: Change File Name in application/download
Message-Id: <370D21B7.72C0@sun1.lib.uci.edu>

Hi!

In this perl script - how do I change the name of the file when down
loading?  This script gives the file the same name as the script file
(report.pl).


File=  "report.pl":
====================================================
#!/dcs/bin/perl
print "Content-type:application/download\n\n";

open(INF,"/u/pub_html/reports/webreport.xls");
@ary = <INF>;
close(INF);

foreach $line (@ary)  {
   chomp($line);
   print "$line\n";
}                          
====================================================


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

Date: Thu, 8 Apr 1999 15:39:33 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Change File Name in application/download
Message-Id: <MPG.1176cffca04d164d989722@206.184.139.132>

In article <370D21B7.72C0@sun1.lib.uci.edu>, thunting@sun1.lib.uci.edu 
says...
> In this perl script - how do I change the name of the file when down
> loading?  This script gives the file the same name as the script file
> (report.pl).

This doesn't always work, but you can try:

  print "Content-type:application/download\n",
        "Content-Disposition: attachment; filename=some_file_name\n\n";

BTW -- is "application/download" a real MIME type?  I'd recommend sending 
the MIME type of the file so the browser can know what to do with it -- 
if that applies.

The other way people fool browsers is by making an <A> link "Download 
Here" that ends with the name of the file, and then let your CGI script 
figure out what file to send by the extra path info in the URL.

-- 
Bill Moseley mailto:moseley@best.com


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

Date: Thu, 08 Apr 1999 20:44:13 GMT
From: mitiaNOSPAM@nwu.edu.invalid (Dmitry Epstein)
Subject: Re: choping off whitespace
Message-Id: <370d10ba.19798262@news.acns.nwu.edu>

On Wed, 24 Mar 1999 11:40:30 -0800, lr@hpl.hp.com (Larry Rosler)
wrote:
>#!/usr/local/bin/perl -w
>use Benchmark;
>
>my $s = ' ' x 10 . 'x' x 50 . ' ' x 10;
>
>timethese(1 << (shift || 0), {
>  Bad  => sub { (my $x = $s) =~ s/^\s*(.*?)\s*$/$1/ },
>  Or   => sub { (my $x = $s) =~ s/^\s+|\s+$//g },
>  Plus => sub { (my $x = $s) =~ s/^\s+//; $x =~ s/\s+$//; },
>  Star => sub { (my $x = $s) =~ s/^\s*//; $x =~ s/\s*$//; },
>});
>__END__
>
>Benchmark: timing 65536 iterations of Bad, Or, Plus, Star...
>       Bad:  8 wallclock secs ( 7.91 usr +  0.00 sys =  7.91 CPU)
>        Or:  7 wallclock secs ( 6.38 usr +  0.00 sys =  6.38 CPU)
>      Plus:  2 wallclock secs ( 1.38 usr +  0.00 sys =  1.38 CPU)
>      Star:  5 wallclock secs ( 4.47 usr +  0.00 sys =  4.47 CPU)
>
>Now I am quite surprised by this result.  I expected that with both 
>leading and trailing whitespace on the string being trimmed, that the 
>regex engine would work the same for Plus and for Star.  But this 
>doesn't seem to be the case.  Ilya or anyone, help???

Acutally, I've been doing similar experiments with ActivePerl on Win98
lately.  I got somewhat different results though.  Here's my
experiment:

use Benchmark;

my $s = '  abcd efg  hijk ';
timethese (0, {
  'OR+'  => ' ($x = $s) =~ s/^\s+|\s+$//; ',
  'OR*'  => ' ($x = $s) =~ s/^\s*|\s*$//; ',
  'TWO+' => ' ($x = $s) =~ s/^\s+//; $x =~ s/\s+$//; ',
  'TWO*' => ' ($x = $s) =~ s/^\s*//; $x =~ s/\s*$//; '
});
__END__

Output (abbreviated) shows the number of runs/sec:

Benchmark: running OR*, OR+, TWO*, TWO+, each for at least 3 CPU
seconds...
       OR+:   226600.99/s 
       OR*:   67984.59/s 
      TWO+:   150374.75/s 
      TWO*:   56888.33/s 

As you can see, the 'OR' method is faster here, but a similar
relationship holds for '+' vs '*'.

I also tried removing leading and/or trailing spaces, and removing
spaces between words - results were similar.

Dmitry


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

Date: Thu, 8 Apr 1999 11:58:28 -0700
From: "David Christensen" <dchristensen@california.com>
Subject: Re: embedded Perl and Borland C++ Builder 4
Message-Id: <370cfb5b@news2.newsfeeds.com>

Felix:

>>I am wondering if anybody else has ideas for embedding Perl in
>>Builder?

>I wrote a TPerl, several months ago, that let you use
>a Perl interpreter as a native VCL object under
>C++Builder.  I don't have it any more, but it's trivial
>to do.

So how did you build it?  How did it work?  How did Builder load,
start, pause, resume, and/or kill scripts?  How did Builder know
the state of the scripts (running, blocked, done, etc.)?  Could one
control run different scripts at different times?  Could multiple
controls run the same or different scripts concurrently?  Could
Builder talk to the Perl scripts, and vice versa?  Could the Perl
scripts talk to each other?  What perldocs, manpages, howtos,
examples, web sites, etc., do I need to understand to be able to
repeat your work?

TIA,

David
dchristensen@california.com





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


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

Date: Thu, 08 Apr 1999 20:54:13 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: help me I'm a new Perl User!!!
Message-Id: <7ej4ui$qhj$1@birch.prod.itd.earthlink.net>

[ courtesy cc sent by mail if address not munged ]
     
"James Nedham" <jnedham@hotmail.com> wrote:
oo->My boss has asked me to wright a perl script that:
oo->
oo->a) asks someone what program they would like to run
oo->b) asks them where they would like to display it
oo->
o-o>It is meant as a little 'time waster' excercise but no matter how much I
oo->look though the Perl books I cannot work it out.
o-o>
oo->I would like a menu to be shown and upon making a selection the user to be
oo->asked where to display it.

Where is the piece of your code that is not working?
What error is it giving you?
What are the expected results?


HTH
Bob Trieger
sowmaster@juicepigs.com



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

Date: 8 Apr 1999 21:55:24 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Help with foxbase .dbf file open
Message-Id: <7ej8kc$j6$1@gellyfish.btinternet.com>

On Thu, 08 Apr 1999 11:39:50 -0500 Jeff Slutzky wrote:
> This is a multi-part message in MIME format.
> --------------1A98AA20D65DE996D6BD65EB
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 

Please dont do that usenet is a plain text medium.  At best it will upset
people and at worst it will cause people to ignore your post.

> Can some point me in the direction of some comprehensive documentation
> on writing to foxbase .dbf files using XBase on a SCO 5.0 operating
> system.
> 

I posted an example of using DBD::XBase a short while ago - you could
search DejaNews.  The documentation that comes with the module is fairly
comprehensive.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Thu, 8 Apr 1999 17:40:25 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help with Perl return value 134
Message-Id: <9o7je7.eu1.ln@magna.metronet.com>

Pete McNab (stillers@slip-3.slip.net) wrote:

: We are having some trouble with a perl script that aborts in a
: non-repeatable fashion with the following text:

: Error: Runtime exception^M
: [1] + Done (134) ?^M
:   188   Abort   perl^M


: If anyone can point me towards what this error indicates, 


   It indicates that the message is not coming from perl.


: or even
: an online resource for perl errors I would be most appreciative.


   The 'perldiag.pod' standard Perl doc lists all of the messages
   that perl might issue.

   Your message isn't in there, so it isn't coming from perl 
   (or there is a bug in perldiag).

   I don't know where it is online, but if you have a properly
   installed perl it should already be on your hard drive somewhere...


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 08 Apr 1999 16:31:20 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: Help! Script works in Linux-dies in Windows
Message-Id: <ysisoaa3il3.fsf@blkbox.com>

Ramkumar Kashyap <kashyap@libertynet.org> writes:

> Hi!
> 
>     I would like to get the following script to run in the windows
> environment from netscape fastrack server.
> 
> It runs fine on Linux, but I tried running it from the command line in
> win95 and get the "die" message.
> 
> Please e-mail all responses.
> 
> regards,
> 
> Kumar
> 
> ********
> #!/usr/local/bin/perl
>  $mail_prog = '/usr/lib/sendmail' ;
                 ^^^^^^^^^^^^^^^^^

I really doubt that your win95 box has a directory called /usr/lib or a 
program called sendmail in that directory.

> 
> # ***ENDAUTOGEN:HEADER*** Do NOT modify this line!!  You may enter
> custom code after this line.

Well, if this is how the lines are actually wrapped, then perl is looking
for a command called "custom" and its not finding it.

<SNIP>

Kent


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

Date: 8 Apr 1999 21:03:40 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Help! Script works in Linux-dies in Windows
Message-Id: <7ej5jc$iv$1@gellyfish.btinternet.com>

On Thu, 08 Apr 1999 14:17:58 -0400 Ramkumar Kashyap wrote:
> Hi!
> 
>     I would like to get the following script to run in the windows
> environment from netscape fastrack server.
> 
> It runs fine on Linux, but I tried running it from the command line in
> win95 and get the "die" message.
> 
> 
> ********
> #!/usr/local/bin/perl
>  $mail_prog = '/usr/lib/sendmail' ;
> 
> # ***ENDAUTOGEN:HEADER*** Do NOT modify this line!!  You may enter
> custom code after this line.
> 
> 
> # ***AUTOGEN:INPUT*** Do NOT modify this line!! Do NOT enter custom code
> in this section.
> 

Did you even *try* to make this work.  This looks very much it has been
generated by some other program doesnt it ?  

I dont think that we should be debugging programs made by other programs
I think we should be debugging the program itself ....

/J\
- we should
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: 08 Apr 1999 16:08:50 -0600
From: Greg Wimpey <greg.wimpey@waii*removetomail*.com.invalid>
To: Brian Lavender <blavender@spk.usace.army.mil>
Subject: Re: How do I send an email attachment with sendmail pipe
Message-Id: <snd81erci5.fsf@ddcspn37.denver.waii.com>

Brian Lavender <blavender@spk.usace.army.mil> writes:

> I have the following code which pipes into sendmail. How do I include an
> attachment?
> 
> #!/usr/bin/perl
> 
> $mailprog = '/usr/lib/sendmail';
> open (MAILOWNER, "|$mailprog -t") || die "Unable to open sendmail";
> print MAILOWNER "To: brian\@brie.com \n";
> print MAILOWNER "From: brian\@brie.com \n";
> print MAILOWNER "Subject: Your requested file!\n\n";
> print MAILOWNER "Here is the file you requested.\n";
> close (MAILOWNER);
> 

You won't be able to get sendmail to do it for you. Sendmail doesn't
care about message contents, it just sends them (as its name
indicates).

If you want your document to show up as a properly-formatted
attachment, you will need to generate a message formatted for MIME
(Multipurpose Internet Mail Extensions).

Since you appear to be running on a Unix-ish system, you probably have
the "mmencode" command available for handling MIME messages.  If not,
you will need to get it (or an equivalent program), or else you must
roll your own MIME code.

For the nitty-gritty on MIME, see RFCs 2045 through 2049 (available at
ds.internic.net, I believe).

-- 
Greg Wimpey
greg.wimpey@waii*removetomail*.com.invalid


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

Date: Thu, 08 Apr 1999 20:04:11 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: minimal pattern matching
Message-Id: <370d0aff.951740@news.skynet.be>

sstarre@my-dejanews.com wrote:

>Methinks that s/// needs another switch. I'm trying to locate all instances of
>strings surrounded by a delimiter in a string, such as
>
>  $petnames{cat}='morris';
>  $petnames{dog}='fido';
>  $_=':cat: is a good pet, but :dog: is better.';
>  s/\:(.*)\:/$petnames{$1}/g;
>
>(results in "is better.")
>
>This work great on one instance on the line, but in this case it seems to find
>  ":cat: is a good pet, but :dog:"
>as $1 since matching is greedy.
>
>I studied switches in pp 7x in Camel, and none seem to direct Perl to match
>minimally.

It's not a switch. And maybe your version of the Camel is too old.
Non-greedy pattern matches is new for Perl5. (n.b. how old must Perl5
get before we can stop this "new for Perl5" business? ;-)

This is the minimal matching version (notice the question mark):

	s/\:(.*?)\:/$petnames{$1}/g;

but for this case I'd prefer:

	s/\:(\w+)\:/$petnames{$1}/g;


I'm not sure it's actually faster, though.

	Bart.


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

Date: 08 Apr 1999 16:28:01 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: minimal pattern matching
Message-Id: <xkfhfqqn3wu.fsf@valdemar.col.hp.com>

tadmc@metronet.com (Tad McClellan) writes:
>    If a person doesn't _know_ that they are supposed to wait
>    their turn in line, then everbody else just lets them do it?
> 
>    I don't think so. They point out that going to the front is
>    not how it works...

I'm reminded of a Heinlein story in which somebody was acquitted of
murder because the person they killed had cut in line.  Good thing we
don't do that with FAQs, eh? :^)

-=Eric


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

Date: Thu, 8 Apr 1999 13:46:18 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Perl and Personal Web Server
Message-Id: <MPG.1176b5764b0f5c51989720@206.184.139.132>

In article <7eing8$3r1$1@remarQ.com>, support@crosscom.com says...
> Hi,
>     I have written perl programs and i am running personal web server on
> windows 98 box. How can i run perl scripts from PWS?

A very quick web search turned up:

"Setting up M.S. PWS to run Perl"
at
http://DynamicNet.net/support/fp/perlwithPWS.htm

You could also search Dejanews for this question, but you may be 
overwhelmed at the number of hits ;)

-- 
Bill Moseley mailto:moseley@best.com


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

Date: 08 Apr 1999 16:25:36 -0500
From: Kent Perrier <kperrier@blkbox.com>
Subject: Re: Perl and Personal Web Server
Message-Id: <ysiyak23iun.fsf@blkbox.com>

"Mohammad Khan" <support@crosscom.com> writes:

> Hi,
>     I have written perl programs and i am running personal web server on
> windows 98 box. How can i run perl scripts from PWS?
> 
>     I know i can run perl scripts from apache windows server, but i want to
> run perl scripts from PWS as many of our clients are using PWS. Any help
> will be appreciated.
> 

Since your question has nothing to do with perl,but it has everything to do
with web server setup,  I doubt that you will get many answers here.  
Perhaps you should

a) read the documentation that came with PWS in order to figure out how
   to properly set up cgi scripts

b) ask your question in a newsgroup that talks about web servers, such as
   comp.inforsystems.servers.*

Of course, there is always option c: have your clients convert to apache.

Kent


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

Date: 8 Apr 1999 21:49:25 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl and Personal Web Server
Message-Id: <7ej895$j3$1@gellyfish.btinternet.com>

On Thu, 8 Apr 1999 12:02:33 -0500 Mohammad Khan wrote:
> Hi,
>     I have written perl programs and i am running personal web server on
> windows 98 box. How can i run perl scripts from PWS?
> 

You can search DejaNews to find an answer to this or you could ask in :

comp.infosystems.www.servers.ms-wwindows


/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Thu, 8 Apr 1999 13:22:35 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: perldoc and PAGER
Message-Id: <MPG.1176afe710c06e7598971f@206.184.139.132>

> Ilya Zakharevich wrote:
> > Upgrade.  I think I put this on circa _54.

Is _54 stable?  I thought that was the devel heading to 5.006.  Oh, I'm 
confused.

Since some of us are using ActiveState's build on our PCs, is there a way 
to get the _54 version of Perldoc to fix the pager issue without having 
to trash our running ActiveState versions, finding a compiler for my 
PC, and building Perl from scratch?

Thanks,

-- 
Bill Moseley mailto:moseley@best.com


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

Date: 8 Apr 1999 21:28:28 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perldoc and PAGER
Message-Id: <7ej71s$am6$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Bill Moseley
<moseley@best.com>],
who wrote in article <MPG.1176afe710c06e7598971f@206.184.139.132>:
> > Ilya Zakharevich wrote:
> > > Upgrade.  I think I put this on circa _54.
> 
> Is _54 stable? 

Comparing to what?  Comparing to 5.005_02 it is much more stable.  I
hoped that the release of 5.005_03 will fix this, but a lot of .ph
misbehave again after downgrading 5.005_54 ===> 5.005_03 (Solaris 7).

I'm still investigating.

> Since some of us are using ActiveState's build on our PCs, is there a way 
> to get the _54 version of Perldoc to fix the pager issue without having 
> to trash our running ActiveState versions, finding a compiler for my 
> PC, and building Perl from scratch?

Why do not you want to do this?  ;-)

Ilya


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

Date: Thu, 8 Apr 1999 17:31:03 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Q: redefined subroutines
Message-Id: <1dpe751.17r49ur1rfomuN@[192.168.0.1]>

Peter John Acklam <jacklam@math.uio.no> wrote:

> I've stripped away everything that does not seem to cause the problem,
> and I am left with a Perl file only containing
> 
<snip>
>     use Dirhandle;
> 
> but when I run, or just syntax-check it, I get
> 
>     Subroutine new redefined at E:\PERL\lib/Dirhandle.pm line 32.
>     Subroutine DESTROY redefined at E:\PERL\lib/Dirhandle.pm line 43.
<snip>

It's DirHandle, not Dirhandle; fixing that will solve your problem.

-- 
 Kevin Reid: |    Macintosh:      
  "I'm me."  | Think different.
@s=(0)x79;@c=split'',q< !_@,#.$%^&*()-+={[}]|\:;"'<>?/>;for(;;){for($d=1
;$d<$#s;$d++){$s[$d]+=((($s[$d-1]+$s[$d]+$s[$d+1])/3)-$s[$d])*.1+((rand)
-.5)}print+map($c[$_%(scalar@c)],@s),$/}


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

Date: Thu, 08 Apr 1999 16:22:25 -0500
From: Eric Von Zee <evonzee@tritechnet.com>
Subject: Signal stuff on NT
Message-Id: <370D1E11.24A79E96@tritechnet.com>

Hola everyone,

How does one trap system signals on an NT box?  I know that defining a 

local($SIG{'key'}) = sub {print "do something\n";}; #right?

will do it for unix, and it seems to be the same for NT (IOW, I can
create the signal handler with no error).  However, (and maybe because
nt's kills work on a higher level) I cant trap a kill based on terminate
process or control-C or close window. (I'm running interactive now, but
will in the future be switching to a background process)

In addition, I don't know how to send signals from one program to
another to test the signal handler routines (the PID would be known) ..
is that possible? (maybe using the win32 module?  Would I need to know
the API calls?)

If its in the perldocs, I'd be happy with a pointer to 'perldoc ntsig'
or whatever..

Thanks for all the help you guys have provided in teh past, and for all
that I'm sure I'll be begging for in the future.

-e
(Just Another Perl Hacker... Someday)

-- 
Q: How does a quantum logic chicken cross the road?
A. The chicken is distributed probabilistically on
   all sides of the road until you observe it on 
   the side of your choice.
   
*------------------------------------------------------*
*    eric von zee     *------* tritech marketing inc.  *
*   web  developer    *------* evonzee@tritechnet.com  *
*  www.tritechnet.com *------*   630.654.0170 x 129    *
*------------------------------------------------------*


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

Date: 08 Apr 1999 16:06:37 -0400
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: stumped on regex - someone slay the dragin - please.
Message-Id: <x7vhf6swqa.fsf@home.sysarch.com>

>>>>> "ES" == Eric Smythe <ericsm@iafrica.com> writes:

  ES> Let us look more closely at those rules.

  ES>    	rule					example
  ES> ------------------------------------------------------
  ES> 1. 	a digit					6  
  ES> 2.	two digits					65
  ES> 3.	with a .					.65
  ES> 4.	preceeded by a digit			1.65
  ES> 5. 	or two digits				23.65

  ES> now 1. to 5. describe a $individualPrice

i do not see any examples in the data of prices without a . in
them. your rules are unclear about that. without some further anchoring
it is difficult to pin down which numbers are prices and which are not.
you have this string '15-16 kg ' in there which matches the 2 digits of
rule 2 but is it not a price. i will assume a . is required.

here is a regex which will get the prices one pair at a time. it handles
single prices too. once you get these strings you can split on - and
build your array any way you want. i leave that as an exercise to the
reader (as i don't understand what you want there!)


this seems to do the trick just fine

hth,

uri


$/ = undef ;
$text = <DATA> ;


while( $text =~ m[
		  (			# main grab
		    \d{0,2}		# 0-2 digits
		    \.			# required .
		    \d\d		# required 2 digits
  		    (?:			# group the second part
  		      -			# required - separator
  		      \d{0,2}		# 0-2 digits
  		      \.		# required .
  		      \d\d		# required 2 digits
  		    )?			# optional second price
		  )			# main grab
		  \b			# boundary (not really needed)
		]gx ) {			# global and extended

	print "$1\n" ;
}



__END__

 12.08-14.27  56s .27  Ruby Red 48s 11.53  56s .43-.53  SP
White 48s 5.49-8.23
---LEMONS: 15-16 kg cntrs SP Class I 90s 9.33-10.43  100s 10.15-10.98  120s
10.15-10.98  140s 9.88
---MISC CITRUS: ctns MR Clementine Ortanique 60s 7.41-8.51  75s 8.78-9.33
90s
10.43-11.53  108s 10.43-11.53  SP Clementine 60s 12.08-13.17  80s
12.08-13.17
---APPLES: per kg FR CLASS I Golden Delicious 70-75mm .77-.88  75-80mm
 .88-.99
Granny Smith 75-80mm .77-.93  GM CLASS I Jonagold 70-80mm .52-.60  80-90mm
 .52-.60  Elstar 65-70mm .71-.85  Cox Orange 65-70mm .36-.38  70-80mm
 .77-.82
IT CLASS I Golden Delicious 70-75mm .66-.69  75-80mm .66-.80  Granny Smith
70-80mm .66-.80  Braeburns 70-75mm 1.18-1.29  75-80mm 1.18-1.29  12.5 kg



-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Thu, 08 Apr 1999 20:56:39 GMT
From: drgreer@qtiworld.com (Darren Greer)
Subject: Re: Trouble with DBI and Oracle
Message-Id: <370d178e.242396998@news.qgraph.com>

-->The form I always use for the connect method is:
-->
-->$drh = DBI->install_driver('Oracle');
-->$dbh = $drh->connect($ENV{ORACLE_SID}, 'username', $pw) || die "Connect
-->error";
I tried this....and it does not lockup this time...but instead, errors
out with:
	Can't connect, no database driver specified at test2.pl line 9

Any suggestions?

Darren



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

Date: Thu, 08 Apr 1999 21:07:07 GMT
From: drgreer@qtiworld.com (Darren Greer)
Subject: Re: Trouble with DBI and Oracle
Message-Id: <370d19f3.243010220@news.qgraph.com>

I apologize for that last post...I had mistyped your configuration...

Running it with those parameters, there is _a lot_ more code in the
debugger, but it still locks up in the same spot with the same error.
I can manually connect to the database via sqlplus or svrmgrl, so I
know that the login is not the problem.  Is there some way that
perhaps, Oracle could lock out DBI?  Not sure if that makes any sense,
but I cant seem to think of anythign else,

Darren


-->The form I always use for the connect method is:
-->
-->$drh = DBI->install_driver('Oracle');
-->$dbh = $drh->connect($ENV{ORACLE_SID}, 'username', $pw) || die "Connect
-->error";
-->
-->I know that theoretically you don't have to set up the driver handle,
-->but I've found that it's worth typing the extra line of code.
-->
-->	Jim
-->
-->-- 
-->In most countries selling harmful things like drugs is punishable.
-->Then how come people can sell Microsoft software and go unpunished?



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

Date: 08 Apr 1999 16:26:01 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Verifying existance of a file
Message-Id: <xkfk8vmn406.fsf@valdemar.col.hp.com>

bart.lateur@skynet.be (Bart Lateur) writes:
> Still, I'm pondering on how to improve perldoc. How do you search stuff
> when you don't know *exactly* what you're looking for? "grep" kinda
> works, but isn't really in line with the rest of perldoc. "perldoc -g"?

The Right Answer(tm) from a techwriting POV is: use an index.  Index on
everything you can think of, and then ask people who don't know perl (but
know programming) what they'd look in an index for if they were asking
about a given topic, and index on that.  Then grab a thesaurus, and index 
on as many synonyms of what you've already got as you can.

Okay, I'm eggagerating a little.  But thats's one reason why skilled
indexers can make a decent amount of money-- indexing is hard, and
indexing well is even harder.

> Also: "-f" should look up stuff in perlop, too.

Yeah, that'd be nice.

-=Eric


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

Date: Thu, 8 Apr 1999 17:44:01 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Verifying existance of a file
Message-Id: <1v7je7.eu1.ln@magna.metronet.com>

Ophir Marko (ophir@saifun.com) wrote:

: How can i verify that a file exists?
                          ^^^^^^^^^^^
                          ^^^^^^^^^^^

   You can do a case insensitive word search in the Perl docs
   that came with your perl distribution.


      perl -ne 'print "$ARGV: $_" if /file exists/i' *.pod

perlfunc.pod:     -e    File exists.


   Duh.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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