[11480] in Perl-Users-Digest
Perl-Users Digest, Issue: 5080 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 7 12:07:19 1999
Date: Sun, 7 Mar 99 09:00:24 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 7 Mar 1999 Volume: 8 Number: 5080
Today's topics:
Re: append 3 huge log files <gellyfish@btinternet.com>
cgi and forms jaspo@my-dejanews.com
Re: cgi and forms <dtbaker@bus-prod.com>
Re: cgi and forms <Tony.Curtis+usenet@vcpc.univie.ac.at>
command line arguments <amwalker@gate.net>
FAQ 2.11: Perl Books <perlfaq-suggestions@perl.com>
FAQ 2.12: Perl in Magazines <perlfaq-suggestions@perl.com>
Re: Form to a text file... (Randal L. Schwartz)
I'm sooo close... <jimbo@cgocable.net>
Re: I'm sooo close... <jdf@pobox.com>
Re: I'm sooo close... <jamesht@idt.net>
Re: input from file or from buffer <jdf@pobox.com>
LWP: Passing variables to an ASP document <Dikheel@ResumeGuide.com>
Re: LWP: Passing variables to an ASP document <jamesht@idt.net>
mySQL Default Field Question <aschneid@cmp.com>
Re: Newbie can't use fetchrow_hashref with DBI - HELP! (Steve Grantz)
Re: NT scripting <jamesht@idt.net>
problem with CGI::append() on win95??? <dtbaker@bus-prod.com>
Re: problem with CGI::append() on win95??? <rick.delaney@home.com>
Re: problem with CGI::append() on win95??? <dtbaker@bus-prod.com>
Script Needed <ben@digitalsmiths.com>
Re: Script Security with Crontab (Doug O'Leary)
Serial Communications using Perl wrnelson@my-dejanews.com
Re: Sub calls: how can I do this? <bwarnock@gtemail.net>
Re: Sub calls: how can I do this? <gellyfish@btinternet.com>
Re: Sub calls: how can I do this? <rick.delaney@home.com>
Re: The truth about the Pentium III chip and ID --- **b <tbandrowsky@del.net>
Re: Windows NT registry access examples? <jamesht@idt.net>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 7 Mar 1999 13:44:03 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: append 3 huge log files
Message-Id: <7btvr3$h5$1@gellyfish.btinternet.com>
On 7 Mar 1999 07:18:26 GMT barryc@spots.ab.ca wrote:
> vnguyen2891@my-dejanews.com wrote:
> ~Hello guys,
>
> ~I got 3 huge log files which I want to append them all into one file ( put 3
> ~files into 1 file). Do you have any suggestion to do it? Please give me
> ~detailed suggestion.
>
> ~Thanks in advance
> ~Van Nguyen
>
> man join
>
Eh ?
NAME
join - join lines of two files on a common field
I dont think thats what the poster wanted ...
Perhaps
cat file1 file2 file3 >file4
Or if you just gotta do it in Perl :
perl -e'print while(<>);' file1 file2 file3 >file4
/J\
--
Jonathan Stowe <jns@btinternet.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: Sun, 07 Mar 1999 13:01:40 GMT
From: jaspo@my-dejanews.com
Subject: cgi and forms
Message-Id: <7bttbh$r9q$1@nnrp1.dejanews.com>
Hello,
I am using forms in html and a perl cgi script. however, on the web server,
when I hit submit, the cgi script code shows up in the browser window? any
ideas!!!
thanks
jas
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 07 Mar 1999 08:03:13 -0600
From: Dan Baker <dtbaker@bus-prod.com>
Subject: Re: cgi and forms
Message-Id: <36E28721.819D9DA8@bus-prod.com>
jaspo@my-dejanews.com wrote:
>
> Hello,
>
> I am using forms in html and a perl cgi script. however, on the web server,
> when I hit submit, the cgi script code shows up in the browser window? any
> ideas!!!
-----------
I would guess that you didnt start your output with a valid header like:
print "Content-type: text/html\n\n";
Dan
# If you would like to reply-to directly, remove the - from my username
* no spam please... regulated by US Code Title 47, Sec.227(a)(2)(B) *
------------------------------
Date: 07 Mar 1999 15:05:50 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: cgi and forms
Message-Id: <83d82ls8ch.fsf@vcpc.univie.ac.at>
Re: Re: cgi and forms, Dan <dtbaker@bus-prod.com>
said:
Dan> jaspo@my-dejanews.com wrote:
>> Hello,
>>
>> I am using forms in html and a perl cgi script.
>> however, on the web server, when I hit submit,
>> the cgi script code shows up in the browser
>> window? any ideas!!!
Dan> -----------
Dan> I would guess that you didnt start your output
Dan> with a valid header like: print "Content-type:
Dan> text/html\n\n";
Nope, it's exactly the opposite reason.
The original poster needs to take the question to a
newsgroup related to the server being used, because
that's where the problem is.
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien. | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Sun, 07 Mar 1999 11:03:13 -0500
From: Aaron Walker <amwalker@gate.net>
Subject: command line arguments
Message-Id: <36E2A341.2ADDC4D@gate.net>
how do you setup command line arguments in perl?
thanks for your help,
Aaron Walker
------------------------------
Date: 7 Mar 1999 06:12:19 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 2.11: Perl Books
Message-Id: <36e27b33@csnews>
(This excerpt from perlfaq2 - Obtaining and Learning about Perl
($Revision: 1.30 $, $Date: 1998/12/29 19:43:32 $)
part of the standard set of documentation included with every
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq2.html
if your negligent system adminstrator has been remiss in his duties.)
Perl Books
A number of books on Perl and/or CGI programming are available. A
few of these are good, some are ok, but many aren't worth your
money. Tom Christiansen maintains a list of these books, some
with extensive reviews, at
http://www.perl.com/perl/critiques/index.html.
The incontestably definitive reference book on Perl, written by
the creator of Perl, is now in its second edition:
Programming Perl (the "Camel Book"):
by Larry Wall, Tom Christiansen, and Randal Schwartz
ISBN 1-56592-149-6 (English)
ISBN 4-89052-384-7 (Japanese)
URL: http://www.oreilly.com/catalog/pperl2/
(French, German, Italian, and Hungarian translations also
available)
The companion volume to the Camel containing thousands of real-
world examples, mini-tutorials, and complete programs (first
premiering at the 1998 Perl Conference), is:
The Perl Cookbook (the "Ram Book"):
by Tom Christiansen and Nathan Torkington,
with Foreword by Larry Wall
ISBN: 1-56592-243-3
URL: http://perl.oreilly.com/cookbook/
If you're already a hard-core systems programmer, then the Camel
Book might suffice for you to learn Perl from. But if you're not,
check out:
Learning Perl (the "Llama Book"):
by Randal Schwartz and Tom Christiansen
with Foreword by Larry Wall
ISBN: 1-56592-284-0
URL: http://www.oreilly.com/catalog/lperl2/
Despite the picture at the URL above, the second edition of
"Llama Book" really has a blue cover, and is updated for the
5.004 release of Perl. Various foreign language editions are
available, including *Learning Perl on Win32 Systems* (the Gecko
Book).
If you're not an accidental programmer, but a more serious and
possibly even degreed computer scientist who doesn't need as much
hand-holding as we try to provide in the Llama or its defurred
cousin the Gecko, please check out the delightful book, *Perl:
The Programmer's Companion*, written by Nigel Chapman.
You can order O'Reilly books directly from O'Reilly & Associates,
1-800-998-9938. Local/overseas is 1-707-829-0515. If you can
locate an O'Reilly order form, you can also fax to 1-707-829-
0104. See http://www.ora.com/ on the Web.
What follows is a list of the books that the FAQ authors found
personally useful. Your mileage may (but, we hope, probably
won't) vary.
Recommended books on (or mostly on) Perl follow; those marked
with a star may be ordered from O'Reilly.
References
*Programming Perl
by Larry Wall, Tom Christiansen, and Randal L. Schwartz
*Perl 5 Desktop Reference
By Johan Vromans
Tutorials
*Learning Perl [2nd edition]
by Randal L. Schwartz and Tom Christiansen
with foreword by Larry Wall
*Learning Perl on Win32 Systems
by Randal L. Schwartz, Erik Olson, and Tom Christiansen,
with foreword by Larry Wall
Perl: The Programmer's Companion
by Nigel Chapman
Cross-Platform Perl
by Eric F. Johnson
MacPerl: Power and Ease
by Vicki Brown and Chris Nandor, foreword by Matthias Neeracher
Task-Oriented
*The Perl Cookbook
by Tom Christiansen and Nathan Torkington
with foreword by Larry Wall
Perl5 Interactive Course [2nd edition]
by Jon Orwant
*Advanced Perl Programming
by Sriram Srinivasan
Effective Perl Programming
by Joseph Hall
Special Topics
*Mastering Regular Expressions
by Jeffrey Friedl
How to Set up and Maintain a World Wide Web Site [2nd edition]
by Lincoln Stein
--
What about WRITING it first and rationalizing it afterwords? :-)
--Larry Wall in <8162@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: 7 Mar 1999 08:42:24 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 2.12: Perl in Magazines
Message-Id: <36e29e60@csnews>
(This excerpt from perlfaq2 - Obtaining and Learning about Perl
($Revision: 1.30 $, $Date: 1998/12/29 19:43:32 $)
part of the standard set of documentation included with every
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq2.html
if your negligent system adminstrator has been remiss in his duties.)
Perl in Magazines
The first and only periodical devoted to All Things Perl, *The
Perl Journal* contains tutorials, demonstrations, case studies,
announcements, contests, and much more. TPJ has columns on web
development, databases, Win32 Perl, graphical programming,
regular expressions, and networking, and sponsors the Obfuscated
Perl Contest. It is published quarterly under the gentle hand of
its editor, Jon Orwant. See http://www.tpj.com/ or send mail to
subscriptions@tpj.com .
Beyond this, magazines that frequently carry high-quality
articles on Perl are *Web Techniques* (see
http://www.webtechniques.com/), *Performance Computing*
(http://www.performance-computing.com/), and Usenix's
newsletter/magazine to its members, *login:*, at
http://www.usenix.org/. Randal's Web Technique's columns are
available on the web at
http://www.stonehenge.com/merlyn/WebTechniques/.
--
X-Windows: The Cutting Edge of Obsolescence.
--Jamie Zawinski
------------------------------
Date: 07 Mar 1999 08:50:36 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Form to a text file...
Message-Id: <m1bti5dz1f.fsf@halfdome.holdit.com>
>>>>> "Thomas" == Thomas Leuthard <Leuthard@WebShuttle.ch> writes:
Thomas> I'm looking for a CGI-Script that make a textfile out of a
Thomas> HTML Form. This is because the server uses SSL and I cannot
Thomas> send this encrypted by E-Mail. So I write this file to the
Thomas> server and get it over a SSL secured connection.
Thomas> Where can I find such a Form to Text script?
The most direct way is to save the CGI object to a flat file using the
$query->save method. The data is encoded in a fairly straightforward
manner, which can be shipped using printable 7-bit characters to a
remote location, and restored using CGI.pm just to read the data.
That way, the program at the other end can say "param" all it wants.
There's an example on the current CGI.pm docs:
SAVING THE STATE OF THE SCRIPT TO A FILE:
$query->save(FILEHANDLE)
This will write the current state of the form to the
provided filehandle. You can read it back in by providing
a filehandle to the new() method. Note that the
filehandle can be a file, a pipe, or whatever!
The format of the saved file is:
NAME1=VALUE1
NAME1=VALUE1'
NAME2=VALUE2
NAME3=VALUE3
=
Both name and value are URL escaped. Multi-valued CGI
parameters are represented as repeated names. A session
record is delimited by a single = symbol. You can write
out multiple records and read them back in with several
calls to new. You can do this across several sessions by
opening the file in append mode, allowing you to create
primitive guest books, or to keep a history of users'
queries. Here's a short example of creating multiple
session records:
use CGI;
open (OUT,">>test.out") || die;
$records = 5;
foreach (0..$records) {
my $q = new CGI;
$q->param(-name=>'counter',-value=>$_);
$q->save(OUT);
}
close OUT;
# reopen for reading
open (IN,"test.out") || die;
while (!eof(IN)) {
my $q = new CGI(IN);
print $q->param('counter'),"\n";
}
The file format used for save/restore is identical to that
used by the Whitehead Genome Center's data exchange format
"Boulderio", and can be manipulated and even databased
using Boulderio utilities. See
http://stein.cshl.org/boulder/
for further details.
See... the code is already written for you! I'm using this structure
for a chat playground linked from my homepage.
use CGI qw(-no_debug); my $q = CGI->new({"japh", "Just another Perl hacker,"}); print $q->param("japh");
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Sun, 07 Mar 1999 10:21:31 -0500
From: "Jim Fitzsimmons" <jimbo@cgocable.net>
Subject: I'm sooo close...
Message-Id: <36e29980.0@news.cgocable.net>
I'm hoping a kind Perl guru will bail me out here...I'm so close
I have a script that reads a text file,(a pricelist) sorts the data, and
prints out the prices - lowest-highest.
it works great.
the trouble is, it prints *every* price, and in this case, I'd like to print
out just the lowest price, and forget the rest.
#!/usr/local/bin/perl5
require "cgi-lib.pl";
print &PrintHeader;
open(SIMM1,"1400.txt");
@vendors = <SIMM1>;
close(SIMM1);
$field = 3;
@vendors = map { $_->[1] }
sort { $a->[0] <=> $b->[0] }
map { [ (split "\t", $_)[$field], $_ ] } @vendors;
foreach $i (@vendors) {
chop($i);
($vendor,$price1,$price2,$price3,$price4,$price5,$highlights,$sorthighlights
,$url) = split(/\t/,$i);
print $price3
}
--------
sample data:
-----------
Other World
Computing 69.00 85.00 99.00 on on http://www.ramseeker.com/cgi-bin/ax.cgi?
http://www.macsales.com/
Pacific
Mac 54.39 82.14 123.21 http://www.ramseeker.com/cgi-bin/ax.cgi?http://ww
w.pacificmac.com
RAMJET 42.00 54.00 72.00 113.00 144.00 on on http://www.ramseeker.com/cgi-bi
n/ax.cgi?http://www.ramjet.com
SA
Technologies 55.00 89.00 129.00 169.00 http://www.ramseeker.com/cgi-bin/a
x.cgi?http://www.satech.com
Small Dog
Electronics 69.00 79.00 http://www.ramseeker.com/cgi-bin/ax.cgi?http://
www.smalldog.com/
Tahoe
Peripherals 69.00 97.00 135.00 189.00 http://www.ramseeker.com/cgi-bin/ax
.cgi?http://www.tahoeperipherals.com
TechWorks 75.00 119.00 http://www.ramseeker.com/cgi-bin/ax.cgi?http://w
ww.techworks.com
the Chip
Merchant 45.00 65.00 88.00 http://www.ramseeker.com/cgi-bin/ax.cgi?http:
//www.thechipmerchant.com/
Trans
Intl 199.00 http://www.ramseeker.com/cgi-bin/ax.cgi?http://www.transin
tl.com/indexnofl.html
I've been thru my books, and online - nothing works that I could find.
(or understand, anyway)
Thanks
Jim
--
Jim Fitzsimmons, Webmaster - RAMSeeker.
http://www.ramseeker.com | jim@ramseeker.com
------------------------------
Date: 07 Mar 1999 11:17:56 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: "Jim Fitzsimmons" <jimbo@cgocable.net>
Subject: Re: I'm sooo close...
Message-Id: <m3hfrxxoi3.fsf@joshua.panix.com>
"Jim Fitzsimmons" <jimbo@cgocable.net> writes:
> open(SIMM1,"1400.txt");
You do not check the results of open(), and--though it's unrelated to
the problems you're having--you're asking for trouble.
> @vendors = <SIMM1>;
Why not chomp here?
chomp(@vendors = <SIMM1>);
> map { [ (split "\t", $_)[$field], $_ ] } @vendors;
There aren't any tabs in your sample data. Perhaps you should just
split on whitespace.
map {[ (split)[$field], $_ ]}
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Sun, 07 Mar 1999 10:28:59 -0500
From: jamesht <jamesht@idt.net>
To: Jim Fitzsimmons <jimbo@cgocable.net>
Subject: Re: I'm sooo close...
Message-Id: <36E29B3B.9C94647E@idt.net>
Hello,
Getting rid of the foreach loop, and putting in its place:
print (split(/\t/,$vendors[0]))[3];
should work.
hth,
James
> foreach $i (@vendors) {
> chop($i);
>
> ($vendor,$price1,$price2,$price3,$price4,$price5,$highlights,$sorthighlights
> ,$url) = split(/\t/,$i);
>
> print $price3
> }
>
------------------------------
Date: 07 Mar 1999 11:08:36 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: input from file or from buffer
Message-Id: <m3iucdxoxn.fsf@joshua.panix.com>
Daniel Grisinger <dgris@moiraine.dimensional.com> writes:
> bart.lateur@skynet.be (Bart Lateur) writes:
> > The explanation in perltie looks intimidating. The phrase " This is
> > partially implemented now" doesn't promise much good.
>
> I've yet to run into problems with tied filehandles (that doesn't
> mean that they don't exist, but I haven't had any trouble :-).
IMHO, "partially implemented" does not mean "non-robust"; it means
"lacking features".
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Sun, 07 Mar 1999 09:38:18 -0500
From: Dikheel Al-Dikheel <Dikheel@ResumeGuide.com>
Subject: LWP: Passing variables to an ASP document
Message-Id: <36E28F59.D465558@ResumeGuide.com>
Does any know how form variables can be passed to a .asp document using
the URL which is fed into LWP's get method?
Every time I submit the form "URL with the form variables" the same
page reloads with no changes what so ever. Could it be a .asp related
matter, or am I doing something wrong with my get rquest.
Kindest Regards,
Dikheel
------------------------------
Date: Sun, 07 Mar 1999 10:34:04 -0500
From: jamesht <jamesht@idt.net>
To: Dikheel Al-Dikheel <Dikheel@ResumeGuide.com>
Subject: Re: LWP: Passing variables to an ASP document
Message-Id: <36E29C6C.E319C1D9@idt.net>
Hello,
To send 'GET' info - try adding the form info to the end of the url, like
so:
"http://www.cpan.org/path/script.cgi?name=value&name2=value2&etc=etc"
Everything after the '?' is form input.
If you've got to 'POST' the form info, try the documentation for the
HTML::Form and HTTP::Request::Form classes.
hth
James
------------------------------
Date: Sun, 07 Mar 1999 01:46:18 -0500
From: Alan Schneider <aschneid@cmp.com>
Subject: mySQL Default Field Question
Message-Id: <36E220BA.49E2@cmp.com>
Any idea how you can default the date field for today upon create table
or alter table using mysql.
I tried the following:
dateadded date default sysdate()
only to get an error?
Alan Schneider
aschneid@cmp.com
------------------------------
Date: Sun, 07 Mar 1999 16:39:58 GMT
From: sgrantz@visi.com (Steve Grantz)
Subject: Re: Newbie can't use fetchrow_hashref with DBI - HELP!
Message-Id: <yZxE2.136$to3.9580@ptah.visi.com>
Jamie (Jamie@worldweb.demon.co.uk) wrote:
: I hope someone can help me! I'm new to Perl, this being my first
: attempt at writing
: My problem is that when running this script, I get an error:
:
: Can't locate object method "fetchrow_hashref" via package "DBI::db" at
: if ($stHandle) {
: $stHandle->execute; #($first, $last);
:
: while($dbHandle->fetchrow_hashref){
This is because the fetchrow methods belong to the Statement Handle
class, not the Database Handle class.
Hope this helps,
Steve
--
More of Steve Grantz's Blather at 2 * McQ != McQ
http://www.visi.com/~sgrantz 0.5 * McQ == McQ
------------------------------
Date: Sun, 07 Mar 1999 10:48:25 -0500
From: jamesht <jamesht@idt.net>
To: "Sander Kruese <S.Kruese" <":nospam:>"@wxs.nl>
Subject: Re: NT scripting
Message-Id: <36E29FC8.217C63A9@idt.net>
Hello,
Win32::Service at www.cpan.org
James
------------------------------
Date: Sun, 07 Mar 1999 08:06:53 -0600
From: Dan Baker <dtbaker@bus-prod.com>
Subject: problem with CGI::append() on win95???
Message-Id: <36E287FD.38C1F581@bus-prod.com>
I am having trouble using the append() call to add some values to an
existing CGI object parameter... I am having compile errors, so I must
have
missed something in the docs, or is there a known bug???
I am running standard perl5 on win95. Please post if you can spot whats
wrong....
Here is my little test program:
-----
#! /usr/bin/perl -w
use CGI qw(append param);
my @VarValues = ();
my $Value ="";
# print header
print "Content-type: text/plain\n\n";
print "CGI VarName:\n";
# set
param(-name=>'VarName',-value=>'an initial value');
append(-name=>;'VarName',-values=>['word1','word2','word3']) ;
# get
@VarValues = param('VarName');
# print
foreach $Value (@VarValues ) {print "$Value\n"}
# ------- end of test file -------
And here is the error I get:
-----
syntax error at C:\XITAMI\webpages\mgrhs\cgi-bin\testAppend.pl line 13,
near "=>;"
Ambiguous use of values => resolved to "values" => at
C:\XITAMI\webpages\mgrhs\cgi-bin\testAppend.pl line 13.
syntax error at C:\XITAMI\webpages\mgrhs\cgi-bin\testAppend.pl line 13,
near "]) "
Execution of C:\XITAMI\webpages\mgrhs\cgi-bin\testAppend.pl aborted due
to compilation errors.
--
Thanx, Dan
# If you would like to reply-to directly, remove the - from my username
* no spam please... regulated by US Code Title 47, Sec.227(a)(2)(B) *
------------------------------
Date: Sun, 07 Mar 1999 14:51:20 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: problem with CGI::append() on win95???
Message-Id: <36E2944F.25123C2B@home.com>
Dan Baker wrote:
>
> I am running standard perl5 on win95. Please post if you can spot
> whats wrong....
Let's start at the first error.
> syntax error at C:\XITAMI\webpages\mgrhs\cgi-bin\testAppend.pl line 13,
> near "=>;"
I think you have a syntax error on line 13, near the characters "=>;".
"=>;" is an odd thing to have in a Perl statement. Let's look at the
line.
> append(-name=>;'VarName',-values=>['word1','word2','word3']) ;
Yes, something doesn't look right, especially compared to the preceding
line:
> param(-name=>'VarName',-value=>'an initial value');
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Sun, 07 Mar 1999 10:48:44 -0600
From: Dan Baker <dtbaker@bus-prod.com>
Subject: Re: problem with CGI::append() on win95???
Message-Id: <36E2ADEC.AEBB5916@bus-prod.com>
Rick Delaney wrote:
>
> Dan Baker wrote:
> >
> > I am running standard perl5 on win95. Please post if you can spot
> > whats wrong....
> > append(-name=>;'VarName',-values=>['word1','word2','word3']) ;
>
> Yes, something doesn't look right, especially compared to the preceding
> line:
--------------
well, I've tried it lots of different ways... this is how it is
documented. Do you have a syntax that works? I can't tell if the docs
are wrong, or there is a bug in the win95 port, or what...
here is the doc
file:///C|/usr/html/lib/CGI.html#SETTING_THE_VALUE_S_OF_A_NAMED_ in my
install of perl
APPENDING ADDITIONAL VALUES TO A NAMED PARAMETER:
$query->append(-name=>;'foo',-values=>['yet','more','values']);
This adds a value or list of values to the named parameter. The values
are appended to the end of the parameter if it already
exists. Otherwise the parameter is created. Note that this method only
recognizes the named argument calling syntax.
Dan
# If you would like to reply-to directly, remove the - from my username
* no spam please... regulated by US Code Title 47, Sec.227(a)(2)(B) *
------------------------------
Date: Sun, 07 Mar 1999 09:46:51 -0600
From: Ben Weinberger <ben@digitalsmiths.com>
Subject: Script Needed
Message-Id: <36E29F6B.9F024ED2@digitalsmiths.com>
Hi~
I am in search of a script that will allow users to log into my web site
and create a customized start page based on options they can choose.
For example, they could choose certain news services, links, etc. Can
anyone point me to a script or help me? I can be emailed at
starryi@siu.edu.
Thanks,
-Ben
------------------------------
Date: Sun, 7 Mar 1999 10:46:37 -0600
From: dkoleary@wwa.com (Doug O'Leary)
Subject: Re: Script Security with Crontab
Message-Id: <MPG.114c696567e1ece9989692@news.wwa.com>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <eAlk8JAY#GA.290@nih2naae.prod2.compuserve.com>,
mwatkins@promotion4free.com says...
> Hi there,
>
> I was just wondering, is there anyway in perl to tell if Crontab is running
> the script or not? So if Crontab isn't running the script, the script can
> give off an error.
>
The other follow ups are probably the right way to handle it; however, if
you really want to know, the parent process id of your script should be
"cron" if it's run via at or cron. You can hunt for that in the process
tree.
Doug
--
==============
Douglas K. O'Leary
Senior System Admin
dkoleary@wwa.com
doleary@ms.acxiom.com
==============
------------------------------
Date: Sun, 07 Mar 1999 15:55:59 GMT
From: wrnelson@my-dejanews.com
Subject: Serial Communications using Perl
Message-Id: <7bu7ib$319$1@nnrp1.dejanews.com>
I am just starting on a project that will use a computer to control
electrical devices. I am most familiar with Perl, so I'd like to use it if
possible. Also, I'd like to use an I80X86 running Linux if possible. Is
there a way to handle serial communication under perl? Where could I find
more information on this? Thanks!
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 07 Mar 1999 13:07:38 GMT
From: "Bryan C. Warnock" <bwarnock@gtemail.net>
Subject: Re: Sub calls: how can I do this?
Message-Id: <uSuE2.2623$573.1215@news.rdc1.md.home.com>
Rick Delaney wrote in message <36E20FB3.A74DFE9A@home.com>...
>[posted & mailed]
>
>Bryan C. Warnock wrote:
>>
>> @xxx = &{$ARGV[0]}("hello");
>>
>> However, I don't know a quick way to predetermine if the sub you call
>> actually exists.
>
> if ( defined &{$ARGV[0]} ) { }
>
Well, duh. What the he11 was I thinking?
Thanks, Rick.
>--
>Rick Delaney
>rick.delaney@home.com
------------------------------
Date: 7 Mar 1999 13:12:18 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Sub calls: how can I do this?
Message-Id: <7bttvi$dd$1@gellyfish.btinternet.com>
On Sun, 07 Mar 1999 05:25:18 GMT Rick Delaney wrote:
> [posted & mailed]
>
> Bryan C. Warnock wrote:
>>
>> @xxx = &{$ARGV[0]}("hello");
>>
>> However, I don't know a quick way to predetermine if the sub you call
>> actually exists.
>
> if ( defined &{$ARGV[0]} ) { }
>
Or an alternative for the paranoid
if ( ref($ARGV[0]) == 'CODE' )
{
...
}
/J\
--
Jonathan Stowe <jns@btinternet.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: Sun, 07 Mar 1999 14:39:46 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Sub calls: how can I do this?
Message-Id: <36E2919E.926CCB58@home.com>
Jonathan Stowe wrote:
>
> On Sun, 07 Mar 1999 05:25:18 GMT Rick Delaney wrote:
> >
> > if ( defined &{$ARGV[0]} ) { }
> >
>
> Or an alternative for the paranoid
>
> if ( ref($ARGV[0]) == 'CODE' )
^^
ITYM eq.
Also, this works for the hard ref case, not when using symbolic refs.
It would be pretty hard to pass a coderef as a command line argument.
This could be used instead of testing for the existance of the hash keys
that point to the corresponding coderefs, as Bryan suggested.
if ( ref( $hash{$ARGV[0]} ) eq 'CODE' ) {}
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Sun, 7 Mar 1999 10:46:12 -0500
From: "Todd Bandrowsky" <tbandrowsky@del.net>
Subject: Re: The truth about the Pentium III chip and ID --- **boycott info**
Message-Id: <36e29d41@news.deniz.com>
>
> I don't have a problem with using a unique id for each machine but I
>don't what it in the processor. if you have a problem like your powersupply
>fan dies and that causes your CPU to burn out all the software tied to
>that CPU has to get a new license. that would be a complete bitch.
Excellent. I had not thought about that.
>
> sun puts there ID in a NVRAM chip. should that chip fail you can
>re-program it's replacement with your old ID. bingo your software is
working
>again.
>
> companys that sell PC software have been ripped off right and left
>by people using illegal copies of software.
Agreed.
>in the unix world you could
>tie your software into a unique host id to prevent it being illegal copied
>but PC's have lacked this feature.
True.
>up till now you had to use an external
>device ( mostlikely on the printer port ) to make sure you were only using
>the software on one machine, at a time anyway. these hardware keys cost
>money and can cause problem with printing.
I go out of my way to not buy dongled software. It is a horrible thing.
>
> lastly sun doesn't have software in that sends back info on the
>machine and what's installed on it. microsoft has, in the past, sent
>out versions of the OS (beta 95) that sent info about your system
>back to microsoft, without telling the people with the beta that
>it was doing this. microsoft told the media, after someone discovered
>this, that it was only to help them solve problems with the beta.
>lots of people didn't beleave this.
I don't believe this per se, but I would not put it past MS. Actually, any
time you run an application that registers itself over a network of some
kind (dialup etc), you run the risk of that app connecting to the net and
sending stuff back. It is a huge problem. Actually, I would then argue
that having a secured way to send a unique CPUid back over a network, with a
canned version of things like name and address, etc, built into the OS,
would probably be better than having an app indiscriminately send stuff
back.
------------------------------
Date: Sun, 07 Mar 1999 11:06:30 -0500
From: jamesht <jamesht@idt.net>
To: Stan Brown <stanb@netcom.com>
Subject: Re: Windows NT registry access examples?
Message-Id: <36E2A406.6F414AC2@idt.net>
Hello,
I don't know where in the registry you can find the ip addr, but you should use
libwin32 from cpan to manipulate the registry.
hth
James
------------------------------
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 5080
**************************************