[12381] in Perl-Users-Digest
Perl-Users Digest, Issue: 5981 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 13 22:07:16 1999
Date: Sun, 13 Jun 99 19:00:18 -0700
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, 13 Jun 1999 Volume: 8 Number: 5981
Today's topics:
Re: CGI.pm and security <rootbeer@redcat.com>
DBD::msql <sgilbert@redcloud.org>
Re: Does Perl have a future? (Christian Ahkman)
doesn't work on-line <leonid76@erols.com>
Re: doesn't work on-line <rootbeer@redcat.com>
Re: Far shorter solution! <bradclawsie@my-deja.com>
Re: Far shorter solution! <bradclawsie@my-deja.com>
Re: Far shorter solution! (Eric Bohlman)
Fix this uglyness (Alan)
From Perl, Getting Dates from Sysbase. quanlay@my-deja.com
Re: GIFgraph output to web page <k.l.marlowe@larc.nasa.gov>
I need help making a search program <rjmarlatt@email.msn.com>
Re: I need help making a search program <rootbeer@redcat.com>
Re: Looking for general purpose perl search tool to sea (Eric Bohlman)
Re: MIcrosofts Attack on Perl (John Edstrom)
Most of the problem fixed, but having string manipulati <brutal@greenbaynet.com>
Re: Most of the problem fixed, but having string manipu <rootbeer@redcat.com>
Ooops, my bad <bradclawsie@my-deja.com>
Re: Ooops, my bad <rra@stanford.edu>
Re: Ooops, my bad <tchrist@mox.perl.com>
Re: PerlScript ... what features are missing? <rootbeer@redcat.com>
Re: simple perl question (Larry Rosler)
Using and searching multiple databases help needed <leslie_cox@bc.sympatico.ca>
Re: Verifying date data gsherman2773@my-deja.com
Re: why short of 1 month ?? (Bob Trieger)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 13 Jun 1999 16:25:47 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: CGI.pm and security
Message-Id: <Pine.GSO.4.02A.9906131619430.6999-100000@user2.teleport.com>
On Sun, 13 Jun 1999 jselen@my-deja.com wrote:
> I have read a lot about the need to pay attention for security of CGI
> scripts.
Good!
> For example it is adviced to delete certain characters when decoding
> the data received from the form on the web page.
That sounds like a (misleading?) paraphrasing of a good idea. It's better
to allow only characters you know are safe, rather than deleting ones you
think are unsafe.
> I am going to use CGI.pm and I would like to know if it is secure from
> this point of view.
Well, nothing is completely secure. Even good tools can be misused. But
the CGI module has been written and read with care, and it is being
actively maintained. In the unlikely case that a security-related bug is
found in the current version of the CGI module, it should be rapidly fixed
and publicly announced. So, if you keep your tools up-to-date, you're fine
in that respect.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sun, 13 Jun 1999 19:08:59 -0400
From: Steve Gilbert <sgilbert@redcloud.org>
Subject: DBD::msql
Message-Id: <37643A0B.8FE9426A@redcloud.org>
I'm trying to get DBD::msql installed and running on my web server, and
it's giving me a bit of a pain. A little background, I'm running Linux
2.0.29, and perl 5.005_02. MySQL seems to be working fine, I can run
mysql and create, modify, view tables etc. The compilation and
installation of DBD::msql also went without a hitch, however, whenever I
try to use it, I get:
install_driver(mysql) failed: Can't load
'/usr/lib/perl5/site_perl/5.005/i586-li
nux/auto/DBD/mysql/mysql.so' for module DBD::mysql: File not found at
/usr/lib/p
erl5/5.00502/i586-linux/DynaLoader.pm line 168.
at (eval 35) line 2
at /usr/local/sql-bench/server-cfg line 191
I have varified that mysql.so is available, and is readable by the
current user (in this case, root). Has anyone else had this problem?
- Steve
------------------------------
Date: Mon, 14 Jun 1999 01:24:05 GMT
From: tchristian7@yahoo.com (Christian Ahkman)
Subject: Re: Does Perl have a future?
Message-Id: <37645731.1947650@news.earthlink.net>
On Sun, 13 Jun 1999 13:57:59 -0700, TRG Software : Tim Greer
<webmaster@chatbase.com> wrote:
>Of course they do, they're promoting their product. Do you assume Ford
>is best if they say that Chevy will go out of business because of their
>competition?
>
No. I don't assume anything. Which is why I said "of course Sun
claims it's dead." I was asking if people are seeing a shift away
from perl for internet functionality on UNIX (to Java or something
else). I'm not an "advocate."
>
>Pretty much on top, in the Unix world anyway. I use ASP on occasion, as
>do I use ActiveX, and yes, even Java... But usually C or Perl. But my
>personal opinion (that many would probably agree with if they are in
>this NG), is that there's nothing Perl has to worry about.
Do you think the criticism of perl and other script-based solutions
for web applications is valid? Namely that the cost of perl/CGI is
too large (overhead of running a script for every request) compared to
servlets or COM objects that basically function as daemons?
Cheers,
Christian Ahkman
------------------------------
Date: Sun, 13 Jun 1999 21:16:36 -0400
From: "Leonid Goltser" <leonid76@erols.com>
Subject: doesn't work on-line
Message-Id: <7k1l41$88o$1@autumn.news.rcn.net>
I uploaded my perl script and when I try to access it, Explorer says
"you might not have permission to view this directory or page using the
credentials you supplied."
The script works perfectly on my PC, but Ie can't find it.
Is it possible my provider's server doesn't support perl?
Or it is another problem?
------------------------------
Date: Sun, 13 Jun 1999 18:46:47 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: doesn't work on-line
Message-Id: <Pine.GSO.4.02A.9906131846350.6999-100000@user2.teleport.com>
On Sun, 13 Jun 1999, Leonid Goltser wrote:
> The script works perfectly on my PC, but Ie can't find it.
When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.
http://www.perl.com/CPAN/
http://www.perl.org/CPAN/
http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
http://www.perl.org/CPAN/doc/manual/html/pod/
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sun, 13 Jun 1999 23:14:22 GMT
From: Brad Clawsie <bradclawsie@my-deja.com>
Subject: Re: Far shorter solution!
Message-Id: <7k1e09$a7b$1@nnrp1.deja.com>
> This naive solution is likely to be orders of magnitude slower
> than the quasi-"Schwartzian Transform" solution posted by
> Jonathan Stowe that you
> are comparing to.
Doesn't the Scahrtzian Transform work by caching? Each file is unique
(barring symlinks), so what are you caching?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 13 Jun 1999 23:35:58 GMT
From: Brad Clawsie <bradclawsie@my-deja.com>
Subject: Re: Far shorter solution!
Message-Id: <7k1f8u$ajh$1@nnrp1.deja.com>
> Doesn't the Scahrtzian Transform work by caching? Each file is unique
> (barring symlinks), so what are you caching?
I'm a dumbass. As soon as I posted this I saw the error in my logic.
Note that you can work a Schartzian Solution into my one-liner - an
example is given in "Effective Perl Programming" to do just this.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 14 Jun 1999 01:25:16 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Far shorter solution!
Message-Id: <ebohlmanFDAMM5.H79@netcom.com>
Brad Clawsie (bradclawsie@my-deja.com) wrote:
:
: > This naive solution is likely to be orders of magnitude slower
: > than the quasi-"Schwartzian Transform" solution posted by
: > Jonathan Stowe that you
: > are comparing to.
:
: Doesn't the Scahrtzian Transform work by caching? Each file is unique
: (barring symlinks), so what are you caching?
The Schwartzian transform works by doing computations once per item to be
sorted, not once for each pair of items being compared. Sorting requires
on average n*log2(n) comparisons, so sorting 1000 items using the ST
requires about 1000 computations, whereas sorting them with the
computations in the comparison routine requires about 10,000
computations. That difference gets non-trivial pretty quick. The number
of comparisons isn't much affected by the presence/absence of duplicates
in the data.
------------------------------
Date: 13 Jun 1999 23:46:33 GMT
From: alanp@unixpower.org (Alan)
Subject: Fix this uglyness
Message-Id: <slrn7m8gc5.vno.alanp@osiris.unixpower.org>
I haven't the time to do it myself, so could someone please fix the systeming
I used when I got tired:
system("cat /var/log/wtmp | uuencode wtmp.`date +%m-%d` | mail $WTMPBACK");
system("mkdir /var/wtmp 2> /dev/null");
system("mv /var/log/wtmp /var/wtmp/wtmp.`date +%m-%d`");
system("touch /var/log/wtmp");
I just need a good way of doing that.
--
| Alan L. * Webmaster of www.UnixPower.org |
| Windsor Unix Users Group Founder: http://unix.windsor.on.ca/ |
| Personal Page: http://www.unixpower.org/alanp/ |
------------------------------
Date: Sun, 13 Jun 1999 23:01:26 GMT
From: quanlay@my-deja.com
Subject: From Perl, Getting Dates from Sysbase.
Message-Id: <7k1d83$a13$1@nnrp1.deja.com>
I'm using sybperl to read table data from Sybase. However, when I get
data from a date field it seems to convert it.
In Sybase: 1998-12-09 08:13:43.936
Retrieved: Dec 9 1998 8:13:43:936AM
How do I stop this from converting or at least let me convert it back
to the original form when I'm writing it to another table.
Thanks for any help,
Quan Lay & Bill Jordan
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sun, 13 Jun 1999 21:39:55 -0400
From: "Kevin Marlowe" <k.l.marlowe@larc.nasa.gov>
Subject: Re: GIFgraph output to web page
Message-Id: <7k1mi9$po1$1@reznor.larc.nasa.gov>
Tom -
Thanks for the refs. I spent a good part of Saturday reading these and
anything else I could find, as well as trying some different things with the
scripts, to no avail. I think my confusion is a perl issue, not cgi, so I'll
keep it here rather than in cgi.authoring.misc. My GIFgraph script writes to
a file using the "plot_to_gif" function with no problems, either from the
command line or when called as a cgi. When I use the "plot" function with
the appropriate MIME header, I get a zero-byte image. Without the header, I
get a 500 error, no surprise. Unfortunately, the logs are nowhere to be
found; I'll work that out with my sysadmins on Monday.
Does anyone have an example of a GIFgraph plot that writes directly to
stdout in such a way that it is displayed in a browser after being called as
a cgi? Thanks - KLM
Tom Phoenix <rootbeer@redcat.com> wrote in message
news:Pine.GSO.4.02A.9906111706390.6999-100000@user2.teleport.com...
> On Fri, 11 Jun 1999, Kevin Marlowe wrote:
>
> > I'm trying to use GIFgraph to output directly to a web page (instead of
a
> > file) as a cgi, but keep getting a server error when executing the code.
>
> When you're having trouble with a CGI program in Perl, you should first
> look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
> such problems. It's available on CPAN.
>
> http://www.perl.com/CPAN/
> http://www.perl.org/CPAN/
> http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
> http://www.perl.org/CPAN/doc/manual/html/pod/
>
> Hope this helps!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
>
------------------------------
Date: Sun, 13 Jun 1999 16:29:05 -0700
From: "RJ Marlatt" <rjmarlatt@email.msn.com>
Subject: I need help making a search program
Message-Id: <edDm5Qft#GA.160@cpmsnbbsa05>
Hey I need to make a search program that will search a big log file for
multiple words and I don't know how
if you could help that would be great.
-Richard
Richard@Marlatt.com
------------------------------
Date: Sun, 13 Jun 1999 16:57:09 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: I need help making a search program
Message-Id: <Pine.GSO.4.02A.9906131656170.6999-100000@user2.teleport.com>
On Sun, 13 Jun 1999, RJ Marlatt wrote:
> Hey I need to make a search program that will search a big log file
> for multiple words and I don't know how
I recommend using Perl. You should probably start with some of the books
listed on the perlbook manpage, or a class from a good instructor. Good
luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Mon, 14 Jun 1999 01:33:28 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Looking for general purpose perl search tool to search CSV table
Message-Id: <ebohlmanFDAMzs.I5w@netcom.com>
Pamela Goldfarb (pamelag@interlog.com) wrote:
: I have a CSV file that contains a series of quoted words separted by commas.
:
: I am using the DBD:CSV perl modules to manipulate the db.
:
: I want to create a simple web search page that will accept a standard
: phrases such as:
:
: word1
: word1 and word2
: word1 or word2
: "word1 word2"
:
: etc.
:
: Does there exist perl code to parse the user inputted search phrase and then
: search a database?
Loic Dachary is working on a subclass of my Text::Query::Advanced module
that will be able to generate SQL queries from expressions like the
above. I'm not quite sure how close he is to final release, but I'd
expect it out within a week or two.
------------------------------
Date: 13 Jun 1999 23:01:26 GMT
From: edstrom@Poopsie.hmsc.orst.edu (John Edstrom)
Subject: Re: MIcrosofts Attack on Perl
Message-Id: <7k1d86$oo4$1@news.NERO.NET>
In article <Pine.GSO.4.02A.9906101744050.26349-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@redcat.com> writes:
> On Fri, 11 Jun 1999, jgrain wrote:
...
> measures for the time being. I'm taking my cue from Larry Wall, who thus
> far has neither hung lanterns in the bell-tower of his church nor ridden
What, he has a church now too? Will he never stop!
I guess well have to change the Perl Poetry to Perl Psalms.
...
> Cheers!
>
--
John Edstrom | edstrom @ slugo.hmsc.orst.edu
http://bubo.hmsc.orst.edu/~edstrom
------------------------------
Date: Sun, 13 Jun 1999 19:20:41 -0500
From: "Ben Mullen" <brutal@greenbaynet.com>
Subject: Most of the problem fixed, but having string manipulation problems
Message-Id: <7k1hus$15ld$1@news.inc.net>
First of all I'd like to thank Nicholas Marchalleck, David Cassell, Marcel
Grunauer, and Abigail on your responses. I got quite a bit working, and
have actual CGI output.
My current problem now is string manipulation. I'm still fairly new at Perl
(this is a crash course in learning perl, my previous experience was in
Applesoft Basic!!). Below is part of my code I'm having problems with:
#parse short description file
$defile = $index . $cartype . "SH.TXT";
open (filehandle, $defile);
@descstuff = $filehandle;
$description = $descstuff[0];
$mileage = $descstuff[1];
$price = $descstuff[2];
$damage = $descstuff[3];
I'm still in the dark on how to program this Basically I'm creating a new
string $defile from merging $index, $cartype and "SH.TXT" to create a file
name. In my example case 1299CSH.TXT. This is the file name to the data
file that contains the following:
92 CADILLAC ELDORADO
52,500
$9,800
REPAIRED
Basically this stuff is seperated by carrage returns, and is placed in the
array in this order
descstuff[0]=$description="92 CADILLAC ELDORADO"
descstuff[1]=$mileage="52,500"
descstuff[2]=$price="$9,800"
descstuff[3]=$damage="REPAIRED"
this stuff later gets inserted into the HTML document where I have placed
the following personal HTML tags:
<!--cgi:description-->
<!--cgi:mileage-->
<!--cgi:price-->
<!--cgi:damage-->
Any input on what I'm doing wrong, and how I really should be doing it?
------------------------------
Date: Sun, 13 Jun 1999 18:09:44 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Most of the problem fixed, but having string manipulation problems
Message-Id: <Pine.GSO.4.02A.9906131805420.6999-100000@user2.teleport.com>
On Sun, 13 Jun 1999, Ben Mullen wrote:
> Subject: Most of the problem fixed, but having string manipulation problems
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
> $defile = $index . $cartype . "SH.TXT";
If the value of either $index or $cartype is coming from a remote user,
you may have a serious security hole here which could "$defile" your
system. :-)
> open (filehandle, $defile);
Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
Also, filehandles should generally be named in all caps.
> @descstuff = $filehandle;
What is $filehandle? It's not a filehandle, is it? I think you want to see
about I/O operators in the perlop manpage.
> this stuff later gets inserted into the HTML document where I have
> placed the following personal HTML tags:
So, you need to parse the HTML to work with it. You should be using
HTML::Parser, probably.
This task may not be a good choice for learning Perl. It may be good to
try something simpler with less chance of compromising security. In any
case, good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sun, 13 Jun 1999 23:19:22 GMT
From: Brad Clawsie <bradclawsie@my-deja.com>
Subject: Ooops, my bad
Message-Id: <7k1e9l$a9u$1@nnrp1.deja.com>
Oops, an amendment to my previous post -
yes, the Schwartzian Transform will save you lookups on repeated mtime
lookups for files that are re-compared in the sort.
Note that most commercial unixes will limit the number of files in a
directory to a level whereby you won't see much of a pinch from doing
the repeated compares - my experience is that most directories have less
than 100 files on average, and the stat operation is very fast.
Surely my response has the asset of being able to be memorized in
totality - its basically one line.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 13 Jun 1999 18:04:24 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Ooops, my bad
Message-Id: <ylso7vtwx3.fsf@windlord.stanford.edu>
Brad Clawsie <bradclawsie@my-deja.com> writes:
> Note that most commercial unixes will limit the number of files in a
> directory to a level whereby you won't see much of a pinch from doing
> the repeated compares -
I'm not aware of any Unix that places any (practically encounterable)
limits on the size of a directory, apart from the performance degredation
on file accesses through the directory that starts setting in at around
10,000 files.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 13 Jun 1999 19:24:56 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Ooops, my bad
Message-Id: <376459e8@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Russ Allbery <rra@stanford.edu> writes:
:I'm not aware of any Unix that places any (practically encounterable)
:limits on the size of a directory, apart from the performance degredation
:on file accesses through the directory that starts setting in at around
:10,000 files.
No, Linux kicks in before then. BSD seems to stand up to it fine,
however.
--tom
--
"A man who can fool chiefs, and even gods, must still face the monsters he
himself created." - Old Maori saying
------------------------------
Date: Sun, 13 Jun 1999 16:03:47 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: PerlScript ... what features are missing?
Message-Id: <Pine.GSO.4.02A.9906131555070.6999-100000@user2.teleport.com>
On Sun, 13 Jun 1999, Ken Snyder wrote:
> > > $myVariable << 'END_OF_HTML';
> > > <html>
> > > hello world
> > > </html>
> > > END_OF_HTML
> > > print $myVariable;
> The HTML -- while it appears to have NO error -- is totally irrelevant
> to the problem and is just placeholder text.
That's fine if you want to call it placeholder text. I won't argue valid
versus invalid HTML here; that would be off topic anyway.
> The code snippet included in this email works fine under Perl.
What version of Perl permits you to assign to $myVariable without use of
an equal sign? What version lets you indent the END_OF_HTML marker like
that? Could you be mistaken?
> If you take exactly the same snippet and just change the "print"
> statement to a "$Response->Write" statement, it fails. Not on that
> line but rather in recognizing the assignment statement that preceeds
> it.
I (still) don't see how you expect Perl to recognize a line without an
equal sign as an assignment statement. Could you take another look at the
code, please? Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Sun, 13 Jun 1999 15:59:31 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: simple perl question
Message-Id: <MPG.11cdd7992dd2ee1a989bdb@nntp.hpl.hp.com>
In article <7k1b28$a97$1@fir.prod.itd.earthlink.net> on Sun, 13 Jun 1999
22:59:57 GMT, Bob Trieger <sowmaster@juicepigs.com> says...
...
> I am just curious why you bothered with the greater than or equal to 0
> and the less than or equal to 24.
>
> Why not just: (assuming $Hour contains a number between 0 and 24)
>
> if ($Hour < 12) {
> print $morning;
> } elsif ($Hour >= 12 and $Hour < 18) {
> print $afternoon;
> } else {
> print $evening;
> }
I am just curious why you bothered with the greater than or equal to 12.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sun, 13 Jun 1999 18:40:17 -0700
From: "leslie cox" <leslie_cox@bc.sympatico.ca>
Subject: Using and searching multiple databases help needed
Message-Id: <q6Z83.63$vX3.479669@news.bctel.net>
Hi Everyone
This is a general perl question, and one that probably has a simple answer,
and being relatively new to Perl I am stumped for the correct wording, well
here goes. I am working on a script modification for my site and was
wondering if somebody could point me in the right direction.
What I have at the moment are 64 separate scripts running 64 separate
categories of software information, for download, each with it's own
database.
What I am trying to do is to have one main search database, with the search
keyword input box at the bottom of each category page.
I made the search script by adding an additional script, and by adding these
extra lines to the existing 64 script's:
$search_data_location = "/path/to/my/search/script/data_file_directory";
$search_database = "data.dat";
and then adding into the rest of the script's:
if ($form {'add'})
{
if ($check_items eq "Y")
{&check_items;}
$form{'Description'} =~ (s/\r\n/<br>/g);
foreach $split_table_fields (@split_table_fields)
{push (@row, "$form{$split_table_fields}");}
$new_row = join ("\|", @row);
open (DATABASE, ">>$data_location/$database");
open (DATABASE, ">>$search_data_location/$search_database");
print DATABASE "$new_row\n";
close (DATABASE);
print "<center><h2>$form{$split_table_fields[1]} Item added to the
Database</h2>";
&display;
}
Ok this is my problem after I added the second instance of:
open (DATABASE, ">>$search_data_location/$search_database");
it will add the info and I can search the data in the search script, which I
wanted it to do, but now it won't put any data into the original category
database, the one I had typed the information into.
I know I must be missing something probably very basic here, some wording
between the two open (DATABASE, ">> statements so that it will write to the
category database and the search database at the same time. As always
thanks for any help you can offer.
Best Regards,
Leslie Cox.
webmaster@vanclubs.com
------------------------------
Date: Mon, 14 Jun 1999 00:28:55 GMT
From: gsherman2773@my-deja.com
Subject: Re: Verifying date data
Message-Id: <7k1ic0$bca$1@nnrp1.deja.com>
> Then you must be blind (from the Date::Calc man page):
>
Yes. And lazy. Thank you for making me aware of the check_date
function in that module.
Incidentally, as an ActivePerl user on the Win32 platform, and on a
machine that does not have any installed C/C++ compiler, installing the
Date::Calc module would require quite a bit of an effort. If anybody is
interested, the way I eventually solved my problem with verifying date
strings is as follows, using modules that are distributed automatically
with the latest ActivePerl version:
use HTTP::Date;
use POSIX qw(strftime);
$date = '19990631';
$time = str2time($date);
$check = strftime "%Y%m%d", localtime($time);
print "$date is a".(($check eq $date) ? ' ':'n IN')."VALID date";
Thanks again,
G. Sherman
(If this is an accidental duplicate post, please resist every urge you
have to slog my sorry ass and accept my apologies.)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 14 Jun 1999 01:21:25 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: why short of 1 month ??
Message-Id: <7k1jb3$761$1@holly.prod.itd.earthlink.net>
[ courtesy cc sent by mail if address not munged ]
"NCB" <eng80386@nus.edu.sg> wrote:
>Hi all ,
>Given
>
> ($sec ,$min,$hr,$mntdy,$mon,$yr,$wk,$yrdy,$stm)=localtime;
>
>why is the variable $mon which stands for month always slower by 1 month ??
RTFFAQ
Let's suppose you have:
@month = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
Jun is element 5, because arrays start at 0, not 1.
If you want to use the numeric month, just add 1 to $mon.
------------------------------
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 5981
**************************************