[16992] in Perl-Users-Digest
Perl-Users Digest, Issue: 4404 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 22 11:05:24 2000
Date: Fri, 22 Sep 2000 08:05:09 -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: <969635109-v9-i4404@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 22 Sep 2000 Volume: 9 Number: 4404
Today's topics:
Re: Ambiguous use of values <fty@mediapulse.com>
"system" running cmd with mult args <hmerrill@my-deja.com>
Re: "system" running cmd with mult args (Garry Williams)
Re: "system" running cmd with mult args (Abigail)
Re: "system" running cmd with mult args <hmerrill@my-deja.com>
Re: "system" running cmd with mult args <hmerrill@my-deja.com>
Re: Auto-Execute Perl in HTML ??? <admin@salvador.venice.ca.us>
Re: Candidate for the top ten perl mistakes list <russ_jones@rac.ray.com>
Re: Candidate for the top ten perl mistakes list (Abigail)
delimiter problem <carlfox@surplusnet.com>
Re: delimiter problem <email@address.com>
GDBM_File <kevin.porter@fastsearch.com>
Re: HELP: "$line =~ s|; \$\$\$TEXT|\$\$\$TEXT|;" (Keith Calvert Ivey)
Re: HELP: "$line =~ s|; \$\$\$TEXT|\$\$\$TEXT|;" (Abigail)
How to process bin file (Bernd Hanses)
Re: Is possible to control a page feet ? (Abigail)
Re: Life of a perl script mufy@my-deja.com
Newbie CGI question: LWP not installed module, can I s <davesisk@ipass.net>
Newbie Perl/CGI Question <bsamp@my-deja.com>
Re: Newbie Perl/CGI Question <carlfox@surplusnet.com>
Re: Newbie Perl/CGI Question <red_orc@my-deja.com>
PERL and GPS (Bob M)
Re: perl/dbi/mysql problem <fty@mediapulse.com>
Re: Portability of Perl/Tk programs? (Clinton A. Pierce)
Re: Pure perl encrypt/decryption? (Abigail)
Re: RecDescent bug? (Abigail)
Re: Regex standards: ranges <bart.lateur@skynet.be>
serial port communication (windows) (Bob M)
Re: Setting all variables to null (Abigail)
Very newbie! <vertical.reality@ntlworld.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 22 Sep 2000 10:55:11 -0400
From: "Jay Flaherty" <fty@mediapulse.com>
Subject: Re: Ambiguous use of values
Message-Id: <8qfs09$n51$1@news3.icx.net>
values is a reserved word is Perl (i.e. @values = (keys %hash); )
try putting single quotes around it or use Values instead.
jay
"arthur" <star@sonic.net> wrote in message
news:B5EC1FB0.87EA%star@sonic.net...
> Hi All,
>
> Sorry to ask so many dumb questions but I think I am learning :@)
>
> I put this in a script to try and get a popup menu:
> popup_menu(-name=>'game',
> -values=>['red','green','blue','chartreuse']),
> and I get this:
> # Ambiguous use of values => resolved to "values" =>.
> File 'StarMax HD:Desktop Folder:popup.cgi'; Line 13
> # Can't find string terminator "'" anywhere before EOF.
> File 'StarMax HD:Desktop Folder:popup.cgi'; Line 14
>
> anyone know why,
> Thank You,
> Arthur
> star@sonic.net
>
------------------------------
Date: Fri, 22 Sep 2000 13:09:19 GMT
From: Hardy Merrill <hmerrill@my-deja.com>
Subject: "system" running cmd with mult args
Message-Id: <8qflle$oav$1@nnrp1.deja.com>
If I want to invoke "system" to run a command my_cmd, and that command
takes arguments like
-file /path/to/file
and
-color green
how do I do it - safely? I'm able to do it if I put the *whole* command
including the args in one string to system, like:
$rc = system("my_cmd -file /path/to/file -color green");
but Programming Perl(I think?) says that a safer way to invoke system
when there is more than one argument, is to include each arg in a
separate string, like
$rc = system("my_cmd", "-file /path/to/file", "-color green");
but I can't get that to work. Any ideas are appreciated.
TIA.
--
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 22 Sep 2000 13:43:28 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: "system" running cmd with mult args
Message-Id: <4mJy5.769$fa2.62011@eagle.america.net>
On Fri, 22 Sep 2000 13:09:19 GMT, Hardy Merrill <hmerrill@my-deja.com> wrote:
>If I want to invoke "system" to run a command my_cmd, and that command
...
>but Programming Perl(I think?) says that a safer way to invoke system
>when there is more than one argument, is to include each arg in a
>separate string, like
>
> $rc = system("my_cmd", "-file /path/to/file", "-color green");
Oops. That should be
$rc = system("my_cmd", "-file", "/path/to/file", "-color", "green");
--
Garry Williams
------------------------------
Date: 22 Sep 2000 14:16:54 GMT
From: abigail@foad.org (Abigail)
Subject: Re: "system" running cmd with mult args
Message-Id: <slrn8smqcd.5fq.abigail@alexandra.foad.org>
Garry Williams (garry@ifr.zvolve.net) wrote on MMDLXXIX September
MCMXCIII in <URL:news:4mJy5.769$fa2.62011@eagle.america.net>:
-: On Fri, 22 Sep 2000 13:09:19 GMT, Hardy Merrill <hmerrill@my-deja.com> wrote:
-: >If I want to invoke "system" to run a command my_cmd, and that command
-: ...
-: >but Programming Perl(I think?) says that a safer way to invoke system
-: >when there is more than one argument, is to include each arg in a
-: >separate string, like
-: >
-: > $rc = system("my_cmd", "-file /path/to/file", "-color green");
-:
-: Oops. That should be
-:
-: $rc = system("my_cmd", "-file", "/path/to/file", "-color", "green");
Too much punctuation:
$rc = system my_cmd => -file, "/path/to/file", -color, "green";
Or, to signal option/value pairs:
$rc = system my_cmd => -file => "/path/to/file",
-color => "green";
Or, if you want to minimize the punctuation:
$rc = system my_cmd => qw {-file /path/to/file -color green};
Abigail
--
perl -we 'eval {die ["Just another Perl Hacker\n"]}; print ${$@}[$#{@${@}}]'
# A carp swims in the
# pool. Lao Tse sitting
# beside a river.
------------------------------
Date: Fri, 22 Sep 2000 14:28:31 GMT
From: Hardy Merrill <hmerrill@my-deja.com>
Subject: Re: "system" running cmd with mult args
Message-Id: <8qfq9k$tte$1@nnrp1.deja.com>
In article <4mJy5.769$fa2.62011@eagle.america.net>,
garry@america.net wrote:
> On Fri, 22 Sep 2000 13:09:19 GMT, Hardy Merrill <hmerrill@my-deja.com>
wrote:
> >If I want to invoke "system" to run a command my_cmd, and that
command
> ...
> >but Programming Perl(I think?) says that a safer way to invoke system
> >when there is more than one argument, is to include each arg in a
> >separate string, like
> >
> > $rc = system("my_cmd", "-file /path/to/file", "-color green");
>
> Oops. That should be
>
> $rc = system("my_cmd", "-file", "/path/to/file", "-color",
"green");
Ok, I got that to work. Now the kicker - I want to kick off
"my_cmd" in the background. When I try to add the ampersand
parameter as the last parameter, it croaks. I've tried
escaping the ampersand - no dice. Any ideas?
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 22 Sep 2000 14:49:54 GMT
From: Hardy Merrill <hmerrill@my-deja.com>
Subject: Re: "system" running cmd with mult args
Message-Id: <8qfri8$vn0$1@nnrp1.deja.com>
In article <slrn8smqcd.5fq.abigail@alexandra.foad.org>,
abigail@foad.org wrote:
> Garry Williams (garry@ifr.zvolve.net) wrote on MMDLXXIX September
> MCMXCIII in <URL:news:4mJy5.769$fa2.62011@eagle.america.net>:
> -: On Fri, 22 Sep 2000 13:09:19 GMT, Hardy Merrill
<hmerrill@my-deja.com> wrote:
> -: >If I want to invoke "system" to run a command my_cmd, and that
command
> -: ...
> -: >but Programming Perl(I think?) says that a safer way to invoke
system
> -: >when there is more than one argument, is to include each arg in a
> -: >separate string, like
> -: >
> -: > $rc = system("my_cmd", "-file /path/to/file", "-color green");
> -:
> -: Oops. That should be
> -:
> -: $rc = system("my_cmd", "-file", "/path/to/file", "-color",
"green");
>
> Too much punctuation:
>
> $rc = system my_cmd => -file, "/path/to/file", -color, "green";
>
> Or, to signal option/value pairs:
>
> $rc = system my_cmd => -file => "/path/to/file",
> -color => "green";
>
> Or, if you want to minimize the punctuation:
>
> $rc = system my_cmd => qw {-file /path/to/file -color green};
>
> Abigail
Thanks, I'll try those.
One additional problem that I didn't mention earlier - I want
to kick my_cmd off in the background, but when I try to add the
ampersand as the last parameter to system, it croaks. Ideas?
--
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 22 Sep 2000 06:16:17 -0700
From: Pan <admin@salvador.venice.ca.us>
Subject: Re: Auto-Execute Perl in HTML ???
Message-Id: <39CB5BA1.9D81E93F@salvador.venice.ca.us>
If you don't want to return any data to the browser, you could also call
the script from inside of an image tag.
<IMG SRC=foo.pl HEIGHT=1 WIDTH=1>
Mark wrote:
>
> let's see if I can remember the syntax...
>
> Change your html file to filname.shtml
>
> then where you want the cgi to run add the line...
>
> <!--#exec cgi="path/to/sctipt" -->
>
> I think that is right...
>
> Mark
>
> In article <8qe3ha$eh$1@nnrp1.deja.com>,
> maureen <maureen927@my-deja.com> wrote:
> > Hi:
> > I have a perl script that executes successfully when
> > executed via a hyperlink from a webpage. The script
> > generates another webpage.
> >
> > I'd like to know how/if I can reference this script (which
> > will be altered) in my html document so that as the html
> > is rendering, the script executes and creates more html in
> > the same html document and then the rest of the html is rendered.
> >
> > I just can seem to find the correct syntax for this.
> > It will be on a UNIX server.
> >
> > Thanks...!
> >
> > Maureen
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> --
> Please reply to this newsgroup as my Deja mail
> is used as a spam catcher only!
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
--
Pan
admin@salvador.venice.ca.us
http://www.la-online.com
------------------------------
Date: Fri, 22 Sep 2000 08:21:01 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Candidate for the top ten perl mistakes list
Message-Id: <39CB5CBD.E5489CD1@rac.ray.com>
Abigail wrote:
>
(snip)
>
> However, in most cases, none of them are actually mistakes.
>
Oh boy, another one. "However, in most cases none of them IS actually
a mistake.
And I know that English isn't Abigail's mother tongue, it's just that
I can't ever find any nits to pick in her code and sometimes she makes
me so dang mad, so I have to use the opportunities that are available
to me.
(Poor grammar is one thing up with which we must not put.)
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
Date: 22 Sep 2000 13:54:13 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Candidate for the top ten perl mistakes list
Message-Id: <slrn8smp1t.5fq.abigail@alexandra.foad.org>
Russ Jones (russ_jones@rac.ray.com) wrote on MMDLXXIX September MCMXCIII
in <URL:news:39CB5CBD.E5489CD1@rac.ray.com>:
`' Abigail wrote:
`' >
`' > However, in most cases, none of them are actually mistakes.
`' >
`'
`' Oh boy, another one. "However, in most cases none of them IS actually
`' a mistake.
*plonk*
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
------------------------------
Date: Fri, 22 Sep 2000 13:27:20 GMT
From: Carl Fox <carlfox@surplusnet.com>
Subject: delimiter problem
Message-Id: <39CB7B7B.18EC8B45@surplusnet.com>
Can anyone help me solve this flat DB problem?
I'm writing to a flat database file, (using delimiters) but each time
the inch symbol (double quotes) is entered into the description field,
and written to the flat database file, it is replaced by the delimiter.
Example: I write a description and put 12" (12 inches). Instead
of the " being entered, the delimiter is placed into the line.
How do I get the " placed in the line?
It's got to be something real simple I've overlooked, but I can't figure
it out.
Thanks.
------------------------------
Date: Fri, 22 Sep 2000 14:51:58 GMT
From: "Rob" <email@address.com>
Subject: Re: delimiter problem
Message-Id: <imKy5.2554$Z06.21845@news-server.bigpond.net.au>
\"
--
The email address should read - rob at cowsnet dot com
"Carl Fox" <carlfox@surplusnet.com> wrote in message
news:39CB7B7B.18EC8B45@surplusnet.com...
> Can anyone help me solve this flat DB problem?
>
> I'm writing to a flat database file, (using delimiters) but each time
> the inch symbol (double quotes) is entered into the description field,
> and written to the flat database file, it is replaced by the delimiter.
>
> Example: I write a description and put 12" (12 inches). Instead
> of the " being entered, the delimiter is placed into the line.
>
> How do I get the " placed in the line?
>
> It's got to be something real simple I've overlooked, but I can't figure
> it out.
>
> Thanks.
>
------------------------------
Date: Fri, 22 Sep 2000 15:18:10 +0000
From: kev <kevin.porter@fastsearch.com>
Subject: GDBM_File
Message-Id: <39CB7832.E8A65D2B@fastsearch.com>
Hi,
I need to use Perl's GDBM functions. I believe the module I want is
GDBM_File, but according to CPAN it should have been built into the
version of Perl I'm using (5.005_3). However, if I try and "use
GDBM_File" I get this error:
Can't locate GDBM_File.pm in @INC (@INC contains:
/usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at
./gdbmtest.pl line 4.
I can't find a standalone GDBM_File module on CPAN to install. Where
should I go from here?
thanks,
- Kev
--
http://www.fa-premier.com - English Premier League Football
------------------------------
Date: Fri, 22 Sep 2000 13:18:22 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: HELP: "$line =~ s|; \$\$\$TEXT|\$\$\$TEXT|;"
Message-Id: <39cf5b5f.48079743@news.newsguy.com>
Kourosh A Mojar <kmojar@bmjgroup.com> wrote:
>ive been trying hard to do some find and replace on the following
>expression (dollar signs are normal text):
>
>$line =~ s|; \$\$\$TEXT|\$\$\$TEXT|;
>
>could anyone help me with this problem, im sure there is a simple
>solution i have over looked.
If you want us to help, you'll have to tell us what the problem
is. The line you've presented is fine, if you want to get rid
of '; ' before the first occurrence of '$$$TEST' in $line. But
you haven't told us what you want it to do that it's not doing,
or what it's doing that you don't want it to do. And maybe the
problem is with other lines in your code.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: 22 Sep 2000 14:09:09 GMT
From: abigail@foad.org (Abigail)
Subject: Re: HELP: "$line =~ s|; \$\$\$TEXT|\$\$\$TEXT|;"
Message-Id: <slrn8smptt.5fq.abigail@alexandra.foad.org>
Kourosh A Mojar (kmojar@bmjgroup.com) wrote on MMDLXXIX September
MCMXCIII in <URL:news:39CB4301.B309E973@bmjgroup.com>:
//
// ive been trying hard to do some find and replace on the following
// expression (dollar signs are normal text):
//
// $line =~ s|; \$\$\$TEXT|\$\$\$TEXT|;
//
// could anyone help me with this problem, im sure there is a simple
// solution i have over looked.
What is the problem?
$_ = 'foo; $$$TEXT' . "\n";
print;
s|; \$\$\$TEXT|\$\$\$TEXT|;
print;
__END__
foo; $$$TEXT
foo$$$TEXT
Note that use of '|' as a delimiter isn't the smartest choice.
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,)))))))))))))))))))))))))
------------------------------
Date: Fri, 22 Sep 2000 13:31:09 GMT
From: bhanses@t-online.de (Bernd Hanses)
Subject: How to process bin file
Message-Id: <39cb5f1a.8043671@news.btx.dtag.de>
I want to process a file with binary data under Win98.
The file is the netscape.hst file and contains all URL-adresses visited in
a certain timeframe. I want to extract the URL-names into an ACSII file for
further processing via normal text editors.
I can extract the URL's so far, but each lines contains at the end various
binary data which gives me hard problems.
Can someone tell me a simple and fast method to get rid of this data?
The unwanted data is always at the end of the extracted string.
I have tried to translate all character lower than space to a not used value,
but this is to timeconsuming in this case.
Thanks, Bernd
------------------------------
Date: 22 Sep 2000 14:06:06 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Is possible to control a page feet ?
Message-Id: <slrn8smpo6.5fq.abigail@alexandra.foad.org>
Bea (Bea@ci.ub.es) wrote on MMDLXXIX September MCMXCIII in
<URL:news:39CB40FD.8AC911F8@ci.ub.es>:
;; Hi all;
;; Does anybody know how to force a page feet onto the printer from an html
;; page when printing from the browser ? Any html tag, javascript code ,
;; wonderful perl program would be ok ??
And what's your Perl issue?
Perhaps you might want to find an HTML group where they can tell you
why such thing isn't available in HTML (although you probably get 53
morons offering you a non-working kludge, 154 lusers saying "try this",
and 4,284 idiots complaining that the W3C never put such a thing in
`the standard').
Abigail
--
map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;
print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";
------------------------------
Date: Fri, 22 Sep 2000 13:25:22 GMT
From: mufy@my-deja.com
Subject: Re: Life of a perl script
Message-Id: <8qfmja$pe5$1@nnrp1.deja.com>
Thanks for the response.
> You say you don't have cron, but have you asked? Cron really is the
best
> way to do this. If they do not give you cron access, you could use the
> standard at command; have the script reschedule itself for the next
day.
I asked but They did not provide cron access.
I host my site on a free host and do not have access to system calls
> # perldoc -f sleep
>
> This is the age of the self-answering questions. We've been getting
I do not have telnet access to the server nor own a server myself :-(
so how to perldoc -f sleep ?
Know of Any links on the web where perl api is documented ?
> all pretty unreliable. If a machine reboots or an admin script shoots
> your jobs or something else goes wrong, your daily job is gone. Much
> better to reply on system tools.
Yes. I tried sleep ($no_secs) in a recursive loop, and then I had no
way to stop the process. Other scripts at my site started returning
with process overlimit !
Any other sugestion would be useful.
Thanks.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 22 Sep 2000 14:39:09 GMT
From: "David Sisk" <davesisk@ipass.net>
Subject: Newbie CGI question: LWP not installed module, can I simply upload it to my subdirectory?
Message-Id: <haKy5.2889$PW4.1840521@typhoon.southeast.rr.com>
My ISP supports Perl/CGI scripts, but doesn't have the LWP module installed.
They said there's some security problem with it (anyone know any details
about this?).
Anyway, I was wondering if I could just upload the LWP module (which I'd
assume is just a .pm file) into a subdirectory under the one containing my
perl script, and change the USE statement to point to the LWP module I
uploaded, will this work, or no?
Please post or email!
Regards,
Dave
------------------------------
Date: Fri, 22 Sep 2000 12:55:19 GMT
From: Bill Sampler <bsamp@my-deja.com>
Subject: Newbie Perl/CGI Question
Message-Id: <8qfkre$nat$1@nnrp1.deja.com>
I have just started learning Perl/CGI but I have been an Informix 4GL
programmer for 8 years. I have looked at a tutorial ( a not so complete
one) on how to have a HTML form with a submit button on it that
executes a script called simple-form.cgi which is written in Perl. I
can get the form to display in the browser, but when I fill in the form
(First name, last name, etc) and click the submit button, the text of
the file simple-form.cgi appears in the browser instead of executing
the script. I have a Pentium 200 PC / Windows 98. I have created a
folder under C:\ called cgi-bin as the tutorial said that the scripts
would have to reside there. There must be some steps I'm missing. Any
help would be greatly appreciated.
Thanx,
Bill Sampler
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 22 Sep 2000 13:40:35 GMT
From: Carl Fox <carlfox@surplusnet.com>
Subject: Re: Newbie Perl/CGI Question
Message-Id: <39CB7E94.2A52F63C@surplusnet.com>
Hi,
I think you need a Unix server or some other server that will run perl.
The perl interpretor (perl program) must reside in it's own directory, and
you must place that path in the shebang line of your code (always the
first line of your perl program).
I'm not a pro at perl either, but that's my experience. Check my advice
out with another source, and I think you will find I am close to your
answer, if I haven't actually answered your question.
The point is, you must have an HTML server sending your browser the HTML
code as instructed to do by your perl script. Certainly, you can get the
perl script to run by just going to the location of your perl interpeter
and typing the name of the perl script, or by putting a path to the perl
interpeter in the autoexec.bat file and then typing the name of the perl
script script. It's another matter to have a server serve to your browser
the HTML code your perl script prints out to the browser.
*********************
Bill Sampler wrote:
> I have just started learning Perl/CGI but I have been an Informix 4GL
> programmer for 8 years. I have looked at a tutorial ( a not so complete
> one) on how to have a HTML form with a submit button on it that
> executes a script called simple-form.cgi which is written in Perl. I
> can get the form to display in the browser, but when I fill in the form
> (First name, last name, etc) and click the submit button, the text of
> the file simple-form.cgi appears in the browser instead of executing
> the script. I have a Pentium 200 PC / Windows 98. I have created a
> folder under C:\ called cgi-bin as the tutorial said that the scripts
> would have to reside there. There must be some steps I'm missing. Any
> help would be greatly appreciated.
>
> Thanx,
> Bill Sampler
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Fri, 22 Sep 2000 13:48:50 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: Newbie Perl/CGI Question
Message-Id: <8qfnvq$r1u$1@nnrp1.deja.com>
In article <8qfkre$nat$1@nnrp1.deja.com>,
Bill Sampler <bsamp@my-deja.com> wrote:
> I have just started learning Perl/CGI but I have been an Informix 4GL
> programmer for 8 years. I have looked at a tutorial ( a not so
> complete one) on how to have a HTML form with a submit button on it
> that executes a script called simple-form.cgi which is written in
> Perl. I can get the form to display in the browser, but when I fill
> in the form (First name, last name, etc) and click the submit button,
> the text of the file simple-form.cgi appears in the browser instead
> of executing the script. I have a Pentium 200 PC / Windows 98. I have
> created a folder under C:\ called cgi-bin as the tutorial said that
> the scripts would have to reside there. There must be some steps I'm
> missing. Any help would be greatly appreciated.
>
could be a configuration problem with the Web Server you are running.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 22 Sep 2000 14:06:41 GMT
From: slipper@canada.com (Bob M)
Subject: PERL and GPS
Message-Id: <RHJy5.6403$gi1.125305@news.magma.ca>
Are there any available PERL scripts or modules to facilitate uploading and
downloading data from GPSs? (I couldn’t find anything on CPAN).
Thanks
Bob
------------------------------
Date: Fri, 22 Sep 2000 10:44:53 -0400
From: "Jay Flaherty" <fty@mediapulse.com>
Subject: Re: perl/dbi/mysql problem
Message-Id: <8qfrd0$osr$1@news3.icx.net>
You are not checking for error messages. They will tell you why it fails.
Read the documentation on DBI. Look for the $dbh->errstr error function and
use it.
Jay
"Trevor Ward" <tward10@jaguar.com> wrote in message
news:8qevrr$4nk7@eccws12.dearborn.ford.com...
>
> <jnk@kenobiz.com> wrote in message
> news:39cb7669.67788508@news.acronet.net...
> > #!/usr/local/bin/perl
> >
> > use DBI;
> >
> > $dbh = DBI->connect("DBI:mysql:db_kenobiz_com", 'kenobiz_com', '***');
> > $dbh->do("CREATE TABLE testing (user VARCHAR(15), pass VARCHAR(10))");
> > $dbh->do("INSERT INTO testing VALUES ('misener', '78dh9as4')");
> > $dbh->disconnect;
> >
> > this code succesfully creates the table 'testing' but, it does not
> > INSERT any data at all, i cant figure this out at all, thanks for any
> > help you can offer
>
> The basic create statement will work to make the table but using standard
> sql the insert statement is invalid.
>
> INSERT into testing (user, pass) VALUES ('misener', '78dh9as4');
>
> need to specify the fields as well.
>
> Hope this helps
>
>
------------------------------
Date: Fri, 22 Sep 2000 14:24:40 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Portability of Perl/Tk programs?
Message-Id: <IYJy5.6404$hD4.1111861@news1.rdc1.mi.home.com>
[Posted and mailed]
In article <slrn8sl8bs.p6.tim@degree.ath.cx>,
tim@degree.ath.cx (Tim Hammerquist) writes:
> Clinton A. Pierce <clintp@geeksalad.org> wrote:
>> Tim Hammerquist wrote:
>> > Most 5.6
>> > success stories involved a custom build without fork(). Have they made
>> > progress in this?
>>
>> What are you expecting fork() to do that it's not? I know that you can
>> still trip up Win32 Perl if you've got forked "processes" and one blocks
>> on a resource that's precious to windows that the whole shebang can hang--
>> but that's a Windows problem, unrelated to fork...
>
> I'm not expecting it to do anything. I haven't even booted up my Win32
> partition for anything except Tomb Raider 4 in months. My impression
> came from the inordinate amount of "problem with fork" posts on
> ActiveState's Perl-Win32-* lists.
I'm on those lists and most of those problems are related to the
fact that you've now got a bunch of Win32 weenies trying to use
something that's completely out of their normal way of thinking.
The remainder is the kind of crap you'd see in Unix lists of the
same nature.
The fork() function works fine. Win32's just got a bunch of
programmers that need to be debugged. :)
--
Clinton A. Pierce Teach Yourself Perl in 24 Hours!
clintp@geeksalad.org for details see http://www.geeksalad.org
"If you rush a Miracle Man,
you get rotten Miracles." --Miracle Max, The Princess Bride
------------------------------
Date: 22 Sep 2000 13:57:33 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Pure perl encrypt/decryption?
Message-Id: <slrn8smp85.5fq.abigail@alexandra.foad.org>
Bart Lateur (bart.lateur@skynet.be) wrote on MMDLXXIX September MCMXCIII
in <URL:news:lp2mssom4j93rmhfcn7r6a1p23eh3t33ps@4ax.com>:
||
|| You still have to SUID that binary.
Not a problem if `su' is available.
Abigail
--
perl -wle'print"Êõóô áîïôèåò Ðåòì Èáãëåò"^"\x80"x24'
# Two beetles crawl in
# the branches of a birch. A
# carp darting. Two beetles.
------------------------------
Date: 22 Sep 2000 13:53:35 GMT
From: abigail@foad.org (Abigail)
Subject: Re: RecDescent bug?
Message-Id: <slrn8smp0n.5fq.abigail@alexandra.foad.org>
Omri Schwarz (ocschwar@mit.edu) wrote on MMDLXXIX September MCMXCIII in
<URL:news:39CAD096.5066F988@mit.edu>:
`'
`' The whole 1300 script is at
`' http://www.mit.edu/~ocschwar/recss.pl
Now, if you can work that down to a program of say 10 to 20 lines that
exhibits the bug, then people might want to look at it. I don't think
you find many people willing to download a 1300 line program to debug
it for you.
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");
------------------------------
Date: Fri, 22 Sep 2000 14:50:37 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Regex standards: ranges
Message-Id: <l3smss8rhip71pjssu0sv037lc3hlbs7g7@4ax.com>
Todd Gillespie wrote:
>I'm trying to write a regex that takes a user string with their bizarre
>concept of ranges: 'R1..8','R1-R8','R[1-8]',etc,etc (I might not be
>creative enough to think of more parser-breaking combos).
>
>Question: is there functionality in a CPAN module to tokenize something
>like this problem; or is there a written theory on what generally
>constitutes legal ranges?
I'd simply try to write a regex for each individual syntax you'd accept.
How hard can it be?
while(<DATA>) {
if(/^R(\d+)(?:-|\.\.)(\d+)$/
|| /^R(\d+)(?:-|\.\.)R(\d+)$/
|| /^R\[(\d+)(?:-|\.\.)(\d+)\]$/) {
print "Got a range: from $1 to $2\n";
} else {
print "I don't understand \"$_\"\n";
}
}
__DATA__
R1..8
R1-R8
R[1-8]
--
Bart.
------------------------------
Date: Fri, 22 Sep 2000 14:09:40 GMT
From: slipper@canada.com (Bob M)
Subject: serial port communication (windows)
Message-Id: <EKJy5.6408$gi1.125081@news.magma.ca>
Any hints on how to read and write (and set baud rates, etc) to a serial port
on a windows machine?
thanks
Bob
------------------------------
Date: 22 Sep 2000 14:01:44 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Setting all variables to null
Message-Id: <slrn8smpfv.5fq.abigail@alexandra.foad.org>
mike@mld.com (mike@mld.com) wrote on MMDLXXIX September MCMXCIII in
<URL:news:39cb8b54.93181122@news.webperception.com>:
:)
:) Is there a simple way to set all variables in an executing perl script
:) to null without actually listing them?
Yes, provided you do the following three things:
1) Put this on the top of your program:
#define my local
2) Use the -P option when invoking Perl.
3) reset 'a-zA-Z_'; # Whenever you want to set all variables to `null'.
You can omit 1) and 2) if you don't use lexical variables.
You also might consult the manual as to why this is not a good idea.
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
------------------------------
Date: Fri, 22 Sep 2000 15:45:32 +0100
From: "vertical.reality" <vertical.reality@ntlworld.com>
Subject: Very newbie!
Message-Id: <1cKy5.3056$6b2.52052@news6-win.server.ntlworld.com>
I have installed Active Perl onto my machine (win98)
Does this mean I can run the script locally to view the results without
uploading them and then viewing them ????? Probably a silly question!
Is it something to do with the first line in the script ......?
Cheers
Tom
------------------------------
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 4404
**************************************