[16409] in Perl-Users-Digest
Perl-Users Digest, Issue: 3821 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 27 14:06:40 2000
Date: Thu, 27 Jul 2000 11:05:17 -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: <964721117-v9-i3821@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 27 Jul 2000 Volume: 9 Number: 3821
Today's topics:
Re: Advanced Perl Programming -- Dated? <bart.lateur@skynet.be>
Re: Advanced Perl Programming -- Dated? (Marcel Grunauer)
Re: Automating Web Page Update <andre@UltraShell.Net>
Re: CGI-Perl question - Form results writing to a file (Liam)
Re: CGI-Perl question - Form results writing to a file (Marcel Grunauer)
Re: CGI-Perl question - Form results writing to a file (Liam)
Re: DBI.pm CGI.pm tutorial needed <rschram@reed.edu>
DBI.pm <cmalempa@mail.ford.com>
document set to execute? pooh23@my-deja.com
Re: document set to execute? <Elie.Wildman@spamny.email.gs.com>
Re: Does anybody know how to use ptkdbw? <ivkepych@yahoo.com>
Re: empty hash reference nobull@mail.com
Re: Expanding lists of ranges of integers 1-3,5-8,9,13- <aqumsieh@hyperchip.com>
Re: Expanding lists of ranges of integers 1-3,5-8,9,13- (Marcel Grunauer)
Re: Expanding lists of ranges of integers 1-3,5-8,9,13- <aqumsieh@hyperchip.com>
Re: Expanding lists of ranges of integers 1-3,5-8,9,13- (Eric Kuritzky)
flatfile storage <Seb.Erlhofer@evc.net>
flatfile storage <Seb.Erlhofer@evc.net>
Re: flatfile storage (Greg Bacon)
Re: flatfile storage <sariq@texas.net>
Re: flatfile storage <tom.kralidis@ccrs.nrcanDOTgc.ca>
Re: flatfile storage (Abigail)
Re: HELP NEEDED! BADLY... E-mail notification sm108@hotmail.com
Re: Help! System function from html page <r52270@email.sps.mot.com>
Re: Help! System function from html page <newsposter@cthulhu.demon.nl>
Re: HTTP/1.1 404 Object Not Found ... The system cannot <newsposter@cthulhu.demon.nl>
Re: HTTP/1.1 404 Object Not Found ... The system cannot nobull@mail.com
Need to change @INC <etienno@my-deja.com>
Re: Need to change @INC <Peter.Dintelmann@dresdner-bank.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 27 Jul 2000 16:17:14 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Advanced Perl Programming -- Dated?
Message-Id: <v4l0os8ahk3lm7mnafqvnlnvtdnrjdi1ns@4ax.com>
Uri Guttman wrote:
>typeglobs are not meant to pass around data structures. they
>are meant to access the symbol table. aliasing like that is bug prone
>and confusing.
While we're at it... if you really think that accessing data structures
through references is just as good as the real thing, why not drop
hashes and arrays altogether in Perl 6? We'd get a simpler, thus, less
confusing language.
%foo would be a shortcut for %$foo, @foo a shortcut for @$foo.
Granted, $foo, %foo and @foo would all access the same variable, 'foo',
er, $foo. Newbies are having difficulties with @foo{'a','b'} accessing
%foo anyway.
We can modify the meaning of current shortcut syntax, so that $foo{bar}
would be the same as $foo->{bar}, and $foo[3] the same as $foo->[3].
--
Bart.
------------------------------
Date: Thu, 27 Jul 2000 16:15:04 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: Advanced Perl Programming -- Dated?
Message-Id: <slrn8o0oaq.1d6.marcel@gandalf.local>
On Thu, 27 Jul 2000 16:17:14 GMT, Bart Lateur <bart.lateur@skynet.be> wrote:
>While we're at it... if you really think that accessing data structures
>through references is just as good as the real thing, why not drop
>hashes and arrays altogether in Perl 6? We'd get a simpler, thus, less
>confusing language.
>
>%foo would be a shortcut for %$foo, @foo a shortcut for @$foo.
And $foo is a reference to @foo, %foo, sub foo or which one?
Or is that $$foo? or $@foo? What then becomes of @@foo?
Can of worms.
--
Marcel
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();
------------------------------
Date: Thu, 27 Jul 2000 15:09:47 GMT
From: Andre van Straaten <andre@UltraShell.Net>
Subject: Re: Automating Web Page Update
Message-Id: <%gYf5.8906$gU5.222890@news-east.usenetserver.com>
I have a mixed shell/Perl script which checks stale links on my Web
site (see footer)B. Maybe you'll find some hints for your job.
O'Reilly's "Perl Cookbook" covers everything you're looking for, too.
-- avs
Claudia <claudiasmt@sprynet.com> wrote:
> Does anyone know of a script that would allow me to update my web pages
> automatically online?
> For example: The html page is static Except for the content in certain
> areas of the page (all text) that may or may not need updating from time to
> time.
> Also is there a script that could create a copy of a set of static html
> pages based on user input? For example: The user chooses site 1 of 3 and
> the script would
> 1 - Read the Site 1 input from user
> 2- Go out and retrieve all the necessary html pages associated to Site 1
> 3 - Copy these pages to a new name or new directory
> 4 -Allow the user to update these pages online with text content for
> specific areas of the html pages.
> Any help or direction (suggested reading) as to where to start would be much
> appreciated.
> Claudia
--
Andre van Straaten
http://www.vanstraatensoft.com
______________________________________________
flames please to /dev/null@vanstraatensoft.com
------------------------------
Date: Thu, 27 Jul 2000 15:40:50 GMT
From: lkenny@fisheries.org (Liam)
Subject: Re: CGI-Perl question - Form results writing to a file
Message-Id: <39805769.12841699@209.247.210.101>
based on your suggestions, as well as research into the problem
(CGI.pm) i changed the script around a bit. but i'm still having
trouble having the script write to the already created file. i'm
getting an internal server error.
below is the revised edition. once again all help is grteatly
appreciated
#!/usr/local/bin/perl
# read in query
read (STDIN, $email, $ENV{"CONTENT_LENGTH"});
# open email-list file and write new address to file
open (EM, ">>cgi-local/email.txt") or dienice("Can't open email list:
$!");
flock(EM,2);
seek(EM,0,2);
print EM $email.";\n";
#close email list-file
close (EM);
# http header
print "Content-type: text/html\n\n";
# print out confirmation page
print <<END_OF_HTML;
<html><head><title>E-Mail Subscription Confirmation</title>
</head><body><h1>Thank you for subscribing!</h1><br>
<p><br>
Click <a href="/index.html">here</a> to return to
homepage.<br>
</body></html>
END_OF_HTML
sub dienice {
my($msg)=@_;
print "<h2>Error</h2>\n";
print $msg;
exit;
}
On Thu, 27 Jul 2000 13:27:01 GMT, marcel@codewerk.com (Marcel
Grunauer) wrote:
>On Thu, 27 Jul 2000 13:18:42 GMT, Liam <lkenny@fisheries.org> wrote:
>
>>i can't get these form results to write to a file. any help anyone
>>can offer is appreciated. i am including the script below
>
>>#!/usr/local/bin/perl
>
>No.
>
> #!/usr/local/bin/perl -w
>
> use strict;
>
>>read (STDIN, $email, $ENV{"CONTENT_LENGTH"});
>
>No. Use CGI.pm (see 'perldoc CGI').
>
>># open email-list file and write new address to file
>>open (em, "email.txt");
>
>If you want to open the file for writing, you need to say that. Also
>you need to check the result of the system call. And filehandles are
>all caps by convention.
>
> open(EM, ">email.txt") or die "can't create email.txt: $!\n";
>
>>
>>while (<em>) {
>
>Now you want to read from the file? No. With CGI.pm, you get the form
>contents via param() (see the CGI.pm documentation).
>
>> print >>"$email"."\;\n";
>
>Where did you get that syntax from? The '>>' is strange, as is the
>escaping of the semicolon. Why do you quote the $email scalar? Methinks
>you mean
>
> print EM $email, "\n";
>
>>}
>>
>># http header
>>print "Content-type: text/html\n\n";
>>
>># print out confirmation page
>>print "<html><head><title>E-Mail Subscription Confirmation</title>\n";
>>print "</head><body><h1>Thank you for subscribing!</h1><br>\n";
>>print "<p><br>\n";
>>print "Click <a href=\"/index.html\">here</a> to return to
>>homepage.<br>\n";
>>print "</body></html>\n";
>
>Please use the CGI module's HTML shortcuts to do that. But _if_ ever you
>need to print a lot of text in this fashion, consider using a different
>quote operator or a here document (cf. 'perldoc perlop' and "perldoc -q
>'here doc'").
>
>Anyway, using CGI.pm that becomes something like
>
> print header, start_html('E-Mail Subscription Confirmation'),
> h1('Thank you for subscribing!');
>
>etc.
>
>Also remember to test you program locally, either on the local web server
>or on the command line (again, CGI.pm provides for that). And check your
>HTML. The <H1> shouldn't be followed by paragraph or line breaks.
>
>--
>Marcel
>sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();
------------------------------
Date: Thu, 27 Jul 2000 15:47:03 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: CGI-Perl question - Form results writing to a file
Message-Id: <slrn8o0mls.1d6.marcel@gandalf.local>
On Thu, 27 Jul 2000 15:40:50 GMT, Liam <lkenny@fisheries.org> wrote:
>based on your suggestions, as well as research into the problem
>(CGI.pm) i changed the script around a bit. but i'm still having
>trouble having the script write to the already created file. i'm
>getting an internal server error.
Have you tested your program on the command line?
Have you looked into the web server error log?
>#!/usr/local/bin/perl
Again, please use
#!/usr/local/bin/perl -w
use strict;
If that gives you error messages, you need to correct the program,
not omit these warning mechanisms.
>
># read in query
>read (STDIN, $email, $ENV{"CONTENT_LENGTH"});
>
># open email-list file and write new address to file
>open (EM, ">>cgi-local/email.txt") or dienice("Can't open email list:
>$!");
You should output the Content-type before the open statement, because
even the dienice-output will need a content-type.
You might also want to look into the CGI::Carp module:
use CGI::Carp qw(fatalsToBrowser);
die "Fatal error messages are now sent to browser";
>flock(EM,2);
These constants can vary from platform to platform. Use the constants
from Fcntl.
>seek(EM,0,2);
Not necessary, you already opened the file for appending.
--
Marcel
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();
------------------------------
Date: Thu, 27 Jul 2000 16:04:04 GMT
From: lkenny@fisheries.org (Liam)
Subject: Re: CGI-Perl question - Form results writing to a file
Message-Id: <39805d63.14371444@209.247.210.101>
i think i have gotten it to work.
thanks very much for your help.
On Thu, 27 Jul 2000 15:47:03 GMT, marcel@codewerk.com (Marcel
Grunauer) wrote:
>On Thu, 27 Jul 2000 15:40:50 GMT, Liam <lkenny@fisheries.org> wrote:
>>based on your suggestions, as well as research into the problem
>>(CGI.pm) i changed the script around a bit. but i'm still having
>>trouble having the script write to the already created file. i'm
>>getting an internal server error.
>
>Have you tested your program on the command line?
>
>Have you looked into the web server error log?
>
>
>>#!/usr/local/bin/perl
>
>Again, please use
>
> #!/usr/local/bin/perl -w
>
> use strict;
>
>If that gives you error messages, you need to correct the program,
>not omit these warning mechanisms.
>
>>
>># read in query
>>read (STDIN, $email, $ENV{"CONTENT_LENGTH"});
>>
>># open email-list file and write new address to file
>>open (EM, ">>cgi-local/email.txt") or dienice("Can't open email list:
>>$!");
>
>You should output the Content-type before the open statement, because
>even the dienice-output will need a content-type.
>
>You might also want to look into the CGI::Carp module:
>
> use CGI::Carp qw(fatalsToBrowser);
> die "Fatal error messages are now sent to browser";
>
>>flock(EM,2);
>
>These constants can vary from platform to platform. Use the constants
>from Fcntl.
>
>>seek(EM,0,2);
>
>Not necessary, you already opened the file for appending.
>
>--
>Marcel
>sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();
------------------------------
Date: Thu, 27 Jul 2000 09:46:04 -0700
From: RS@ <rschram@reed.edu>
Subject: Re: DBI.pm CGI.pm tutorial needed
Message-Id: <0c3132db.8ab378f2@usw-ex0102-014.remarq.com>
A good CGI book that spends some time discussing DBI is
"CGI Programming with Perl" (formerly "CGI Programming on the
World Wide Web" orig. pub in '96) O'Reilly, 2000.
As for "examples" of how to use them together, no such book
exists to my knowledge. This surprises me since database
programming and web site programming are so closely related. The
new CGI book is good because it acknowledges that most people
will want to program for the web in concert with DBI, as well as
other modules for playing with data, and pitches its discussion
in that direction (unlike, for example, many examples from the
1996 1st edition, which revolved largely around how to make a
guestbook.
You'll need a reference for the DBI stuff, even after having
mastered how to make CGI-ready output with some DBI. The two-
book answer is not necessarily a bad one.
-----------------------------------------------------------
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
------------------------------
Date: Thu, 27 Jul 2000 11:15:44 -0400
From: Chalapathi Malempati <cmalempa@mail.ford.com>
Subject: DBI.pm
Message-Id: <39805220.7F7B5C1@mail.ford.com>
Hello All
I have a MS Access database on Unix. I am using the following perl code
to open the access database and it doesn't work.
#!/usr/bin/perl
use DBI;
# provide the name of the database and username and password
# open a connection to the database
my $dbh = DBI->connect("dbd::ODBC::driver=Microsoft Access Driver
(*.mdb);dbq=\\****\thishost\u\fc\www.80\test_area\excelview.mdb")
or die "Can't connect to database: $DBI::errstr";
# construct a sql query that fetches all the records from payroll table.
my $sth = $dbh->prepare('select * from table1 where field1 IS NULL')
or die "Couldn't prepare statement: " . $dbh->errstr;
# execute the query
$sth->execute
or die "Couldn't execute statement: " . $sth->errstr;
# open a text file, if already exists then overwrite
open(OUTFILE,">accessperl.txt");
my @fields;
while ( @fields = $sth->fetchrow() ) {
my $temp_field=$fields[0];
print OUTFILE $temp_cdsid;
print OUTFILE "\n";
}
if ($sth->rows == 0) {
print "Table is empty.\n\n";
}
$sth->finish;
close(OUTFILE);
$dbh->disconnect;
------------------------------
Date: Thu, 27 Jul 2000 16:10:36 GMT
From: pooh23@my-deja.com
Subject: document set to execute?
Message-Id: <8lpmtn$nj9$1@nnrp1.deja.com>
hello,
I have a perl script on my website for a survey I created. When i
click the submit button on the survey, a dialog box pops up asking me
if I want to download the perl script. Could my permissions be set
incorrectly? If not, what could be the problem? If so, can the
hostsing company reset the permissions or can I if they're using a
windows server?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 27 Jul 2000 13:25:54 -0400
From: "Wildman, Elie" <Elie.Wildman@spamny.email.gs.com>
Subject: Re: document set to execute?
Message-Id: <398070A1.A1961013@spamny.email.gs.com>
Sounds like you should talk to your hosting company about this. It seems
as though there server is not actually set to execute the file, or the
permissions are set wrong.
-regards
pooh23@my-deja.com wrote:
> hello,
> I have a perl script on my website for a survey I created. When i
> click the submit button on the survey, a dialog box pops up asking me
> if I want to download the perl script. Could my permissions be set
> incorrectly? If not, what could be the problem? If so, can the
> hostsing company reset the permissions or can I if they're using a
> windows server?
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Thu, 27 Jul 2000 19:05:42 +0300
From: "Ivan Kepych" <ivkepych@yahoo.com>
Subject: Re: Does anybody know how to use ptkdbw?
Message-Id: <8lpmnh$m0t$1@news.uar.net>
The best Perl debugger for me is ptkdb.pm
you should have Tk installed if you want to use it.
Site you can download script from:
http://world.std.com/~aep/ptkdb/
Instaltation: just copy ptkdb.pm to $PERL_HOME/lib/Devel
First script's line for NT or Win95/98 ....MS-DOS :)
#!command.com /c perl.exe -d:ptkdb
Enjoy :)
Franz GEIGER <fgeiger@datec.at> wrote in message
news:8lolhs$42q$2@pollux.ip-plus.net...
> Hello all,
>
> I once had a module that allowed me to debug Perl scripts visually and I
> think it was ptkdbw.pm. I'm working on new hardware now and didn't do Perl
> for a long time. My problem is now that I cannot figure out how to
> install/use it. perl -d ptkdbw.pm does not work even if I try it with path
> imformation.
>
> This all happens on a NT4.0 machine. Perl is ActiveState's.
>
> Any hint is appreciated.
>
> Best regards
> Franz GEIGER
>
>
>
>
>
>
>
------------------------------
Date: 27 Jul 2000 18:01:27 +0100
From: nobull@mail.com
Subject: Re: empty hash reference
Message-Id: <u9r98f4ie0.fsf@wcl-l.bham.ac.uk>
vnguyen_1999@my-deja.com writes:
> Try to catch an empty hash reference from the result set of query.
What do you mean by "an empty hash reference"? Do you mean a
refercence to an empty hash? Or do you mean a scalar that would
usually contain a hash refercence but actually contains undef?
print '$foo is undefined' if ! defined $foo;
print '$foo is an refercence to an empty hash' if ref $foo && eval { !%$foo };
The eval{} is there to trap and ignore the situation where $foo is not
a reference to a hash at all. I don't explicit check that $foo is a
hash ref in case it's a ref to a blessed hash.
> Just want to know how I can check if $sth->fetch() is empty.
Are you sure? If $sth is a DBI object then fetch() returns an array
ref not a hash ref. What is more the array is of fixed length as
defined by the number of columns in the query. When the end of the
query output is reached DBI->fetch() returns undef.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 27 Jul 2000 15:14:01 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Expanding lists of ranges of integers 1-3,5-8,9,13-14
Message-Id: <7a8zunhah0.fsf@merlin.hyperchip.com>
abigail@foad.org (Abigail) writes:
> Jim Monty (monty@primenet.com) wrote on MMDXXII September MCMXCIII in
> <URL:news:8lor1t$1p$1@nnrp02.primenet.com>:
> -- Not long ago on the Fun With Perl mailing list, there was an
> -- impromptu Perl golf challenge to expand lists of ranges of integers,
> -- e.g., to transform the string
> --
> -- '1-3,5-8,10,13-14'
> --
> -- into the list
> --
> -- (1, 2, 3, 5, 6, 7, 8, 10, 13, 14)
> --
> -- Of course TMTOWTDI, but what's the canonical way?
>
>
> local $_ = "1-3,5-8,10,13-14";
> s/-/../g; @list = eval;
AWTDI:
$_ = "1-3,5-8,10,13-14";
s/(\d+)-(\d+)/join',', $1 .. $2/eg;
@list = split ',';
But, when I was coming up with this, I stumbled on something weird:
$_ = "1-3,5-8,10,13-14";
s/(\d+)-(\d+)/$1 .. $2/eg;
print;
__END__
1E0,1E0,10,1E0
Strange results. Anybody got any ideas?
--Ala
------------------------------
Date: Thu, 27 Jul 2000 15:13:02 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: Expanding lists of ranges of integers 1-3,5-8,9,13-14
Message-Id: <slrn8o0kmk.1d6.marcel@gandalf.local>
On Thu, 27 Jul 2000 15:14:01 GMT, Ala Qumsieh <aqumsieh@hyperchip.com> wrote:
>But, when I was coming up with this, I stumbled on something weird:
>
> $_ = "1-3,5-8,10,13-14";
> s/(\d+)-(\d+)/$1 .. $2/eg;
> print;
> __END__
> 1E0,1E0,10,1E0
>
>Strange results. Anybody got any ideas?
That's not an array index range, but the flip-flop operator. perldoc
perlop, search for "E0".
--
Marcel
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();
------------------------------
Date: Thu, 27 Jul 2000 15:34:47 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Expanding lists of ranges of integers 1-3,5-8,9,13-14
Message-Id: <7a66prh9ie.fsf@merlin.hyperchip.com>
marcel@codewerk.com (Marcel Grunauer) writes:
> On Thu, 27 Jul 2000 15:14:01 GMT, Ala Qumsieh <aqumsieh@hyperchip.com> wrote:
>
> >But, when I was coming up with this, I stumbled on something weird:
> >
> > $_ = "1-3,5-8,10,13-14";
> > s/(\d+)-(\d+)/$1 .. $2/eg;
> > print;
> > __END__
> > 1E0,1E0,10,1E0
> >
> >Strange results. Anybody got any ideas?
>
>
> That's not an array index range, but the flip-flop operator. perldoc
> perlop, search for "E0".
Doh. I forgot about the behaviour of .. in scalar context. Now it all
makes sense again. Thanks.
--Ala
------------------------------
Date: 27 Jul 2000 17:59:38 GMT
From: kuritzky@math.berkeley.edu (Eric Kuritzky)
Subject: Re: Expanding lists of ranges of integers 1-3,5-8,9,13-14
Message-Id: <8lptaa$mcr$1@agate.berkeley.edu>
In article <8lor1t$1p$1@nnrp02.primenet.com>,
Jim Monty <monty@primenet.com> wrote:
>Not long ago on the Fun With Perl mailing list, there was an
>impromptu Perl golf challenge to expand lists of ranges of integers,
>e.g., to transform the string
>
> '1-3,5-8,10,13-14'
>
>into the list
>
> (1, 2, 3, 5, 6, 7, 8, 10, 13, 14)
>
>Of course TMTOWTDI, but what's the canonical way?
>
If you think evals are yucky (even when they look like
s/PATTERN/STRING/e), you can do:
$_="1-3,5-8,10,13-14";
@list=map {my @y=split /-/;$y[0]..$y[-1]}split /,/,$_;
------------------------------
Date: Thu, 27 Jul 2000 19:08:40 +0200
From: Sebastian Erlhofer <Seb.Erlhofer@evc.net>
Subject: flatfile storage
Message-Id: <b3r0oskcf8absg97jav5kr14le5bmv50d3@4ax.com>
Hi
I have to store a multi-line in a database.
MySQL / msSQL or PHP isn't available.
Any Ideas?
Tnx!
Sebastian
------------------------------
Date: Thu, 27 Jul 2000 19:58:05 +0200
From: Sebastian Erlhofer <Seb.Erlhofer@evc.net>
Subject: flatfile storage
Message-Id: <ovt0osojs8slhjnq6ujbfhdg11sh675364@4ax.com>
DBM... sounds fine. I just have to get out what it is :)
And I hope it will run at my hosted-server...
Tnx!
Seb
------------------------------
Date: Thu, 27 Jul 2000 17:18:16 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: flatfile storage
Message-Id: <so0rmoca3j1135@corp.supernews.com>
In article <b3r0oskcf8absg97jav5kr14le5bmv50d3@4ax.com>,
Sebastian Erlhofer <Seb.Erlhofer@evc.net> wrote:
: I have to store a multi-line in a database.
: MySQL / msSQL or PHP isn't available.
Have you looked at using DBD::RAM?
Greg
--
But actually, this kind of "empowerment" often seems to reduce feminism to a
vehicle for women to vent and validate their frustrations with men . . .
and to blame their personal unhappiness on the patriarchy.
-- Cathy Young
------------------------------
Date: Thu, 27 Jul 2000 12:36:48 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: flatfile storage
Message-Id: <39807330.F484E93F@texas.net>
Sebastian Erlhofer wrote:
>
> I have to store a multi-line in a database.
> MySQL / msSQL or PHP isn't available.
>
> Any Ideas?
I'll beat Jeff Zucker to the punch... :)
use DBD::RAM;
Available on the CPAN.
- Tom
------------------------------
Date: Thu, 27 Jul 2000 13:21:07 -0400
From: Tom Kralidis <tom.kralidis@ccrs.nrcanDOTgc.ca>
Subject: Re: flatfile storage
Message-Id: <39806F83.650D1E6@ccrs.nrcanDOTgc.ca>
Sebastian Erlhofer wrote:
>
> Hi
>
> I have to store a multi-line in a database.
> MySQL / msSQL or PHP isn't available.
>
> Any Ideas?
>
> Tnx!
>
> Sebastian
Have you considered the DBM format? You can make a dbm file with
'makemap' and use one of the DB_* modules to work with the data.
..Tom
--
=================================
Tom Kralidis
Geo-Spatial Developer
Canada Centre for Remote Sensing
Tel: (613) 947-1828
Fax: (613) 947-1408
http://www.nrcan.gc.ca/~tkralidi/
=================================
------------------------------
Date: 27 Jul 2000 13:42:09 EDT
From: abigail@foad.org (Abigail)
Subject: Re: flatfile storage
Message-Id: <slrn8o0t37.vcg.abigail@alexandra.foad.org>
Sebastian Erlhofer (Seb.Erlhofer@evc.net) wrote on MMDXXII September
MCMXCIII in <URL:news:b3r0oskcf8absg97jav5kr14le5bmv50d3@4ax.com>:
:} Hi
:}
:} I have to store a multi-line in a database.
:} MySQL / msSQL or PHP isn't available.
:}
:} Any Ideas?
Sybase, Oracle, DB/2.
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: Thu, 27 Jul 2000 15:02:27 GMT
From: sm108@hotmail.com
Subject: Re: HELP NEEDED! BADLY... E-mail notification
Message-Id: <8lpitv$kc9$1@nnrp1.deja.com>
In article <slrn8o0him.1d6.marcel@gandalf.local>,
marcel@codewerk.com wrote:
> On Thu, 27 Jul 2000 14:19:13 GMT, Daniel <dae@chello.se> wrote:
[...]
> >then I want it to send a mail to test@test.com if it is 05-11 and
give him a
> >notice "one of your contracts is expiring" and also automaticly send
the
> >same message to manager@test.com I would be very grateful if someone
could
> >help me with this! Thanks alot =)
> To send mail, read "How do I send mail?" in perlfaq9 ("perldoc -
q 'send
> mail'"). Or use a module like MIME::Lite, which you get from CPAN.
I use Mail::Sendmail, it's very simple to use and it works without a
hitch. Get it from www.cpan.org
Hope this helps -
Steve
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 27 Jul 2000 09:25:39 -0700
From: Mike Huang-R52270 <r52270@email.sps.mot.com>
Subject: Re: Help! System function from html page
Message-Id: <39806283.4748590E@email.sps.mot.com>
Marcel Grunauer wrote:
> On Wed, 26 Jul 2000 15:50:48 -0700, Mike Huang-R52270
> <r52270@email.sps.mot.com> wrote:
>
> >I have this section of code in a .pl file. It is displayed in the
> >browser. The process_cust_data program doesn't even seem to be called.
> >It works perfectly on the command line.
>
> If a program is display as text in the browser window instead of getting
> executed, you need to make sure that the program has execute permission,
> that the directory is marked as containing programs in the server
> configuration (e.g., ExecCGI in Apache's httpd.conf), and/or (for IIS)
> that the .pl file suffix is mapped to Perl in the server configuration.
>
> --
> Marcel
> sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();
I have it set up correctly. The browser executes the perl program, and everything
in the program work until the system call. Permissions are assigned correctly too.
------------------------------
Date: 27 Jul 2000 17:16:15 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Help! System function from html page
Message-Id: <8lpqov$6pj$1@internal-news.uu.net>
Mike Huang-R52270 <r52270@email.sps.mot.com> wrote:
> I have this section of code in a .pl file. It is displayed in the
> browser. The process_cust_data program doesn't even seem to be called.
> It works perfectly on the command line.
Where are all the error checks to see whether the chdir, the open, etc
actually succeed?
Erik
------------------------------
Date: 27 Jul 2000 15:30:14 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: HTTP/1.1 404 Object Not Found ... The system cannot find the file specified.
Message-Id: <8lpki6$37v$1@internal-news.uu.net>
Nils-Eric Pettersson <nils-eric@telia.com> wrote:
> I have a perl program that should connect to a server and get a page
> from it.
use LWP;
> I can connect to the server but when I try to get to page I only get a
> message that the server can't find it.
Looks like you're having trouble with your HTTP protocol implementation,
not with Perl. Read the HTTP specifications.
> I think the problem is on the row telling the server to send a page:
> print SOCKET "GET $page 1.1\n\n";
^^^ space here
> My program look like this:
> print SOCKET "GET$page 1.1\n\n";
^^ no space here?
The HTTP specifications should show you how a proper request should look.
Erik
------------------------------
Date: 27 Jul 2000 17:54:19 +0100
From: nobull@mail.com
Subject: Re: HTTP/1.1 404 Object Not Found ... The system cannot find the file specified.
Message-Id: <u9wvi74ipw.fsf@wcl-l.bham.ac.uk>
nils-eric@telia.com (Nils-Eric Pettersson) writes:
> I think the problem is on the row telling the server to send a page:
> print SOCKET "GET $page 1.1\n\n";
What is "1.1" did you perhaps mean "HTTP/1.1"? If so the "Hostname:"
header in the request is not optional and the server "MUST" (according
to the standard) reject your request.
Unless you really need HTTP/1.1 now then you should use LWP.
Actually doing the work to support HTTP/1.1 in LWP is probably less
than rolling your own HTTP/1.1 client. If you don't feel qualified to
tackle the former I doubt you should attempt the latter.
> print SOCKET "GET$page 1.1\n\n";
^
Missing space.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 27 Jul 2000 15:29:14 GMT
From: Etienne Laverdiere <etienno@my-deja.com>
Subject: Need to change @INC
Message-Id: <8lpkg2$lh4$1@nnrp1.deja.com>
Hi all, may anyone tell me How can I change the @INC? (In a NT system?)
I must put this line into it:
%INTERSHOP%\bin\perl -I %INTERSHOP% -I %INTERSHOP%\lib perlfile.pl
Best Regards,
Etienne Laverdiere
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 27 Jul 2000 17:53:06 +0200
From: "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
Subject: Re: Need to change @INC
Message-Id: <8lplsm$f854@intranews.dresdnerbank.de>
Hi,
Etienne Laverdiere schrieb in Nachricht <8lpkg2$lh4$1@nnrp1.deja.com>...
>Hi all, may anyone tell me How can I change the @INC? (In a NT system?)
use lib <LIST>;
is what you need (<LIST> contains your additional pathes).
Best regards,
Peter Dintelmann
------------------------------
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 3821
**************************************