[18247] in Perl-Users-Digest
Perl-Users Digest, Issue: 415 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 4 21:05:47 2001
Date: Sun, 4 Mar 2001 18:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <983757908-v10-i415@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sun, 4 Mar 2001 Volume: 10 Number: 415
Today's topics:
Re: a beginner i perl- suiciadal <new_user@email.msn.com>
Re: checkbox problem <peter.sundstrom-eds@eds.com>
Re: Commenting problems <c_clarkson@hotmail.com>
Re: Dynamic naming of arrays or hashes (Mark Jason Dominus)
Re: FAQ 5.25: How can I read in a file by paragraphs? <johnlin@chttl.com.tw>
Re: handling arrows keys (Martien Verbruggen)
Re: How to stop executing <whataman@home.com>
Re: length op <mjcarman@home.com>
LOCALE Problem. Please HELP ME!!! <niski@niski.com>
Newbie Database Help ?? <acline@okstateerasecaps.edu>
Newbie: sysread() waiting indefinitely <dhbayne@xtra.co.nz>
Re: Newbie: sysread() waiting indefinitely <dhbayne@xtra.co.nz>
Re: perl-ize and optimize <bart.lateur@skynet.be>
Re: perl-ize and optimize <krahnj@acm.org>
Some Help With Arrays <blnukem@hotmail.com>
Re: Some Help With Arrays <chrisw@dynamite.com.au>
Re: sorting & matching problem (Chris Fedde)
Re: Submitting Forms from Code <comdog@panix.com>
Re: Submitting Forms from Code <comdog@panix.com>
Re: Submitting Forms from Code (Martien Verbruggen)
Re: truncate (Alan Barclay)
wierd syntax/end of file error <cj@nvisiongr.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 05 Mar 2001 00:41:16 GMT
From: "q" <new_user@email.msn.com>
Subject: Re: a beginner i perl- suiciadal
Message-Id: <MgBo6.3807$u04.909881@dfiatx1-snr1.gtei.net>
For starts look at your hash assignment where you intend to make the
assignment of the scalar $number but really assign the literal '$number'
------------------------------
Date: Mon, 5 Mar 2001 11:28:51 +1300
From: "Peter Sundstrom" <peter.sundstrom-eds@eds.com>
Subject: Re: checkbox problem
Message-Id: <97ufjl$fn3$1@hermes.nz.eds.com>
"Alan Hood" <gi59@dial.pipex.com> wrote in message
news:97r50i$p85$1@lure.pipex.net...
> I seem to have a problem passing a check box value to a CGI script.
>
> If the box is NOT checked then the script returns an error.
>
> If it is all seems OK.
>
> Can anybody help?
You have an error on line 19.
------------------------------
Date: Sun, 4 Mar 2001 15:59:28 -0600
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: Commenting problems
Message-Id: <6C80882673741826.A50EA73D629D29B0.159339C57FF04419@lp.airnews.net>
deborah.knight1 <debbie.knight@ntlworld.com> wrote
: Hello,
:
: I've edited a cgi scrpit using notepad, wordpad and ultraedit, using both
: the # and /*..*/ for comments but none work, with the comments showing
: up in both netscape and IE from home and my server.
:
You posted this exact same message about a week ago with a subject:
'Perl comments ??'. Several knowledgable people answered you.
Nothing has changed since then. Perl still uses # to start a comment
and your script will still not display anything in a browser, because of
the errors.
Charles K. Clarkson
[SNIP - been there, done that]
------------------------------
Date: Sun, 04 Mar 2001 23:34:56 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Dynamic naming of arrays or hashes
Message-Id: <3aa2d120.2e6a$359@news.op.net>
In article <3aa1eb3c.2502189918@news.wildapache.net>,
OTR Comm <otrcomm***NO-SPAM***@wildapache**NO-SPAM***.net> wrote:
>I will use your approach so I can turn 'use strict' back on.
That is a little like saying you have decided to stop setting your
furniture on fire, because you want to be able to turn your smoke
alarms back on.
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: Mon, 5 Mar 2001 08:21:03 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: Re: FAQ 5.25: How can I read in a file by paragraphs?
Message-Id: <97um87$ags@netnews.hinet.net>
"PerlFAQ Server"
> Note that a blank line must have no blanks in it. Thus `"fred\n
> \nstuff\n\n"' is one paragraph, but `"fred\n\nstuff\n\n"' is two.
Wrapping like this would be better:
Note that a blank line must have no blanks in it. Thus `"fred\n \nstuff\n\n"'
is one paragraph, but `"fred\n\nstuff\n\n"' is two.
Also changing the order would be better:
Note that a blank line must have no blanks in it. Thus `"fred\n\nstuff\n\n"'
is two paragraph, but `"fred\n \nstuff\n\n"' is one.
John Lin
------------------------------
Date: Mon, 05 Mar 2001 01:37:05 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: handling arrows keys
Message-Id: <slrn9a5re1.nts.mgjv@verbruggen.comdyn.com.au>
On Sun, 04 Mar 2001 21:26:35 +0100,
Ardok <Ardok.f@voila.fr> wrote:
> Dans l'article <slrn9a301u.300.mgjv@martien.heliotrope.home>, "Martien
> Verbruggen" <mgjv@tradingpost.com.au> a écrit :
>
>> The Term::ReadKey module can probably help here. If you also use the
>> Term::Size module, you may not even need to hardcode screen sizes. ave a
>> look at the various Term::* modules on CPAN
>
> Now I can use the "character" keys, without users need
> to hit enter, but I don't know how to do the same with the
> arrows (which would be more pratical).
The Perl FAQ, section 5 has a question on this, as well as other ways
to get single characters:
How can I read a single character from a file? From the keyboard?
The problem is that arrow keys are generally not single characters, so
you may need to do some extra work. Maybe there are modules on CPAN
that help you with this, but I don't really know off-hand. Maybe
Term::Screen is what you are looking for. I would use search.cpan.org
to get a list of all the Term:: modules, and check their
documentation.
Martien
--
Martien Verbruggen |
Interactive Media Division | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Mon, 05 Mar 2001 00:39:50 GMT
From: "What A Man !" <whataman@home.com>
Subject: Re: How to stop executing
Message-Id: <3AA2E0CC.D113FB29@home.com>
Gwyn Judd wrote:
>
> I was shocked! How could BUCK NAKED1 <dennis100@webtv.net>
> say such a terrible thing:
> >I have some .txt files that are executing the .html within them on my
> >webhost. Is there a way to tell the server not to execute any .cgi
> >or.html files in a certain directory? I want them to print out as text,
> >regardless of the file extension.
>
> Wrong newsgroup. Ask somewhere with "CGI" and "server" in the title.
>
Oops! I really thought I posted this to the CGI group.
When I posted it, I noticed some new names and thought how
nice it was that some of the people from the clpm were now
posting in comp.infosystems.www.authoring.cgi. I just now
checked for a response and realized that I posted it in
the wrong group. My apologies. I will repost it in the
correct group.
Regards,
--Dennis
------------------------------
Date: Mon, 05 Mar 2001 00:07:10 GMT
From: Michael Carman <mjcarman@home.com>
Subject: Re: length op
Message-Id: <3AA2DA76.C7D992FF@home.com>
Eduard Grinvald wrote:
>
> Basically, I have to perform multiple manipulations with a set
> of strings (roughly 15 million of them). The exact nature of
> manipulations is unknown to my code, i just present the data in
> an organized fashion and execute whatever was passed to my module,
> using my data as arguments. The manipulations have to be done
> quickly and on the entire set, but they may also involve different
> parts of the set. so i need to keep everything in ram.
Okay, in that case you don't really need to know how big everything is.
> After preprocessing my data, i saw that 104megs of text, when
> parsed, where taking up 700megs of ram due to the overhead.
Zoiks! First, let me assure you that Perl is not so frivilous with
memory to use 600 MB of "overhead" when storing 100 MB of data. You've
got a bug in your algorithm somewhere. You're either leaking memory or
keeping multiple copies of everything.
perlfaq3 "How can I make my Perl program take less memory?" might be
helpful to you, but it doesn't address the good programming practices
that would help most people with this question. Hrm. Patching that just
went on my "to do" list.
A few quick & rough pointers:
1) Don't read an entire file into memory if you can process it line by
line. e.g.
while (<FILE>) {
# ...
}
instead of
@data = <FILE>;
foreach $line (@data) {
# ...
}
And if you *do* need the whole file in memory, read it directly into the
data stucture where it will be used; that way you don't have two copies
of it clogging up RAM.
2) Localize variables to the smallest possible scope. Don't make
anything global that doesn't have to be. Use my() prodigously. Memory
freed by variables that have gone out of scope can be reused by other
things instead of requiring additional allocations.
3) Pass arrays/hashes by reference, not by value.
4) For "big" data stores (i.e. ones that exceed available memory)
consider using one of the DB modules to store it on disc instead of in
RAM. This will incur a penalty in access time, but that's probably
better that causing your hard disk to thrash with massive swapping.
> I need to know which parts of my structure (a hash filled with
> arrays, pointers, scalars, etc) are so costly, to see where i
> can sacrifice creature comfort for memory efficiency.
Try to apply what I've listed above, and then see if you still have a
problem before cutting out functionality.
-mjc
------------------------------
Date: Sun, 04 Mar 2001 21:34:09 +0000
From: niski <niski@niski.com>
Subject: LOCALE Problem. Please HELP ME!!!
Message-Id: <3AA2B4D1.CE04A4F3@niski.com>
Hello. Whenever I try to run any perl script (at my shell) I got this
$ perl -v
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = "en_US",
LC_CTYPE = "ISO-8859-1",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
This is perl, v5.6.0 built for i386-linux
<SNIP>
Well, I try to follow the instructions in
http://www.perl.com/pub/doc/manual/html/pod/perllocale.html#LOCALE_PROBLEMS
But it did not helped so much.
Well, my /etc/sysconfig/i18n is =
LANGUAGE=en_US:en
LANG=en
LC_CTYPE=ISO-8859-1
LC_ALL=en_US
SYSFONT=lat1u-16
SYSTERM=linux
and running locale -a drops
C
POSIX
bokmal
bokmål
catalan
croatian
czech
danish
dansk
de
de@euro
de_AT
de_AT.iso885915
de_AT@euro
de_BE
de_BE.iso885915
de_BE@euro
de_CH
de_CH.iso885915
de_CH@euro
de_DE
de_DE.iso885915
de_DE@euro
de_LU
de_LU.iso885915
de_LU@euro
deutsch
dutch
eesti
en
en@euro
en_AU
en_BW
en_CA
en_DK
en_GB
en_GB.iso885915
en_GB@euro
en_IE
en_IE.iso885915
en_IE@euro
en_NZ
en_US
en_ZA
en_ZWfrench
galego
galician
german
greek
hebrew
hrvatski
hungarian
icelandic
iso8859
iso88591
italian
ja
ja_JP
ja_JP.ujis
japanese
japanese.euc
japanese.sjis
ko_KR
korean
korean.euc
lithuanian
nb_NO
norwegian
nynorsk
polish
portuguese
pt
pt@euro
pt_BR
pt_PT
pt_PT.iso885915
pt_PT@euro
romanian
russian
slovak
slovene
slovenian
spanish
swedish
thai
turkish
Well, please someone tell me what to do (step by step) pelase.
I using LinuxMandrake 7.2
Thanks
estonian
finnish
français
--
Niski:
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah lreP gnuoy rehtona tsuJ
";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f|ord
($p{$_})&6];$p{$_}=/
^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep
rand(2)if/\S/;print
------------------------------
Date: Sun, 04 Mar 2001 19:45:29 +0500
From: "Aaron Cline" <acline@okstateerasecaps.edu>
Subject: Newbie Database Help ??
Message-Id: <t8Co6.205$Rx.2552@news.onenet.net>
Hey all:
I have searched everywhere for a pretty good, fairly simple tutorial on
how to use Perl to manipulate a Postgre SQL Database. I have decided
that none exist. (If I'm wrong, please let me know.)
So, if anyone has knowledge of any code that could read (with some good
remarks) so that I could learn from it, I would appreciate it greatly.
Thanks for any responses.
Aaron Cline
------------------------------
Date: Mon, 05 Mar 2001 13:31:01 +1300
From: Duncan Bayne <dhbayne@xtra.co.nz>
Subject: Newbie: sysread() waiting indefinitely
Message-Id: <3AA2DE45.12A43856@xtra.co.nz>
Hi all,
I am writing a client using IO::Socket to read a number of lines from a
server. The server will not output any kind of terminator once it has
finished writing lines, nor will it close the socket. It will simply do
nothing, waiting for input itself.
My current code looks like this:
do
{
$line = sysread($remote, $line, 1024);
print $line;
}
while ( $number != 0 )
This works fine until the server stops outputting lines, then my routine
sits on "$number = <$remote>;" waiting for input, and doing nothing. I
think that what I need is to be able to specify some kind of timeout,
but I don't know how.
Thanks in advance for any advice.
--
Duncan Bayne
2000 Honda NSR150RR
-----------------------------------------------------------------------
EMail: dhbayne@xtra.co.nz Web: http://dhbayne.netfirms.com/
Kuro5hin: dangermouse Slashdot: dangermouse_nz (UID 315952)
Phone: 025 626 3023
-----------------------------------------------------------------------
To think contrary to one's area is heroism. But to speak against it is
madness.
-- Eugene Ionesco
-----------------------------------------------------------------------
------------------------------
Date: Mon, 05 Mar 2001 13:33:20 +1300
From: Duncan Bayne <dhbayne@xtra.co.nz>
Subject: Re: Newbie: sysread() waiting indefinitely
Message-Id: <3AA2DED0.2C484F5C@xtra.co.nz>
Ugh, sorry, make that:
>
> do
> {
> $number = sysread($remote, $line, 1024);
> print $line;
> }
> while ( $number != 0 )
--
Duncan Bayne
2000 Honda NSR150RR
-----------------------------------------------------------------------
EMail: dhbayne@xtra.co.nz Web: http://dhbayne.netfirms.com/
Kuro5hin: dangermouse Slashdot: dangermouse_nz (UID 315952)
Phone: 025 626 3023
-----------------------------------------------------------------------
To think contrary to one's area is heroism. But to speak against it is
madness.
-- Eugene Ionesco
-----------------------------------------------------------------------
------------------------------
Date: Sun, 04 Mar 2001 23:21:44 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: perl-ize and optimize
Message-Id: <f8j5atge74io0uhcumc2tkbuo36334nrr2@4ax.com>
Dave Brondsema wrote:
>Below is a sub that takes a string and "rotates" it a random amount only
>allowing the break to be at spaces.
> # rearrange
> $_ = substr($_, $rndloc, length($_) - $rndloc) ." ". substr($_, 0,
>$rndloc);
Note tha once you found a cutting point, there's no need for specifying
the length if you want everything on the right of it. This does the
same:
$_ = substr($_, $rndloc) ." ". substr($_, 0, $rndloc);
But, in a way, I agree with Gwyn Judd. You method of getting a random
position of a space is too complex. Besides, your chance of picking a
certain space increases with the length of the word before it, and that
doesn't seem right. It's 7 times more likely to cut right after
"example", then it is to cut right after "a".
Cut the string into words with split, pick a random position to rotate,
and rejoin the array into a string. That's the ticket.
--
Bart.
------------------------------
Date: Sun, 04 Mar 2001 23:16:59 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: perl-ize and optimize
Message-Id: <3AA2CE33.C2866293@acm.org>
Dave Brondsema wrote:
>
> Below is a sub that takes a string and "rotates" it a random amount only
> allowing the break to be at spaces.
>
> Example:
>
> This is an example sentence. => an example sentence. This is
>
> My question is how can I optimize this and make it more perlish?
>
> sub shuffle
> {
> $_ = $_[0];
>
> # pick a random location
> my $rndloc = int rand length $_;
>
> # move $rndloc to a space
> my $tmp = substr($_, $rndloc, length($_) - $rndloc);
> $tmp =~ / /g;
> if (pos($tmp))
> {
> $rndloc = $rndloc + pos($tmp);
> }else{
> $rndloc = 0;
> }
>
> # rearrange
> $_ = substr($_, $rndloc, length($_) - $rndloc) ." ". substr($_, 0,
> $rndloc);
>
> return $_;
> }
sub shuffle {
$_ = $_[0];
my @x = split;
splice( @x, @x, 0, splice( @x, 0, rand @x ) );
return join ' ', @x;
}
John
------------------------------
Date: Mon, 05 Mar 2001 00:33:05 GMT
From: "blnukem" <blnukem@hotmail.com>
Subject: Some Help With Arrays
Message-Id: <59Bo6.69864$Vj5.11951700@news02.optonline.net>
Hi All
I need some help with arrays, What I what to do is to open a file and print
The first 5 lines in the file and a link on the bottom to lines 6-10 11-15
and so on in intervals of 5's. I've spent all week looking threw 3 books and
the internet and cant seem to find any answer (or make it work). Here is my
code that prints out the first part. If someone could point me in the rite
direction or assist me it would be very much appreciated.
Print "Content-type: text/html\n\n";
Print "<html><body>";
open (FILE,"<list.dat");
@SUBLIST=<FILE>;
@LIST = @SUBSUBLIST [0..5];
close (FILE);
foreach $line (@LIST){
chomp($line);
Print "$line";
}
Print "</html></body>";
Exit;
------------------------------
Date: Mon, 5 Mar 2001 12:14:06 +1100
From: "Chris W" <chrisw@dynamite.com.au>
Subject: Re: Some Help With Arrays
Message-Id: <cNBo6.7$eY6.234540@news.interact.net.au>
"blnukem" <blnukem@hotmail.com> wrote in message
news:59Bo6.69864$Vj5.11951700@news02.optonline.net...
> Hi All
>
> I need some help with arrays,
You need help with getting this code to compile. Seems you used an editor
that decides what to capitalise on your behalf.
> Print "Content-type: text/html\n\n";
> Print "<html><body>";
>
> open (FILE,"<list.dat");
> @SUBLIST=<FILE>;
> @LIST = @SUBSUBLIST [0..5];
What is in the array @SUBSUBLIST ?
> close (FILE);
> foreach $line (@LIST){
> chomp($line);
> Print "$line";
> }
> Print "</html></body>";
> Exit;
You should get into the habit of using the -w flag to perl and the strict
pragma:
#!perl -w
use strict;
------------------------------
Date: Mon, 05 Mar 2001 01:21:03 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: sorting & matching problem
Message-Id: <3SBo6.356$T3.189152256@news.frii.net>
In article <3aa2a8b7.37391365@news.hal-pc.org>, Monte <montep@about.com> wrote:
>
>Problem:
>Given 6 distinct numeric data which describe an object.
>Make a best fit search and sort through a database consisting of ~400
>rows and eight columns (the extra columns contain the data that are
>the ultimate object of the search). Database can be anything from text
>to relational db or spreadsheet, it is not critical.
>
>example:
>input: 2.2 3 5 1.4 8 30.12
>
>dbfile:
>A Z 3 5.5 2 6. 1 7 31.20
>C F 7 4.7 3.3 6.1 1 32.00
>K D 5.1 2.1 1.3 5 5.2 30.91
>etc
>The object is to find the row which best fits all of the input
>criteria.
>
>I have approached this one way by filtering out all columns larger
>than each input column. This yields a partial, but not optimal.
>Usually winding up with one column optimized and others further
>removed. And several variations on that theme. It's those additional
>variations which are taxing my limited perl talents.
>
What do you mean by "best fit"? Do you mean closest point in
6-space? Unless I'm off the mark this involves a pair wise
computation of the distance between each point and the test point.
Maybe someone with more analytic geometry can point out an ordering
property that makes the algorithm better than a linear search.
#!/usr/bin/perl
use strict;
use warnings;
sub mag {
my $a = shift;
my $b = shift;
my $sum_sq = 0;
for my $i (0..$#{$a}){
$sum_sq += (${$a}[$i] - ${$b}[$i])*(${$a}[$i] - ${$b}[$i]);
}
return sqrt($sum_sq);
}
my @data = (
[qw(3 5.5 2.6 1 7 31.20)],
[qw(7 4.7 3.3 6.1 1 32.00)],
[qw(5.1 2.1 1.3 5 5.2 30.91)],
);
my $point = [qw(2.2 3 5 1.4 8 30.12)];
my $min_index = 0;
my $min = mag($point, $data[0]);
for my $i (1..$#data) {
my $m = mag($point, $data[$i]);
print "\$m = $m, \$min = $min, \$min_index = $min_index\n";
if ($m < $min) {
$min = $m;
$min_index = $i;
}
}
The computations can be made faster using PDL:
#!/usr/bin/perl
use strict;
use warnings;
use PDL;
sub mag {
my $a = shift;
my $b = shift;
my $sum_sq = 0;
return sqrt(sum(($a - $b)**2));
}
my @data = (
pdl(qw(3 5.5 2.6 1 7 31.20)),
pdl(qw(7 4.7 3.3 6.1 1 32.00)),
pdl(qw(5.1 2.1 1.3 5 5.2 30.91)),
);
my $point = pdl qw(2.2 3 5 1.4 8 30.12);
my $min_index = 0;
my $min = mag($point, $data[0]);
for my $i (1..$#data) {
my $m = mag($point, $data[$i]);
if ($m < $min) {
$min = $m;
$min_index = $i;
}
}
print "\$min_index = $min_index, \$min = $min, \$data[$min_index] = ",
$data[$min_index], "\n";
--
This space intentionally left blank
------------------------------
Date: Sun, 04 Mar 2001 18:37:25 -0500
From: brian d foy <comdog@panix.com>
Subject: Re: Submitting Forms from Code
Message-Id: <comdog-7C5A38.18372504032001@news.panix.com>
In article <mDlo6.2930$Ey1.209541@bgtnsc06-news.ops.worldnet.att.net>,
"Joe Moore" <joemoore@att.net> wrote:
> "brian d foy" <comdog@panix.com> wrote in message
> news:comdog-BD561F.17515215022001@news.panix.com...
> Thanks for adding to the confusion. Clearly the OP wants to insert the data
> into a web page and automatically submit it and you can't do that.
sure you can. you, apparently, just don't know how.
--
brian d foy <comdog@panix.com>
------------------------------
Date: Sun, 04 Mar 2001 18:39:11 -0500
From: brian d foy <comdog@panix.com>
Subject: Re: Submitting Forms from Code
Message-Id: <comdog-C7BE08.18391104032001@news.panix.com>
In article <slrn9a40mn.5vn.mgjv@martien.heliotrope.home>,
mgjv@tradingpost.com.au wrote:
> brian d foy's response was correct. He usually is about things in this
> area.
i think i need to expand my perceived "area". :)
--
brian d foy <comdog@panix.com>
------------------------------
Date: Mon, 05 Mar 2001 01:39:19 GMT
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Submitting Forms from Code
Message-Id: <slrn9a5ri7.nts.mgjv@verbruggen.comdyn.com.au>
On Sun, 04 Mar 2001 18:39:11 -0500,
brian d foy <comdog@panix.com> wrote:
> In article <slrn9a40mn.5vn.mgjv@martien.heliotrope.home>,
> mgjv@tradingpost.com.au wrote:
>
>> brian d foy's response was correct. He usually is about things in this
>> area.
>
> i think i need to expand my perceived "area". :)
I wasn't saying you weren't right in other areas of programming :)
Martien
--
Martien Verbruggen |
Interactive Media Division | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: 5 Mar 2001 00:03:05 GMT
From: gorilla@elaine.furryape.com (Alan Barclay)
Subject: Re: truncate
Message-Id: <983750584.148410@elaine.furryape.com>
In article <Pine.A41.4.20.0103041504060.98230-100000@unix1.cc.ysu.edu>,
NagaPutih <s0218327@unix1.cc.ysu.edu> wrote:
>On Sun, 4 Mar 2001, Bart Lateur wrote:
>> It seems like you can skip this whole issue, and truncate the file's
>> length to 0 before writing the string.
>
>your solution seems to work, but now i'm confused!
>truncating the file to a certain number of bytes
>doesn't work due to tainting problem, but how come
>truncating it to 0 works without any warnings/errors?
It's because you're trying to use a tainted value. When you truncate
to 0, then that value isn't tainted.
------------------------------
Date: Thu, 1 Mar 2001 11:47:49 -0500
From: Chris Jensen <cj@nvisiongr.com>
Subject: wierd syntax/end of file error
Message-Id: <3AA09231@MailAndNews.com>
i just started getting an error at the end of a script telling me i have a
syntax error and i'm missing a right bracket(?). here's the error log
entry:
Missing right bracket at /usr/local/etc/httpd/cgi-bin/psr_input.cgi line
141,
at end of line
syntax error at /usr/local/etc/httpd/cgi-bin/psr_input.cgi line 141, at EOF
Execution of /usr/local/etc/httpd/cgi-bin/psr_input.cgi aborted due to
compilation errors.
[Thu Mar 1 11:09:03 2001] access to
/usr/local/etc/httpd/cgi-bin/psr_input.cgi failed for 208.131.27.12, reason:
Premature end of script headers
here's line 141 of my script:
print "</body></html>";
it's the last line of the file. i've never gotten this error before, any
ideas?
BACKGROUND INFO: WebTen 3.0.3 webserver (apache 1.3 on mac, perl 5.005)
TIA!
chris
------------------------------
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 V10 Issue 415
**************************************