[12668] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 77 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 8 11:17:17 1999

Date: Thu, 8 Jul 1999 08:10:13 -0700 (PDT)
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 Jul 1999     Volume: 9 Number: 77

Today's topics:
        Perl script will not run from cgi-bin <leejk@cat.com>
    Re: Practical Extraction and Report Language <iansmith@pepper.ncinter.net>
    Re: Problem with a SQL statement in a Perl script <brownstar@my-deja.com>
    Re: Question: Good Project? <cllajoie@mtu.edu>
    Re: regex to eat all html tags (or check your faqs, Jac <seth@home-industires>
    Re: regex to eat all html tags (or check your faqs, Jac <seth@home-industires>
    Re: regex to eat all html tags (or check your faqs, Jac (John Borwick)
    Re: regex to eat all html tags (or check your faqs, Jac <graham@cs.man.ac.uk>
        REMOTE_HOST never gives host... <breville@mpce.mq.edu.au>
        sending ALT sequence to program <gld@alum.mit.edu>
        strict and AutoLoader/AutoSplit <kwsths@my-deja.com>
    Re: Summing Array to Hash elements (M.J.T. Guy)
    Re: Webpages and Perl-Couple of Questions (Abigail)
    Re: Webpages and Perl-Couple of Questions (Bart Lateur)
        Which is better, Perl, Cold Fusion or... <als48@pantheon.yale.edu>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Thu, 8 Jul 1999 10:09:17 -0400
From: "Keith Lee" <leejk@cat.com>
Subject: Perl script will not run from cgi-bin
Message-Id: <7m2be4$etr$1@ns1.cat.com>

Hey everyone,
    I have a little perl script that runs another program. When this script
is run from the command line, it works fine, but when executed from the web
server it fails. At first, the server logs showed that the external program
I was trying to launch could not find certain libraries. For some reason,
the web server recognizes all other environment variables but $SHLIB_PATH,
which is where the location of the library files is defined that my external
program needs to run. What I tried is to define this vaiable inside the Perl
script. The error messages in the server log no longer appear, and the
external program runs, but does not output what is expected. It seems to die
before it is finished. I am using an Apache web server on a HP-UX machine.
Can anybody tell me if this a web server problem, or is my Perl bad?

#!/usr/local/perl5/bin/perl -w

# define required modules
use diagnostics;

$new_filename = "aaaa08077.vdi";
$vdi_filename = "aaaa08077.vdi";
$tmp_dir = "/demo/web/htdocs/tmp_files";

# establish paths
$oldpath = $ENV{"SHLIB_PATH"};
$ENV{"SHLIB_PATH"} = "/demo/division/lib/hpux10";

# create vpf file
system("/demo/division/bin/hpux10/vdi2vpf -pb $tmp_dir $vdi_filename");




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

Date: Thu, 08 Jul 1999 14:20:38 GMT
From: Ian Smith <iansmith@pepper.ncinter.net>
Subject: Re: Practical Extraction and Report Language
Message-Id: <Ws2h3.535$s73.13857@typ21b.nn.bcandid.com>

In comp.lang.perl.misc Fred Ruffet <fruffet@kaptech.com> wrote:
> I would appreciate any more information about perl creation and things like
> that (Not a lot of things, I don't want all of your time).

You can not get a beter rundown on the history of Perl than the new
site http://history.perl.org/ which has a very nice history with
lots of interesting facts and tidbits.

-- 
$p=3;do{print substr(' "eceoearrr l ts
uh"aJktn,Ph',$p-1,1);$p=15*$p%58;}until $p==3;


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

Date: Thu, 08 Jul 1999 13:55:25 GMT
From: Jeff Pascoe <brownstar@my-deja.com>
Subject: Re: Problem with a SQL statement in a Perl script
Message-Id: <7m2ak7$bpb$1@nnrp1.deja.com>

In article <378468D8.6EE28B6F@hotmail.com>,
  Richard H <rhrh@hotmail.com> wrote:
> Same as the above, you need to show your &Connect code and the error
> message generated when you can't insert what you want to insert,
theres
> no indication of where the problem actually is.
> If youre not getting errors out:
>
> $dbh->connect('blah','blah',etc) || die "didnt connect cos :
> $DBI::errstr ";
>
> Richard H

Thanks, for the tip about error messages,

I found out that afte my execute statement i forgot to add a
$dbh->prepare('COMMIT');
statement.

Jeff


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 08 Jul 1999 09:11:07 -0400
From: Chad La Joie <cllajoie@mtu.edu>
Subject: Re: Question: Good Project?
Message-Id: <3784A36B.6C529DA0@mtu.edu>

That idea is so stupid.
    --CK

Jason Stapels wrote:

> Write Windows2001



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

Date: Thu, 8 Jul 1999 08:24:25 -0400
From: Seth Rothberg <seth@home-industires>
Subject: Re: regex to eat all html tags (or check your faqs, Jack.)
Message-Id: <931436665.1759759035@news.crocker.com>

This is how I clicked:
1. http://www.perl.com
2. FAQs (a link the left-hand column)
3. 6 (which is the faq for regular expressions).

I thought it would be a reasonable place to look for the info you said wa=
s
available about using regexs to eat html tags.

I haven't quit my day job, that's for sure. But the organization of the f=
aqs
and other documentation is often difficult to traverse. Do you experience=
d
Perl users forget this sometimes?

Seth

Eric The Read <emschwar@rmi.net> wrote:
>sethr@crocker.com writes:
>> Back from perl.com. Couldn't find the faq there either. Seth
>
>Then, I beg of you, leave Perl alone, and go back to whatever job you ha=
d=20
>before you tried to start programming.  If your reading comprehension
>really is poor enough that you can't determine that a hypertext link
>clearly labeled "FAQs" will take you to the FAQ, then you are surely
>unable to profit from any help anyone here could possibly give you.
>
>-=3DEric



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

Date: Thu, 8 Jul 1999 08:42:15 -0400
From: Seth Rothberg <seth@home-industires>
Subject: Re: regex to eat all html tags (or check your faqs, Jack.)
Message-Id: <931437735.615038177@news.crocker.com>

Thanks. Seth

revjack <revjack@radix.net> wrote:
>sethr@crocker.com explains it all:
>
>:Back from perl.com. Couldn't find the faq there either. Seth
>
>Go back to www.perl.com
>
>Click on "FAQs"
>
>Click on part 0 (zero)
>
>Search that page for "HTML"
>
>Scroll up a bit to see what part it's in (9 in your case)
>
>Go back one page to the FAQ page
>
>Click on 9



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

Date: Thu, 8 Jul 1999 13:51:32 GMT
From: John.Borwick@sas.com (John Borwick)
Subject: Re: regex to eat all html tags (or check your faqs, Jack.)
Message-Id: <3785acbb.5939120@newshost.unx.sas.com>

On 7 Jul 1999 22:12:11 GMT, revjack <revjack@radix.net> wrote:

>Is there any reason the questions in /newdocs/pod/perlfaq.html aren't
>hyperlinked to the answers? Seems like a good opportunity to exploit the
>wonderful power of HTML. 

This seems terribly funny to me.

I just wanted to share,

-- 
John Borwick


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

Date: 08 Jul 1999 15:54:38 +0100
From: Graham Gough <graham@cs.man.ac.uk>
Subject: Re: regex to eat all html tags (or check your faqs, Jack.)
Message-Id: <ttlaet7faz5.fsf@sphere.cs.man.ac.uk>

 perldoc -q html

is even easier than button clicking



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

Date: Fri, 9 Jul 1999 00:45:39 +1000
From: "Brendan Reville" <breville@mpce.mq.edu.au>
Subject: REMOTE_HOST never gives host...
Message-Id: <7m2dk4$mnn$1@sunb.ocs.mq.edu.au>

hi all,

I use this:

   $ip_number = "$ENV{'REMOTE_HOST'}";

to grab a visitor's host name.  Now when I visit other people's websites,
they can display my actual host name (blah.mq.edu.au) using whatever scripts
they use.  But my own script, using the above, can only get my IP number.

Is there perhaps something peculiar about the server that I'm running my own
script on, that means it doesn't deliver the host name to my script?  (Is
this even possible?)

Or have I overlooked something?

thanks!





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

Date: Thu, 8 Jul 1999 09:39:56 -0400
From: "Gary L. Drescher" <gld@alum.mit.edu>
Subject: sending ALT sequence to program
Message-Id: <MS1h3.3237$kL2.259770@ndnws01.ne.mediaone.net>

How can I use perl to include an ALT sequence in a character string sent as
input to a running program (under Win98)?  Thanks.





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

Date: Thu, 08 Jul 1999 14:02:16 GMT
From: Kwsths <kwsths@my-deja.com>
Subject: strict and AutoLoader/AutoSplit
Message-Id: <7m2b11$bv3$1@nnrp1.deja.com>

 Hi.
I have the following code in file /tmp/lib/Example.pm:
package Example;
@ISA = qw(AutoLoader);
use strict;
use AutoLoader;
sub new {
  my $class = shift;
  my $self = {};
  bless $self,$class;
  return $self;
}

sub method1 {
  my $self = shift;
  my $variable = shift;       #If 'my' is not present Perl complains
  print "Perl complains about my $variable\n";
}
__END__;

sub method2 {
  my $self = shift;
  $variable = shift;          #intentionally omit 'my'
  print "Perl didn't complain about $variable\n";
}



I run:
perl -MAutoSplit -e 'autosplit("/tmp/lib/Example.pm","/tmp/lib/auto",0)'

Now if I run:
#!/ms/dist/perl5/bin/perl
use lib '/tmp/lib';
use strict;
use Example;
my $example = new Example;
$example->method1('Hello');
$example->method2('Hello');


Perl will complain if I don't declare $variable in method1 but won't if
I don't in method2.

Is this a feature? It looks more like a bug to me.

I though I'd share this with you because a typo in an autoloaded
function caused me a couple of hours of aggravation.

I can enforce strict on method2 by placing 'use strict;' inside the
method but does anyone know of a workaround to declaring use strict in
every autoloaded function? It seems a bit silly.

--
regards...


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 8 Jul 1999 13:19:00 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Summing Array to Hash elements
Message-Id: <7m28g4$do5$1@pegasus.csx.cam.ac.uk>

Larry Rosler <lr@hpl.hp.com> wrote:
>In article <u4sjg0w8o.fsf@prodigy.net> on 07 Jul 1999 21:24:23 -0400, 
>RABM@prodigy.net <RABM@prodigy.net> says...
>...
>> my %word;
>> while( <DATA> =~ m/(.+)/g) {
>>     $word{$1}++;
>> }
>
>That is a very strange way to do, in essence, chomp().  And I don't know 
>why the '/g' is there.  How many times can that regex match on one line, 
>anyhow?

Not that it's given the chance to match any line more once anyway.


Mike Guy


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

Date: 8 Jul 1999 07:52:54 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Webpages and Perl-Couple of Questions
Message-Id: <slrn7o97oe.vhd.abigail@alexandra.delanet.com>

Bart Lateur (bart.lateur@skynet.be) wrote on MMCXXXVII September MCMXCIII
in <URL:news:37865a75.3907584@news.skynet.be>:
?? 
?? I thought the "common" expression was "Been There, Done That, Got The
?? T-Shirt". But, what do I know. I'm not American.


Maybe in Belgium there are free T-shirts for everything you do,
but here in the states, you have to buy everything.



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== 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: Thu, 08 Jul 1999 13:15:20 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Webpages and Perl-Couple of Questions
Message-Id: <3784a3c8.22678257@news.skynet.be>

Abigail wrote:

>Maybe in Belgium there are free T-shirts for everything you do,
>but here in the states, you have to buy everything.

Quite the contrary. The one time I've been in the States, I noticed that
some people sold T-shirts really cheap, 2$ or so. Crappy T-shirts: wash
them once, and they're torn/out of shape/whatever.

Here in Belgium, T-shirts are far more expensive. Even the crappy ones.
;-)

	Bart.


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

Date: Thu, 8 Jul 1999 10:35:08 -0400
From: Andrew Singer <als48@pantheon.yale.edu>
Subject: Which is better, Perl, Cold Fusion or...
Message-Id: <Pine.GSO.4.10.9907081034560.7764-100000@mercury.cis.yale.edu>

Hey, I'm a Yalie interning for Trade Show News Network (www.tsnn.com).  We
have to decide which language to program in to connect our database to the
web and make dynamic web pages, etc.  Would you recommend, Perl, Cold
Fusion, or some other language, like Zope or PHP?  We are not looking for
the cheapest or easiest to use language; we want the most powerful and
reliable.  Thanks a lot for your help!

-Andy

___________________________________________
Andrew Singer
300 W 108 St, Apt 1A
NY, NY 10025
(212)864-3515




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

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

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 V9 Issue 77
************************************


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