[13190] in Perl-Users-Digest
Perl-Users Digest, Issue: 600 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 20 11:07:21 1999
Date: Fri, 20 Aug 1999 08:05:16 -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 Fri, 20 Aug 1999 Volume: 9 Number: 600
Today's topics:
Re: $8.99 NT/UNIX HOST, 100 megs, UNLIM HITS! CHEAP! Ju <gellyfish@gellyfish.com>
Re: Can I use regx with eof()? <kistler@fnmail.com>
Re: Can I use regx with eof()? (Larry Rosler)
Re: Can't compile DBD::Pg under IRIX 5.3 (possible repo david_demartini@non-hp-roseville-om3.om.hp.com
Directory Size <gary.segler@bms.com>
Re: execute a perl-script out of js <koenig@privat.toplink.de>
Re: execute a perl-script out of js <gellyfish@gellyfish.com>
Re: execute a perl-script out of js (Abigail)
Re: How to view code as text in working cgi script (Abigail)
Re: I'm trying pingecho problem <kistler@fnmail.com>
Re: launching applications (Abigail)
Re: Matching E-mail (Abigail)
Re: Matching E-mail <sariq@texas.net>
Re: Matching two strings (Abigail)
Re: Message-ID vs. Reference Header (Abigail)
Re: new to perl and a bit stupid (Anno Siegel)
new: vod@writemail.com
new: vod@writemail.com
Re: new: <jpeterson@office.colt.net>
Re: Newbie : tr/// question (Abigail)
Re: newbie CGI question re CGI.pm <toby@venice.cas.utk.edu>
Re: Not running Perl from Perl! Why not? (Abigail)
Re: parsing tecnique (Abigail)
Re: PERL & EXCEL <kilimount@earthling.net>
Re: perl + mysql.. (Abigail)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 Aug 1999 14:41:53 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: $8.99 NT/UNIX HOST, 100 megs, UNLIM HITS! CHEAP! Just found it!
Message-Id: <37bd5b21_2@newsread3.dircon.co.uk>
Philip 'Yes, that's my address' Newton <nospam.newton@gmx.net> wrote:
> designdood@my-deja.com wrote:
>>
>> fronpage 2k also, and FULL ASP and database!
>
> Yes, I'm sure these (first two) feature alone will win over most of the
> comp.lang.perl.misc regulars to this site.
>
Yeah,
I'm just busting to give up the space I got already to use that stuff ...
/J\
--
"What is the future for beef? Curtains?" - Graham Norton
------------------------------
Date: Fri, 20 Aug 1999 13:44:08 +0200
From: Per Kistler <kistler@fnmail.com>
To: Vincent Murphy <vmurphy@gamora.ndhm.gtegsc.com>
Subject: Re: Can I use regx with eof()?
Message-Id: <37BD3F88.3C91BB05@fnmail.com>
Hi Vinny
The split regexp can be more complex of course, to
capture your elements. The "(?=...)" stuff should also
work, or the gurus failed. One can treat separately,
with what to split, and how to deal with start and end
sequences. There is no eof() at the end of the loaded
string. "$" matches the end ( in "s" mode ). If you
cannot find the propper regexp, than just mail/post
an actual input.
Cheers, Per.
Vincent Murphy wrote:
> Per> $mem = $/; undef $/;
> Per> $data = <INPUT>;
> Per> $/ = $mem;
> Per> @elements = split(/\belement\b/s,$data);
>
> This is a good solution except that there are other things in the file and
> element is use fairly frequently, thus the split gives a lot of things I
> don't want. The element ... element regx captures all the necessary things
> except the last one since it is in the form of
--
Per Kistler kistler@fnmail.com / kistler@gmx.net
------------------------------------------------------------
------------------------------
Date: Fri, 20 Aug 1999 07:31:01 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Can I use regx with eof()?
Message-Id: <MPG.1227067db12a7b2c989e7f@nntp.hpl.hp.com>
In article <37BCBC8F.E6B8A0FC@fnmail.com> on Fri, 20 Aug 1999 04:25:19
+0200, Per Kistler <kistler@fnmail.com> says...
...
> $mem = $/; undef $/;
> $data = <INPUT>;
> $/ = $mem;
> @elements = split(/\belement\b/s,$data);
One cannot let that mishandling of $/ go by unnoticed. Let a block do
the save/restore.
{
local $/;
$data = <INPUT>;
}
@elements = split /\belement\b/, $data;
Or, as a one-liner (what else?!):
@elements = split /\belement\b/, do { local $/; <INPUT> };
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 20 Aug 1999 14:40:36 GMT
From: david_demartini@non-hp-roseville-om3.om.hp.com
Subject: Re: Can't compile DBD::Pg under IRIX 5.3 (possible repost sorry, having probs with Deja)
Message-Id: <7pjpd1$r64$1@nnrp1.deja.com>
In article <7n9r11$ma5$1@nnrp1.deja.com>,
Stuart <moigescr@hotmail.com> wrote:
> Dear All,
>
> I still have not been able to compile DBD::Pg under IRIX 5.3 for a
system
> running postgreSQL 6.4.0.
>
Why are you messing with IRIX 5.3? It will soon be a non-supported
O/S, and the IP22 is more than capable of running IRIX 6.2 (certainly
preferable to 5.3) and even IRIX 6.5 (if you have 64MB of memory or
more).
Also, you might check the SGI sig's for a quicker, response to this
question, they are monitored by SGI engineering staff on a daily basis.
Best of luck.
- David
(former SGI engineer)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 20 Aug 1999 10:34:07 -0400
From: Gary Segler <gary.segler@bms.com>
Subject: Directory Size
Message-Id: <37BD675F.D98E2D8D@bms.com>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi -
<p>Could anyone point me to a faq or Module that can tell me how to get
the size of a directory? I would like to scan a volume of home directories
that holds mail stores. My goal is to find out the size of the mail
store directory for every user.
<p>Thanks in advance!
<p>--Gary
<br> </html>
------------------------------
Date: Fri, 20 Aug 1999 15:15:34 +0200
From: Hartmut =?iso-8859-1?Q?K=F6nig?= <koenig@privat.toplink.de>
Subject: Re: execute a perl-script out of js
Message-Id: <37BD54F6.CE534C22@privat.toplink.de>
Well offer is much better for me ;-)
Thats a way wich could work for me. The background is, that i want to fire
up a "whois" on the server. But i would like to do this "in-line" the
javascript.
I will try ur trick - i think that work for me ! Thanks
Hartmut
Jeremy Gurney wrote:
> In article <37BD36E2.6CC57087@privat.toplink.de>,
> Hartmut =?iso-8859-1?Q?K=F6nig?= <koenig@privat.toplink.de> wrote:
> > Hi Jeremy,
> >
> > well sure this is possible, but i "need" to do this on the other way.
> Any
> > thoughts ?
> >
>
> I'm not sure exactly what you're trying to do here but ...
>
> (My hubmlest appologies to everyone in c.l.p.m as I'm about to go a bit
> off topic.)
>
> If you're using client side Javascript you cannot start up a process on
> the server unless you fire off a a url request, so if you have to have a
> pre written javascript routine dynamically fill a variable from a perl
> cgi then you could do the following.
>
> Have your javascript app in a frame which occupys 100% of the screen,
> with your perl cgi output in a hidden frame. Have the perl cgi write a
> simple HTML file containing a form (for no other reason than because
> it's really easy to get the value from a form field). Reference your
> form field from the javascript.
>
> This would work but I'm not sure if this exactly what you're after,
> could you give a bit more detail.
>
> I'm lacking inspiration today so forgive me if this isn't what you
> wanted.
>
> Jeremy Gurney
> SAS Programmer | Proteus Molecular Design Ltd.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
--
Wem das Wasser bis zum Halse steht, der darf den Kopf
nicht haengen lassen.
Joerg Schoenborn (General und Politiker)
---
Hartmut König
------------------------------
Date: 20 Aug 1999 14:45:05 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: execute a perl-script out of js
Message-Id: <37bd5be1_2@newsread3.dircon.co.uk>
Hartmut König <koenig@privat.toplink.de> wrote:
> Jeremy Gurney wrote:
>> In article <37BD177A.4549A12C@privat.toplink.de>,
>> Hartmut =?iso-8859-1?Q?K=F6nig?= <koenig@privat.toplink.de> wrote:
>> >
>> > just ask: is it possible to fill a js-variable with the return-code of
>> a
>> > perl-script in js-script ?
>> >
>> > Thanks for any help
>> >
>>
>> It's possible to write the enitre HTML/Javascript document from a perl
>> script filling in the variables as it is sent to the browser.
>>
>
> well sure this is possible, but i "need" to do this on the other way. Any
> thoughts ?
>
My thoughts are that this is the wrong newsgroup to be asking this question
- you should ask in some group that is interested in HTML or Javascript.
/J\
--
"Mark my words, sex is never enough. Sooner of later she'll want a
dishwasher" - Policeman, City Central
------------------------------
Date: 20 Aug 1999 09:16:29 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: execute a perl-script out of js
Message-Id: <slrn7rqorn.bq6.abigail@alexandra.delanet.com>
Hartmut König (koenig@privat.toplink.de) wrote on MMCLXXX September
MCMXCIII in <URL:news:37BD177A.4549A12C@privat.toplink.de>:
@@
@@ just ask: is it possible to fill a js-variable with the return-code of a
@@ perl-script in js-script ?
And your Perl question is?
Abigail
--
split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
-----------== 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: 20 Aug 1999 09:20:26 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How to view code as text in working cgi script
Message-Id: <slrn7rqp34.bq6.abigail@alexandra.delanet.com>
Bart Lateur (bart.lateur@skynet.be) wrote on MMCLXXVII September MCMXCIII
in <URL:news:37ba1642.5022012@news.skynet.be>:
;; Warren Bell wrote:
;;
;; >> No, you cannot steal CGI programs that way.
;; >
;; >I wasn't planning on it.
;;
;; Funny that people talk about "stealing code". The same people that say
;; that you may not hide the source for your scripts.
Who's saying you may not hide the source?
Anyway, what's your point?
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: Fri, 20 Aug 1999 12:26:56 +0200
From: Per Kistler <kistler@fnmail.com>
To: Toosmooth <toosmuth@earthlink.net>
Subject: Re: I'm trying pingecho problem
Message-Id: <37BD2D70.6BBD737D@fnmail.com>
Hi
I'm using the ping stuff like following on Linux:
#!/per/bin/perl
use Net::Ping;
$host = 'host.domain';
$timeout = 10;
$pinger = new Net::Ping('icmp');
if($pinger->ping($host,$timeout) ){
print "$host is alive\n";
} else {
print "ping $host did not work\n";
}
$pinger->close;
This works, but they say, one needs to be root to
make it work.
Maybe it helps...
-Per.
Toosmooth wrote:
>
> I'm trying to write this perl script that using pingecho to very my server
> is up before connecting to it.
>
> Below is the syntax that I'm using
>
> use Net::Ping;
> print "badass is alive\n" if pingecho(badass, 10) ;
>
> I receive the following output
>
> The Unsupported function alarm function is unimplemented at
> C:/Perl/lib/Net/Ping.pm line 309.
>
> I would appreciate any help that anyone can provide.
>
> Thanks,
>
> Matt
--
Per Kistler kistler@fnmail.com / kistler@gmx.net
------------------------------------------------------------
------------------------------
Date: 20 Aug 1999 09:26:05 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: launching applications
Message-Id: <slrn7rqpdm.bq6.abigail@alexandra.delanet.com>
Helen Sian Ashton (ceehsa1) wrote on MMCLXXVI September MCMXCIII in
<URL:news:FGK8Fp.7G0@cee.hw.ac.uk>:
&&
&& I'm trying to use a perl script from a web browser to launch an application.
&& can get the perl script to do everything I want to do if I run it from the DO
&& window - I am using the system command to launch the application. However thi
&& deosn't work when I run it from the browser, in fact everything but the syste
&& command seems to work!
&&
&& I am using a Windows NT PC and have tried this in both Netscape and IE
&& browsers. The perl scripts are stored on a UNIX server.
&&
&& Can anyonw shed some light?
1) Unix boxes generally don't run DOS programs very well.
2) Did you run an X-server on your PC, and does the script set the display
variable correctly? Furthermore, did you do an 'xhost +server.name',
and is the program you start an X-client? Else, it isn't likely to work.
Now, what this all has to do with Perl, I have no idea.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
-----------== 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: 20 Aug 1999 09:27:04 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Matching E-mail
Message-Id: <slrn7rqpfi.bq6.abigail@alexandra.delanet.com>
Winter (tungyat@yahoo.com) wrote on MMCLXXX September MCMXCIII in
<URL:news:2G4v3.5979$dr6.134029@news1.rdc2.on.home.com>:
..
.. Can anyone write a regular expression to detect email address? I have a line
.. of string $str may or may not contain email adress..
RTFFAQ.
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
-----------== 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: Fri, 20 Aug 1999 09:19:25 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Matching E-mail
Message-Id: <37BD63ED.2DE9D12E@texas.net>
Winter wrote:
>
> Hi,
>
> Can anyone write a regular expression to detect email address? I have a line
> of string $str may or may not contain email adress..
>
> Thanks in advance for you help, if you can help, please send it to
> ty.wong@utoronto.ca
Gosh...this question sure gets asked alot.
It would be nice if some Perl gods got together and created a list of
all the frequently asked Perl questions of which they could think.
Then, they could provide the answers, and include the questions and the
answers with the Perl distribution.
Unfortunately, such amazingly useful information would most assuredly be
very expensive...even 'priceless'.
- Tom
------------------------------
Date: 20 Aug 1999 09:36:32 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Matching two strings
Message-Id: <slrn7rqq19.bq6.abigail@alexandra.delanet.com>
Darren Janisse (djanisse@northrock.bm) wrote on MMCLXXIX September
MCMXCIII in <URL:news:S9Uu3.3263$1B5.211663@monger.newsread.com>:
__
__ Hello,
__
__ I have a statement in one of my scripts that would read:
__
__ write if $raduserid eq $userid;
__
__ however this does not work. $raduserid is the username from a radius log,
__ and $userid is the username from local user input. I have done extensive
__ testing, and for example $raduserid equals "testuser" and $userid equals
__ "testuser" however it does not run the write command.
Really?
#!/opt/perl/bin/perl -w
use strict;
my $hello;
format Test =
Hello, @<<<<<<<<
$hello
.
$~ = 'Test';
my $raduserid = "testuser";
my $userid = "testuser";
$hello = "world!";
write if $raduserid eq $userid;
__END__
Hello, world!
Seems to work for me.
Could you possible a bit less specific when you describe "does not work"?
Try again, now showing even less code.
Abigail
--
perl -wle '$, = " "; print grep {(1 x $_) !~ /^(11+)\1+$/} 2 .. shift'
-----------== 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: 20 Aug 1999 09:39:23 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Message-ID vs. Reference Header
Message-Id: <slrn7rqq6l.bq6.abigail@alexandra.delanet.com>
Bill Jones (bill@fccj.org) wrote on MMCLXXVI September MCMXCIII in
<URL:news:199908161211.IAA23961@astro.fccj.cc.fl.us>:
||
|| If I use the Message-ID string in place for the Reference header string -
|| would that resolve the posting issue?
No.
The Message-ID is a single ID, identifying your posting. The References
header is a list of IDs, identifying the postings you are referencing.
The same ID should not appear in both headers. And Message-ID isn't a
substitute for the References line either.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
-----------== 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: 20 Aug 1999 13:50:28 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: new to perl and a bit stupid
Message-Id: <7pjmf4$9o4$1@lublin.zrz.tu-berlin.de>
<ceara_rea@hotmail.com> wrote in comp.lang.perl.misc:
>this is probably a very dumb question, but I've never used perl before
>and I'm trying to write a script in it.........
>I'm trying to extract some data from a file which is split up into
>several sections, I'm only interested in data contained in one
>particular section which has the form:-
>
>SECTION HEADER
>lots of text lines
>that i want to do
>something with
>^$ (blank line marking end of section)
>
>If I was writing this in awk I'd start at pattern /SECTION HEADER/ and
>use the 'getline' function in a loop to get all the text lines until I
>hit a blankline.
You can do that in Perl.
> Alas sob, sob there's no getline in perl so I'm stuck.
>I've done a2p and this gives me a subroutine for getline (which
>incidentally when I put it into my script doesn't work) but I'm not sure
>that this is the best way to do it,
$line = <FH>, where FH is a file descriptor open for reading, reads
a line of text into $line. Normally.
> I have an inkling that maybe I
>should be putting the text lines of this section into an array and then
>reading each $line of the array? but I haven't got a clue how to
>construct it.
Don't do that unless you have to. One day you're going to meet a
big file that's going to rob you of all your memory.
>I'd greatly appreciate any help, and if somebody could spoon feed me the
>code that would be even better.
while ( <DATA> ) {
if ( m/^SECTION HEADER/ .. m/^$/ ) {
print; # or do whatever with $_
}
}
lines
before the
section
header
SECTION HEADER
lots of text lines
that i want to do
something with
(blank line marking end of section)
lines
following the
section
------------------------------
Date: Fri, 20 Aug 1999 13:10:58 GMT
From: vod@writemail.com
Subject: new:
Message-Id: <7pjk4p$n0d$1@nnrp1.deja.com>
i am having a prob running a script
See when i type 127.0.0.1 then i get a
directory of omni in c:/httpd
so i put the
test form and the *.pl file in there
and
i press send in the form
and it shows c:/127.0.0.1/pl2.pl in
the url line but then
dosent run the script pl2.pl
do i have to rewite the the script again
(AS i reinstalled active perl with isapi)after installing
active perl with that new component or wat
tell me about it.
the line
#!/usr/local/bin/perl
is this line creating any prob?
the script is
#!/usr/local/bin/perl
require ("/usr/local/lib/perl5/cgi-lib.pl");*******
&ReadParse;
print "Content-type:text/html\n\n";
print <<END_OF_MESSAGE;
<html>
<title>Thank You Page</title>
<h1>Thank you for filling out my form!</h1>
Thank you, $in{'name'}, for filling out my form!
I will mail information to $in{'address'} right away.
</html>
END_OF_MESSAGE
name as pl2.pl
*******do i change this line
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 20 Aug 1999 13:11:12 GMT
From: vod@writemail.com
Subject: new:
Message-Id: <7pjk57$n0k$1@nnrp1.deja.com>
i am having a prob running a script
See when i type 127.0.0.1 then i get a
directory of omni in c:/httpd
so i put the
test form and the *.pl file in there
and
i press send in the form
and it shows c:/127.0.0.1/pl2.pl in
the url line but then
dosent run the script pl2.pl
do i have to rewite the the script again
(AS i reinstalled active perl with isapi)after installing
active perl with that new component or wat
tell me about it.
the line
#!/usr/local/bin/perl
is this line creating any prob?
the script is
#!/usr/local/bin/perl
require ("/usr/local/lib/perl5/cgi-lib.pl");*******
&ReadParse;
print "Content-type:text/html\n\n";
print <<END_OF_MESSAGE;
<html>
<title>Thank You Page</title>
<h1>Thank you for filling out my form!</h1>
Thank you, $in{'name'}, for filling out my form!
I will mail information to $in{'address'} right away.
</html>
END_OF_MESSAGE
name as pl2.pl
*******do i change this line
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Fri, 20 Aug 1999 14:00:15 GMT
From: Jon Peterson <jpeterson@office.colt.net>
Subject: Re: new:
Message-Id: <Pbdv3.201$u07.1587@news.colt.net>
vod@writemail.com wrote:
> i am having a prob running a script
> i press send in the form
> and it shows c:/127.0.0.1/pl2.pl in
> the url line but then
> dosent run the script pl2.pl
> the line
> #!/usr/local/bin/perl
> is this line creating any prob?
Hmmm. You appear to be working on Windows. The line above is meaningless
in this environment. Worse, you script has a unix style pathname in it
which is most unlikely to be what you want.
To be honest it appears that your level is perl programming and CGI programming
is very low indeed. While not a sin in itself, it does mean that no-one in
this group is going to be able to help you very easily. I suggest going to
www.perl.com and reading up on the language.
------------------------------
Date: 20 Aug 1999 09:44:31 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Newbie : tr/// question
Message-Id: <slrn7rqqg9.bq6.abigail@alexandra.delanet.com>
JustYaz (justyaz@aol.com) wrote on MMCLXXX September MCMXCIII in
<URL:news:19990820015230.11105.00001229@ng-bh1.aol.com>:
<> I looked through the FAQ on www.activestate.com to find out the
<> answer to my queestion. Maybe I missed something but I did not
<> find an answer. Why does this function not accept character classes
<> as defined in Table 7-1 of the Gecko book?
<> ie.
<> tr/\s+/\|/s; # does not accept \s as a space
Because tr/// doesn't do such interpolation. Read the manual.
Just use:
s/\s+/|/g; # No need to escape | here.
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
-> define ("foldoc", "perl")) [0] -> print'
-----------== 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: Fri, 20 Aug 1999 09:44:22 -0400
From: toby <toby@venice.cas.utk.edu>
Subject: Re: newbie CGI question re CGI.pm
Message-Id: <37BD5BB6.46571935@venice.cas.utk.edu>
either Jana or John wrote:
> You're right, I checked the online ISP FAQ, the path should have been
> #!/usr/bin/perl
> I fixed it -- same exact error message
>
OK.
>
> I found that my permissions were wrong --
> couldn't execute. I changed the directory and
> the file to 755. -- same exact error message
>
OK.
>
> Also -- remember I don't know this code, I just copied it from a book
> I changed the q's to p's because all the other examples in the
> book have p's. I know it's lame, but I'm dying to get something
> running. -- same exact error message. (I kept the p's, BTW)
>
Doesn't matter. The code works just fine on my box without any
modification (except the /usr/bin/perl). I am at a lost, unless the
CGI.pm module is broken somehow, or you are passing the script to the
server in a format that Unix doesn't like. Funky newlines, etc.
Try something like this:
#!/usr/bin/perl -w
use strict;
use CGI;
my $cgi = new CGI;
print $cgi->header;
print "Hello World\n";
If that works, then. . . .
Toby
------------------------------
Date: 20 Aug 1999 09:46:56 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Not running Perl from Perl! Why not?
Message-Id: <slrn7rqqkp.bq6.abigail@alexandra.delanet.com>
mark@bstar.net (mark@bstar.net) wrote on MMCLXXVI September MCMXCIII in
<URL:news:7p9j3j$eq4$1@nnrp1.deja.com>:
~~ Help me! Why won't the following code work?
~~
~~ $todo = "/usr/bin/perl /path/to/my/cgi/file.cgi";
~~ # Changing the line above here to $todo = "whois microsoft.com"; will
~~ show the whois entry for microsoft.com
~~ $output = `$todo`;
~~ print $output;
~~
~~ It just won't print anything!
~~ But if I telnet in and run:
~~ /usr/bin/perl /path/to/my/cgi/file.cgi
~~ Then It'll work.
~~
~~ The reason I'm doing this is because I'm using SSI in my 500 Internal
~~ Server Error thing so I can run the CGI again (via telnet sorta) to see
~~ what errors there are straight in the browser.
~~
~~ What's wrong!?!
That could be a 1000 things, all not Perl related. Ask your system
administrator, as it's likely to be a policy issue.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
-----------== 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: 20 Aug 1999 09:53:51 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: parsing tecnique
Message-Id: <slrn7rqr1o.bq6.abigail@alexandra.delanet.com>
mike (mcmike123@worldnet.att.net) wrote on MMCLXXVI September MCMXCIII in
<URL:news:7p8tpk$coc$1@bgtnsc01.worldnet.att.net>:
?? Whare can i learn about parsing an html document, for the " <a href "
?? statments?
I suggest starting by studying the SGML production rules, and then
the HTML preambles, followed by the HTML DTD.
Only then you will be able to parse HTML.
Don't get carried away if someone points out HTML::Parser to you. This
module would be less misnamed if it was called "BBQ::Penguin", as
HTML::Parser doesn't parse, and has less HTML knowledge than the average
honey bee.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
-----------== 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: Fri, 20 Aug 1999 15:44:19 +0200
From: kilimount <kilimount@earthling.net>
To: Martien Verbruggen <mgjv@comdyn.com.au>
Subject: Re: PERL & EXCEL
Message-Id: <37BD5BB3.549E8ED2@earthling.net>
Thanx for your answers I finaly got it workin' :o)
(very usefull module I belive)
Kilimount.
Martien Verbruggen wrote:
> In article <37B92041.236CE5A0@earthling.net>,
> kilimount <kilimount@earthling.net> writes:
>
> > $xlfile ="c:\\filename.xls";
>
> > $workbook = $xl_app->Workbooks->Open($xlfile);
>
> > $worksheet = $workbook->Worksheets(1);
>
> > Perl Builder's debugger is returning this line :
> > Can't call method "Worksheets" without a package or object reference at
> > script line 19.
> > Thanx in advance for your help,
>
> That most likely means that $workbook, which you use as a reference to
> an object is undefined. The most likely reason for that is that
> $xl_app->Workbooks->Open($xlfile); returned an undefined value,
> probably because it failed, which may actually be caused by $xlfile
> not existing, or not being a valid excel file or whatever.
>
> You should consult the manual of the modules you're using to find out
> how to get information from that Open function about what went wrong.
>
> $workbook = $xl_app->Workbooks->Open($xlfile)
> || die "Something went wrong: " .
> [insert module specific method for getting the error];
>
> Martien
> --
> Martien Verbruggen |
> Interactive Media Division | For heaven's sake, don't TRY to be
> Commercial Dynamics Pty. Ltd. | cynical. It's perfectly easy to be
> NSW, Australia | cynical.
------------------------------
Date: 20 Aug 1999 09:56:15 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: perl + mysql..
Message-Id: <slrn7rqr68.bq6.abigail@alexandra.delanet.com>
Teru (mtlam@hongkong.com) wrote on MMCLXXIX September MCMXCIII in
<URL:news:7pg8ua$89j$1@thccy25.nthu.edu.tw>:
""
"" I'm going to write a program in perl to show out the databases, tables and
"" indexes of my MySQL databases, so that I can select databases and datas
"" through the web browser.
"" But I don't have any idea on how to do it ?
"" Does anyone know how ?
Uhm, perhaps you should hire a programmer?
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
-----------== 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: 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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 600
*************************************