[17028] in Perl-Users-Digest
Perl-Users Digest, Issue: 4440 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 27 00:05:27 2000
Date: Tue, 26 Sep 2000 21:05:10 -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: <970027510-v9-i4440@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 26 Sep 2000 Volume: 9 Number: 4440
Today's topics:
[IGNORE - OFF TOPIC] Re: Controlling line length read b <godzilla@stomp.stomp.tokyo>
Re: [IGNORE - OFF TOPIC] Re: Controlling line length re <godzilla@stomp.stomp.tokyo>
Re: checking for a valid date-time (Martien Verbruggen)
Date Conversion Question <eT@quidel.com>
Re: Date Conversion Question <simonis@myself.com>
Re: Date Conversion Question <bigiain@mightymedia.com.au>
Re: Date Conversion Question <dale@emmons.dontspamme.com>
Re: freeware perl script to binary... (Martien Verbruggen)
Re: help <simonis@myself.com>
Re: How can I combine regular expressions? <randy_734@my-deja.com>
Re: How secure is Perl? <bigiain@mightymedia.com.au>
Re: How secure is Perl? <simonis@myself.com>
Re: How to get length of scalar? (bowling???) <bigiain@mightymedia.com.au>
Re: How to get length of scalar? <no@spam.thanks>
Re: interpreter optimizations (Michael P. Soulier)
Re: interpreter optimizations (Ilya Zakharevich)
Re: MySQL vs. mSQL (Mark-Jason Dominus)
Re: MySQL vs. mSQL <yf32@cornell.edu>
Re: MySQL vs. mSQL <jeff@vpservices.com>
Re: MySQL vs. mSQL (Martien Verbruggen)
newbie - flushing content to the browser scottfreez@my-deja.com
Re: newbie - flushing content to the browser <simonis@myself.com>
Re: newbie - flushing content to the browser <brondsem@my-deja.com>
Re: perl modules and insecure dependency errors <simonis@myself.com>
Re: Perl on Windows <cyberdog@NOSPAM.nycap.rr.com>
Re: REGEX problem <yf32@cornell.edu>
Re: REGEX problem (Craig Berry)
Revisiting wxWindows + Perl <mbk59@hotmail.com>
Re: Revisiting wxWindows + Perl <simonis@myself.com>
Re: Salary Range for Perl Programmers <simonis@myself.com>
Re: Salary Range for Perl Programmers <simonis@myself.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 26 Sep 2000 19:31:26 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: [IGNORE - OFF TOPIC] Re: Controlling line length read by <>
Message-Id: <39D15BFE.B454323B@stomp.stomp.tokyo>
David Steuber wrote:
> "Godzilla!" <godzilla@stomp.stomp.tokyo> writes:
> ' Constantly changing your parameters, asking a
> ' question and responding with argument,
> ' smacks of trolling.
> Sounds to me more like how a client specifies a program usually
> accompanied by a lot of hand waving.
People like this, I am often tempted to give
'em a good smack upside the head. Wish I could,
legally. SMACK! Smarten up you arsehole.
It not my usual habit to whine, however with this
extraordinary amount of fake articles written with
malice intent being posted under myriad fake
header information, all fairly much by the same
person, I become increasingly annoyed with having
my personal time wasted by this idiot.
Fake articles are posted, people sucker into these
fake articles, pointless dialog takes place and,
others besides myself, have our time wasted by being
forced to filter through and wade through what amounts
to a bunch of mule manure. A killfile doesn't work
for this person with being able to fake entire header
information at whim and will via a server. Surprising
how few, if any, have noticed most of these fake email
addresses, included with fake header information, either
don't exist or don't belong to this poser using a server
in an unethical manner, if not perhaps unlawful manner.
Personally, I don't like having someone like this
rob me of my personal time and personal enjoyment
just to get his perverted ego rocks off.
Some of you dare to label me a troll?
*laughs*
How ignorantly gullible are some of you.
SMACK! SMACK! Smarten up you arseholes!
hehhh... heh... heh...
Godzilla!
--
Dr. Kiralynne Schilitubi ¦ Cooling Fan Specialist
UofD: University of Duh! ¦ ENIAC Hard Wiring Pro
BumScrew, South of Egypt ¦ HTML Programming Class
------------------------------
Date: Tue, 26 Sep 2000 19:48:43 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: [IGNORE - OFF TOPIC] Re: Controlling line length read by <>
Message-Id: <39D1600B.9EA1DDDE@stomp.stomp.tokyo>
"Godzilla!" wrote:
> David Steuber wrote:
> > "Godzilla!" <godzilla@stomp.stomp.tokyo> writes:
(snippage)
Oh yes, have you noticed how often this poser's articles
are double posted?
This boy is so lacking in technological know-how, he
screws up, a lot. Last major screw up resulted in
more than twenty-thousand articles being duplicated
and posted, articles of other people, all posted to
newsgroups dealing with computer languages, and only
newsgroups dealing with computer languages. Odd that.
*maniacal laughter*
Couple of years back, this cretin offered me a position
as systems operator for his server, knowing of my skills,
a position which I declined, knowing of him.
Ironically, he needs someone like me to straighten out
these screw ups of his, which extend far beyond
his peer news feed.
Why do you think he is here asking for help but concealing
his need for technological help, behind fake articles?
Suppose I would keep my mouth shut. However, his constant
harassment of me via faked articles, his rumor mongering
and secretive email gossip, pisses me off.
'tant pour tant'
*smiles*
Godzilla!
--
Dr. Kiralynne Schilitubi ¦ Cooling Fan Specialist
UofD: University of Duh! ¦ ENIAC Hard Wiring Pro
BumScrew, South of Egypt ¦ HTML Programming Class
------------------------------
Date: Wed, 27 Sep 2000 01:24:53 GMT
From: mgjv@verbruggen.comdyn.com.au (Martien Verbruggen)
Subject: Re: checking for a valid date-time
Message-Id: <slrn8t2j30.5er.mgjv@verbruggen.comdyn.com.au>
On 26 Sep 2000 12:08:35 GMT,
Clay Irving <clay@panix.com> wrote:
> On Mon, 25 Sep 2000 23:21:26 +0900, Dan and Shelly
> <wedeking@msa.attmil.ne.jp> wrote:
>
> >Does anyone know a better way than this:
> >
> >start:
> >$a = <STDIN>;
> >chomp($a);
> >if ("$a" =~ /(\d{2})(\d{2})(\d{2})/) {
> > $days = $1;
> > $hours = $2;
> > $minutes = $3;
[snip]
> Perl modules are your friend.
>
> #!/usr/local/bin/perl -w
>
> use Time::ParseDate;
>
> while ($time = <DATA>) {
> chomp $time;
> $epoch_seconds = parsedate("$time", VALIDATE => 1);
> if (! $epoch_seconds) {
> print "$time is invalid\n";
> }
> }
>
> __DATA__
> 12:00:00
> 01:52:45
> 25:15:00
> 04:61:00
> 15:05:64
I'm not sure that that helps. The original code seems to suggest that
the input is a concatenation of three two-digit numbers, the first of
which specifies a day, the second an hour, and the third a minute.
Without munging that before giving it to parsedate, I doubt very much
that you'll be able to make it validate. Besides that, without
providing the context of a month and year,it would be impossible for
anything to do that correctly.
If it was only a time, ok. If it was only a date, ok as well. But
given the input, the only validation that is possible is a broad one.
Now.. it might very well be possible that the OP could get their data
in a more decent format, but that's an entirely different issue.
Martien
--
Martien Verbruggen |
Interactive Media Division | Useful Statistic: 75% of the people
Commercial Dynamics Pty. Ltd. | make up 3/4 of the population.
NSW, Australia |
------------------------------
Date: Wed, 27 Sep 2000 02:36:54 GMT
From: eT <eT@quidel.com>
Subject: Date Conversion Question
Message-Id: <8qrmg6$up6$1@nnrp1.deja.com>
Greetings ... I am in the process of converting data from Sybase 4.x to
MySQL. As I have noticed from other posts, I have now encountered the
Date conversion challenge:
I need to convert dates from eg:
Apr 1 1991 12:00:00:000AM
to:
1991-04-01 12:00:00
I read somewhere that someone was using a Perl Module Date::Format or
Date::Calc.
Being a Perl Newbie and not being able to find more about this, I was
wondering if there was any standard perl program or so that I should be
aware of for this kind of changing.
Thanks!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 27 Sep 2000 03:20:07 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: Date Conversion Question
Message-Id: <39D16491.C6D2B48D@myself.com>
eT wrote:
>
> I need to convert dates from eg:
>
> Apr 1 1991 12:00:00:000AM
>
> to:
>
> 1991-04-01 12:00:00
>
> I read somewhere that someone was using a Perl Module Date::Format or
> Date::Calc.
>
If its so, the modules are on CPAN, along with their associated
documentation. As for a "standard" way, you'll likely not find
such a beast in these localities. Perl slogan and all...
------------------------------
Date: Tue, 26 Sep 2000 20:45:03 -0700
From: Iain Chalmers <bigiain@mightymedia.com.au>
Subject: Re: Date Conversion Question
Message-Id: <bigiain-0D0F44.20450326092000@news.pacbell.net>
In article <8qrmg6$up6$1@nnrp1.deja.com>, eT <eT@quidel.com> wrote:
> Greetings ... I am in the process of converting data from Sybase 4.x to
> MySQL. As I have noticed from other posts, I have now encountered the
> Date conversion challenge:
>
> I need to convert dates from eg:
>
> Apr 1 1991 12:00:00:000AM
>
> to:
>
> 1991-04-01 12:00:00
>
> I read somewhere that someone was using a Perl Module Date::Format or
> Date::Calc.
well - its just not that hard...
read up on:
perldoc -f split
perldoc -f sprintf
here...
#!/usr/bin/perl -w
use strict;
my $date='Apr 1 1991 12:00:00:000AM';
print sybase2sql_date($date);
sub sybase2sql_date{
my $date=shift;
my %m_num=('Jan'=>1,'Feb'=>2,'Mar'=>3,'Apr'=>4,'May'=>5,'Jun'=>6,
'Jul'=>7,'Aug'=>8,'Sep'=>9,'Oct'=>10,'Nov'=>11,'Dec'=>12);
my($mon,$day,$year,$hour,$min,$sec,$frac_sec)=split(/\s+|:/,$date);
return sprintf "%04d-%02d-%02d %02d:%02d:%02d",
($year,$m_num{$mon},$day,$hour,$min,$sec);
}
Note: you're throwing away the fractional seconds part of the date...
Note 2: if the sybase date hours *aren't* in 24hr format(which the AM at
the end suggests), add the line
$hour+=12 if (substr($frac_sec,-2) eq 'PM');
between the split and the sprintf lines...
------------------------------
Date: Tue, 26 Sep 2000 22:47:19 -0500
From: "Dale Emmons" <dale@emmons.dontspamme.com>
Subject: Re: Date Conversion Question
Message-Id: <st2rbstg2125e3@corp.supernews.com>
In case you aren't sure, a good access point to cpan is search.cpan.org.
"Drew Simonis" <simonis@myself.com> wrote in message
news:39D16491.C6D2B48D@myself.com...
> eT wrote:
> >
> > I need to convert dates from eg:
> >
> > Apr 1 1991 12:00:00:000AM
> >
> > to:
> >
> > 1991-04-01 12:00:00
> >
> > I read somewhere that someone was using a Perl Module Date::Format or
> > Date::Calc.
> >
>
> If its so, the modules are on CPAN, along with their associated
> documentation. As for a "standard" way, you'll likely not find
> such a beast in these localities. Perl slogan and all...
------------------------------
Date: Wed, 27 Sep 2000 01:11:36 GMT
From: mgjv@verbruggen.comdyn.com.au (Martien Verbruggen)
Subject: Re: freeware perl script to binary...
Message-Id: <slrn8t2ia3.5er.mgjv@verbruggen.comdyn.com.au>
On Tue, 26 Sep 2000 16:37:57 GMT,
Randy <randy_734@my-deja.com> wrote:
>
> Unices? Is that really a word?
http://www.tuxedo.org/~esr/jargon/jargon.html#Jargon%20Construction
Martien
--
Martien Verbruggen |
Interactive Media Division | You can't have everything, where
Commercial Dynamics Pty. Ltd. | would you put it?
NSW, Australia |
------------------------------
Date: 27 Sep 2000 03:43:40 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: help
Message-Id: <39D16A16.EEFEC800@myself.com>
rbfitzpa@my-deja.com wrote:
>
> I'm trying to run 'mon' on my solaris 2.6 box and I'm getting the
> following error:
Are we supposed to know what mon is? I personally have not the
slightest idea. Can you help me out a bit there?
------------------------------
Date: Wed, 27 Sep 2000 02:09:40 GMT
From: Randy <randy_734@my-deja.com>
Subject: Re: How can I combine regular expressions?
Message-Id: <39d1567c.88376921@207.126.101.100>
Jeff Pinyan <jeffp@crusoe.net> wrote:
>>Is there any way I can combine these into just one glorious, Perlish,
>>obfuscated expression?
>
>Sure. These regexes all have a common start and finish:
>
> $line =~ s/\b(MAGIC1)([a-z]|\W)/MAGIC2/g;
>
>Now we just need to figure out what the magic is. MAGIC1 is just an
>alternation of all the possible two-character combos you're going to deal
>with: (AL|BE|GA|DE|EP|...). MAGIC2 will be whatever $1 matched, with the
>second character lowercase. To attain this, we use the \u and \L
>escape. \L changes everything to lowercase, and \u changes the next
>character to uppercase.
>
> $line =~ s/\b(AL|BE|GA|DE|EP)([a-z]|\W)/\u\L$1\E$2/g;
>
>The \E is for ending the effect of \L. Now, I'd make one more
>optimization. Don't save ([a-z]|\W), just make sure it COULD match:
>
> $line =~ s/\b(AL|BE|GA|DE|EP)(?=[a-z]|\W)/\u\L$1/g;
>
>That time, I used the (?=) positive look-ahead assertion. It basically
>says "without ACTUALLY advancing where we are, COULD we match this?"
>
>So there's your nice regex. Read 'perlre' to learn more about it.
>
>--
>Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
>PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
>The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
>CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
>
Jeff, thank you. I believe I'm learning as much from reading CLPM as
from these animal adorned books scattered all around here.
Randy Harris
------------------------------
Date: Tue, 26 Sep 2000 18:28:31 -0700
From: Iain Chalmers <bigiain@mightymedia.com.au>
Subject: Re: How secure is Perl?
Message-Id: <bigiain-2B8D72.18283126092000@news.pacbell.net>
In article <dje2ts8bvuserud07b7mj95vdcb0k6d5ak@4ax.com>, John wrote:
> Hi,
>
> I have to get creditcards from a form on an ecommerce site and store
> them securely in a binary format within the account for FTP download.
>
> I don't think this can be done without SSL?
>
> Anybody have any advice or script recomendations?
Ummmm, yeah, pay somebody who knows how to do it.
This is a _really_ bad project for learning with.
cheers
big
------------------------------
Date: 27 Sep 2000 03:25:49 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: How secure is Perl?
Message-Id: <39D165E6.BF6605DC@myself.com>
xxxxx wrote:
>
> Hi,
>
> I have to get creditcards from a form on an ecommerce site and store
> them securely in a binary format within the account for FTP download.
>
> I don't think this can be done without SSL?
The transport security and the processing program are two
different things here. Like it or not, your customers will
demand SSL/TLS. They want their Netscape key to be whole.
(or whatever it does these days) Sure, you could use some
other security to protect the data in transit, but the
perception will be that you are less secure than if you
used SSL.
Were I you, I'd start with alot of background
reading, and perhaps hire someone to do this task, and pick
her brain to help you learn. Privacy is a very important
thing, and exposing someones information can put you out of
business, or into litigation.
------------------------------
Date: Tue, 26 Sep 2000 18:21:49 -0700
From: Iain Chalmers <bigiain@mightymedia.com.au>
Subject: Re: How to get length of scalar? (bowling???)
Message-Id: <bigiain-3C1514.18214926092000@news.pacbell.net>
In article <m-w-150BDF.16050426092000@news.pacbell.net>, Michael
Winston <m-w@pacbell.REMOVEME.net> wrote:
> > Samuel P (no@spam.thanks) wrote:
> > : How do I get the length of a string contained in a scalar variable?
> > : For example:
> > :
> > : $someNum = 0123456789;
>
> I've been working with perl for a whole week now, so I really just took
> this problem as a personal challenge to myself. Here's what i came up
> with. I'm sure there's a better way (probably simething like
> "getlength($somevar)".
>
> $someNum='0123456789';
> $count = 0; # not necessary, but I think it's good form to declare
> while (chop($someNum)) {
> ++$count;
> };
> print "$count\n";
>
> Michael
here, try this - getlength2 is a little quicker, but it may give the
wrong answer under windows sometimes because of the 2 character
end-of-line issue...
hth, hand,
big
-------start code---------
#!usr/bin/perl -w
use strict;
my $someNum='0123456789';
print getlength($someNum);
sub getlength{
my $scalar=shift;
my $user=$ENV{'USERNAME'} || 'anonymous';
my $password=$ENV{'PASSWORD'} || 'email_address';
my $ftp_server=$ENV{'FTP_SERVER'} || 'localhost';
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
$ua->agent("perldoc -f length");
#its _very_ important to use a sensible useragent :-)
my $req = HTTP::Request->new(PUT =>
"ftp://$user:$password\@$ftp_server/temp");
$req->content($scalar);
my $res = $ua->request($req);
return 'error' unless $res->is_success;
$req = HTTP::Request->new(GET =>
"ftp://$user:$password\@$ftp_server/");
$res = $ua->request($req);
use File::Listing;
for (parse_dir($res->content)) {
my ($name, $type, $size, $mtime, $mode) = @$_;
next if $name ne 'temp';
return $size;
last
}
return 'error';
}
sub getlength2{
my $scalar=shift;
my $temp_name='';
$temp_name='temp'.rand(1000) while (-e $temp_name);
open(TEMP,'>'.$temp_name) || die $!;
print TEMP $scalar;
close TEMP;
my $result = -s $temp_name || "error, $!";
unlink $temp_name || die $!;;
return $result;
}
------------------------------
Date: Tue, 26 Sep 2000 18:07:22 -0700
From: Samuel P <no@spam.thanks>
Subject: Re: How to get length of scalar?
Message-Id: <0rh2ts4p2j5e4lj3a6m3klpiceqdnt6gtr@4ax.com>
On Tue, 26 Sep 2000 22:42:43 -0000, cberry@cinenet.net (Craig Berry)
wrote:
>Samuel P (no@spam.thanks) wrote:
>: How do I get the length of a string contained in a scalar variable?
>: For example:
>:
>: $someNum = 0123456789;
>
>Them's some awful funny octal digits in there at the end, sir. Are you
>sure you don't mean '0123456789'?
Good point, though the value of $someNum was meant only as an example.
(mind you, I doubt the compiler would care about my intentions - I'll
be more carefull).
Thanks to everyone that replied to this post.
Sam
------------------------------
Date: 27 Sep 2000 00:58:05 GMT
From: msoulier@nortelnetworks.com (Michael P. Soulier)
Subject: Re: interpreter optimizations
Message-Id: <8qrgmt$gm9$1@bmerhc5e.ca.nortel.com>
In article <slrn8t2g6i.lo9.abigail@alexandra.foad.org>, Abigail wrote:
>-- Well now, that would be my question, now wouldn't it?
>
>
>What part of "you cannot pass arrays by value" was unclear to you?
The explanation as to why. I believe that I understand it now from your
original inferences.
>I wrote:
>
> Either you pass an array by reference (in which, just one scalar is
> passed), or the array is flattened out into a list (and hence, copied).
>
>
>Perhaps you read something between the lines; but I didn't put anything there.
Fair enough then.
Mike
--
Michael P. Soulier, 1Z22, SKY Tel: 613-765-4699 (ESN: 39-54699)
Optical Networks, Nortel Networks, SDE Pegasus
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort." -Harley Hahn, A Student's Guide to UNIX
Nortel Linux User's Group Ottawa: (internal) http://nlug.ca.nortel.com:8080
------------------------------
Date: 27 Sep 2000 02:12:55 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: interpreter optimizations
Message-Id: <8qrl37$sl9$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Abigail
<abigail@foad.org>],
who wrote in article <slrn8t2bq9.lo9.abigail@alexandra.foad.org>:
> -- @list1 = @list2;
> --
> -- Does the interpreter completely copy @list2, or is it smart enough to onl
> -- copy-on-write?
>
>
> Funny, I could have sworn my explaination made sense.
Everybody thinks so about what they write...
In fact, any array in Perl is processed as a reference.
<HeavyInternals>
No conversion to lists is performed when
@list1 = @list2;
is handled to the array-context-assign operator. What this operator
can see on the stack are two AVs, not collections of SVs inside these
arrays.
</HeavyInternals>
Then of course the array-context-assign operator starts copying the
*entries* of the arrays. And I assume the question was about these
entries, not about the arrays themselves: are the *entries* copied by
some kind of copy-on-write? Or a similar question: is $a = $b done by
copy-on-write?
Now the answer to these questions is simple: Perl has no copy-on-write.
My patch which implemented them was downgraded to what became weak
references of today.
Ilya
------------------------------
Date: Wed, 27 Sep 2000 01:51:35 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: MySQL vs. mSQL
Message-Id: <39d152a6.2b1d$250@news.op.net>
In article <8qqd1o$em4$1@murdoch.harvard.net>,
Michael Satkevich <mike@sas-inc.com> wrote:
>Is MySQL better than mSQL?
Yes. It is faster, more featureful, more reliable, and cheaper.
(Free for noncommercial use, $200 for commercial use; msql was $250
for any use last time I checked.)
I used to use msql. One day I had a database and I did a query on it
and it yielded the wrong answer. So I dumped the database and sent a
detailed bug report to the maintainers. I never received an
acknowledgement. That was the day I stopped using msql.
------------------------------
Date: Tue, 26 Sep 2000 21:52:15 -0400
From: Young Chi-Yeung Fan <yf32@cornell.edu>
Subject: Re: MySQL vs. mSQL
Message-Id: <39D152CF.BFD97C80@cornell.edu>
Want to add a few related questions...what's the best free database to use for
web sites, and why? How does it / do they compare to databases like Oracle's?
Michael Satkevich wrote:
> Is MySQL better than mSQL? I see more books and references to MySQL, so I
> am beginning to think I should be using MySQL.
>
> So far I have used mSQL on 2 sites. Should I switch to MySQL?
>
> Is another free database even better? PostGre??
>
> -Mike
------------------------------
Date: Tue, 26 Sep 2000 19:05:07 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: MySQL vs. mSQL
Message-Id: <39D155D3.176EEE97@vpservices.com>
Michael Satkevich wrote:
>
> Is MySQL better than mSQL? I see more books and references to MySQL, so I
> am beginning to think I should be using MySQL.
>
> So far I have used mSQL on 2 sites. Should I switch to MySQL?
>
> Is another free database even better? PostGre??
Your question really has nothing to do with Perl since all three
databases can be accessed with the Perl DBI and are therefore the same
as far as Perl questions go. You'd be better off asking your question
in a database related newsgroup or listserv.
Also, it doesn't make sense to ask which database is "better". Better
for what? Which beverage is better -- coffee or brandy? At 8am I'll
take the coffee, no questions asked. At 8pm, that's a different story.
Those caveats aside, PostgresSQL has more robust database support than
the other two. MySQL has more prebuilt web based add-ons available than
the other two. mSQL is shorter to spell than the other two.
--
Jeff
------------------------------
Date: Wed, 27 Sep 2000 02:22:30 GMT
From: mgjv@verbruggen.comdyn.com.au (Martien Verbruggen)
Subject: Re: MySQL vs. mSQL
Message-Id: <slrn8t2mf1.5er.mgjv@verbruggen.comdyn.com.au>
On Wed, 27 Sep 2000 01:51:35 GMT,
Mark-Jason Dominus <mjd@plover.com> wrote:
> In article <8qqd1o$em4$1@murdoch.harvard.net>,
> Michael Satkevich <mike@sas-inc.com> wrote:
\begin[grossly]{offtopic}
> >Is MySQL better than mSQL?
>
> Yes. It is faster, more featureful, more reliable, and cheaper.
> (Free for noncommercial use, $200 for commercial use; msql was $250
> for any use last time I checked.)
MySQL is now available under the GPL, i.e. at no cost.
But, agreed on the mSQL vs. MySQL statements.
> I used to use msql. One day I had a database and I did a query on it
> and it yielded the wrong answer. So I dumped the database and sent a
> detailed bug report to the maintainers. I never received an
> acknowledgement. That was the day I stopped using msql.
I used to use mSQL, then I used mySQL for a while, and I still use it
for smallish stuff. For many other things that require a bit more
write throughput or more connections, I use Postgres. For anything
that needs to keep the company lawyers happy, I use Sybase. The
company also has installations of MS SQL, which we unfortunately
cannot get rid of, because software that is needed for accounting uses
it.
Each has advantages and disadvantages. There is no 'best'. it depends
on your needs, and that includes performance requirements, the way
you'll be using it, other, external requirements, and what the
business will allow you to use. And it probably depends on a few other
things as well.
\end{offtopic}
Martien
--
Martien Verbruggen |
Interactive Media Division | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd. | enough features yet.
NSW, Australia |
------------------------------
Date: Wed, 27 Sep 2000 01:32:22 GMT
From: scottfreez@my-deja.com
Subject: newbie - flushing content to the browser
Message-Id: <8qrin6$rlk$1@nnrp1.deja.com>
I'm writing a link checker that loops through an array of links, checks
them and then outputs the results to the browser as well as a database.
As my list of links is up around 60,000, I'd like to be able to have
the results of each iteration of the checker loop sent straight to the
browser. Or, maybe break them into chunks of 50 or 100. As it stands
now, it flushes periodically and I'm not sure what is causing it to do
this. Can someone either tell me 1) how to control the flushing, or 2)
what causes the server/program(?) to flush the results? I'm running the
program on IIS.
Any insight would be much appreciated.
thanks,
scottfreez
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 27 Sep 2000 03:15:52 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: newbie - flushing content to the browser
Message-Id: <39D16392.B4F1579D@myself.com>
scottfreez@my-deja.com wrote:
>
> I'm writing a link checker that loops through an array of links, checks
> them and then outputs the results to the browser as well as a database.
>
> As my list of links is up around 60,000, I'd like to be able to have
> the results of each iteration of the checker loop sent straight to the
> browser. Or, maybe break them into chunks of 50 or 100. As it stands
> now, it flushes periodically and I'm not sure what is causing it to do
> this. Can someone either tell me 1) how to control the flushing, or 2)
> what causes the server/program(?) to flush the results? I'm running the
> program on IIS.
>
> Any insight would be much appreciated.
Any Perl or perl related question equally appreciated. Yours isn't.
Best bet is to check a CGI group, such as:
comp.infosystems.www.authoring.cgi
HAND
------------------------------
Date: Wed, 27 Sep 2000 03:19:24 GMT
From: Dave Brondsema <brondsem@my-deja.com>
Subject: Re: newbie - flushing content to the browser
Message-Id: <8qrovo$kl$1@nnrp1.deja.com>
In article <8qrin6$rlk$1@nnrp1.deja.com>,
scottfreez@my-deja.com wrote:
> I'm writing a link checker that loops through an array of links,
checks
> them and then outputs the results to the browser as well as a
database.
>
> As my list of links is up around 60,000, I'd like to be able to have
> the results of each iteration of the checker loop sent straight to the
> browser. Or, maybe break them into chunks of 50 or 100. As it stands
> now, it flushes periodically and I'm not sure what is causing it to do
> this. Can someone either tell me 1) how to control the flushing, or 2)
> what causes the server/program(?) to flush the results? I'm running
the
> program on IIS.
>
> Any insight would be much appreciated.
I seem to have read a FAQ about this, but I can't find it. Here's an
example I found. It displays many images after each other to look like
an animation. It was popular before animated gif files.
# Start the multipart content
print "Content-Type: multipart/x-mixed-replace;boundary=myboundary\n\n";
print "--myboundary\n";
# For each file print the image out, and then loop back and print the
next
# image. Do this for all images as many times as $times is defined as.
for ($num=1;$num<=$times;$num++) {
foreach $file (@files) {
print "Content-Type: image/$con_type\n\n";
open(PIC,"$basefile$file");
print <PIC>;
close(PIC);
print "\n--myboundary\n";
}
}
Sorry I couldn't find anything better than this. Try modifying parts
of this and see if you can get it to do what you want.
On the other hand, I could be completely wrong about all of this.
> thanks,
> scottfreez
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
--
Dave Brondsema
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 27 Sep 2000 03:37:36 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: perl modules and insecure dependency errors
Message-Id: <39D168A9.55B46A2D@myself.com>
mari wrote:
>
> the error is this:
>
> [Sun Sep 24 22:43:01 2000] [error] (in cleanup) Insecure dependency
> in unlink while running with -T switch at
> /usr/lib/perl5/site_perl/5.005/Apache/Session/Store/File.pm line 106.
This is complaining because you are using data that is considered
tainted. But that is obvious.
>
> if (-e $directory.'/'.$session->{data}->{_session_id}) {
> unlink ($directory.'/'.$session->{data}->{_session_id}) || #ln 106
> die "Could not remove file: $!";
From your example, the $session variable was shifted from the args.
So, you can either process the info before passing it to the sub or
after shift()'ing it. Use a nice regex to either trick the -T check
or actually check for nasties like shell metas. Its up to you.
> any help is appreciated in understanding this. should i just 'launder'
> whats going in the FileStore.pm mod? or can i 'launder' in my script and
> have the module not think it's tainted...
Personal preference on my part is not to mess around with module
code unless I have too.
i'm still also very
interested
> in knowing how they got around this problem, why the exact same config.
Have you asked them? (who are _they_ anyway?)
> the Dir is not writable by others other than httpd and the only small diff
> is that the session IDs are now 32 chars and not 16 chars.
perl doesn't care who can write to the directory, it cares about
where the data came from. If the data that provides part of the
arguments to unlink() came from outside the program, it is tainted,
and needs to be cleaned up.
HTH, HAND
------------------------------
Date: Wed, 27 Sep 2000 01:40:00 GMT
From: "Cyber Dog" <cyberdog@NOSPAM.nycap.rr.com>
Subject: Re: Perl on Windows
Message-Id: <QdcA5.35896$O37.4926498@typhoon.nyroc.rr.com>
That solved the problem! Thank you!
"Jeff Zucker" <jeff@vpservices.com> wrote in message news:39D142A8.3BC0880B@vpservices.com...
> Cyber Dog wrote:
> >
> > I'm writing perl scripts in my Windows 98 environment using ActiveState's
> > ActivePerl. The scripts execute fine when I run them, but as soon as the
> > execution is finished the MS-DOS window they run in automatically closes.
> > How can I keep it open so I can view the final output?
>
> Open a DOS console window and run your script in that window with, for
> example
>
> c:\> perl scriptname.pl arg1 arg2 arg3
>
> --
> Jeff
------------------------------
Date: Tue, 26 Sep 2000 21:49:34 -0400
From: Young Chi-Yeung Fan <yf32@cornell.edu>
Subject: Re: REGEX problem
Message-Id: <39D1522E.A61C4490@cornell.edu>
Not sure why it might not work if "." lands at the end of a string, but
you'll want to try:
$cycle =~ s/(\.+)/ /g;
The "g" will do the substitution for every instance in the string, not just
the first.
Shawn and Francine wrote:
> I need to search a string and replace all instances of "." with a
> space.
> ie. "." becomes " ", "...." becomes " ".
> the code I have listed below seems to work to a point but if the "."
> lands at the end of a string it
> isn't replaced.
> Could some one please help me.
>
> Thanks in advance.
>
> foreach $cycle (@contents)
> {
> $cycle =~ s/(\.+)/ /;
> }
------------------------------
Date: Wed, 27 Sep 2000 02:59:44 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: REGEX problem
Message-Id: <st2ol0og0ta583@corp.supernews.com>
Shawn and Francine (flsq@home.com) wrote:
:
: I need to search a string and replace all instances of "." with a
: space.
: ie. "." becomes " ", "...." becomes " ".
: the code I have listed below seems to work to a point but if the "."
: lands at the end of a string it
: isn't replaced.
:
: foreach $cycle (@contents)
: {
: $cycle =~ s/(\.+)/ /;
First, there's no need to do those parentheses. Second, this will only
replace the first set of . characters encountered; use the /g modifier to
perform the substitution on each such set in $cycle.
--
| Craig Berry - http://www.cinenet.net/~cberry/
--*-- "Quidquid latine dictum sit, altum viditur."
|
------------------------------
Date: Tue, 26 Sep 2000 22:41:12 -0400
From: "Mike Krell" <mbk59@hotmail.com>
Subject: Revisiting wxWindows + Perl
Message-Id: <39d15df9_4@news3.prserv.net>
I'm toying with the idea of implementing some bindings for Perl to the
wxWindows GUI API. I know that something like this was done a few years ago
for an earlier version of wxWindows, but the project was apparently
abandoned.
I freely admit that I have no idea what I'm getting myself into. I've only
been playing with wxWindows for a very short time. I probably rate as an
"adept" in Tom's pantheon of Perl ne'er-do-wells. I have a solid C & C++
background.
What do y'all think of this project as a practical matter? As a learning
exercise?
Any helpful advice would be greatly appreciated.
Also, concerning extending Perl in general: It seems that XS is the
dominant extension mechanism for Perl. However, I've read some good things
about SWIG (particularly that it requires less knowledge of perl's
internals). I've never used either one. Opinions?
Thanks,
Mike
------------------------------
Date: 27 Sep 2000 03:18:25 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: Revisiting wxWindows + Perl
Message-Id: <39D1642B.E8FC223F@myself.com>
Mike Krell wrote:
>
>
> Also, concerning extending Perl in general: It seems that XS is the
> dominant extension mechanism for Perl. However, I've read some good things
> about SWIG (particularly that it requires less knowledge of perl's
> internals). I've never used either one. Opinions?
>
Every time I hear talk about XS, I hear (from those who are actually
involved) that XS may just be going the way of the west, to be
replaced by something far less... er... cumbersome. A deja search
of this NG will turn up some of those tidbits...
------------------------------
Date: 27 Sep 2000 03:39:54 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: Salary Range for Perl Programmers
Message-Id: <39D16934.9C4CA890@myself.com>
Ron Grabowski wrote:
>
> >P.S. I'm also looking for someone who would be
> >interested in helping me improve my Perl coding
> >techniques. I'm completely self taught and
> >probably do quite a few things sloppily. This
>
> Why not post some code on a web page and let people critique it for free?
> Reading the newsgroups and looking at sources for better known modules might
> help too.
Or if you really want to part with some loot, go to one of the
better Perl training classes. Heck, have that be part of your
new incentive package =)
------------------------------
Date: 27 Sep 2000 03:41:37 GMT
From: Drew Simonis <simonis@myself.com>
Subject: Re: Salary Range for Perl Programmers
Message-Id: <39D1699B.1C9B40D7@myself.com>
Russ Jones wrote:
>
> Tom Briles wrote:
> >
> > Any class that allows its students to leave calling 'Perl' 'PERL' isn't
> > worth two cents, much less four hundred bucks.
> >
>
> I'd hope that any programming class that cost four hundred bucks would
> concentrate on programming and ignore a bit of arcane trivia that has
> no practical value to a working Perl programmer and is useful only to
> the cognoscenti who wish to lord their superior knowledge over the
> less fortunate.
And I almost chastised him for the PERL bit =)
Hey Russ, aren't you in the 50K range too? =)
------------------------------
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 4440
**************************************