[13449] in Perl-Users-Digest
Perl-Users Digest, Issue: 859 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 20 19:07:24 1999
Date: Mon, 20 Sep 1999 16:05:13 -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: <937868713-v9-i859@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 20 Sep 1999 Volume: 9 Number: 859
Today's topics:
Re: Языки программирования, технология разработки ПО и <cassell@mail.cor.epa.gov>
Re: Anomymous Hash <madebeer@igc.apc.org>
Re: Case insensitive SQL query mrbog@my-deja.com
Re: Case insensitive SQL query (Michael Stevens)
Changing Passwords from CGI Script with Perl? (Konstantin Wiesel)
Re: Changing Passwords from CGI Script with Perl? (Kragen Sitaker)
Connecting to P.O.S. Devices ? <pperchan@DynamicNet.net>
Re: Converting Perl pages from ODBC to OLE <cassell@mail.cor.epa.gov>
Re: CRAP Software <gellyfish@gellyfish.com>
File Upload <bhwang@prodigy.net>
formatting output using swrite() <ff@arraycomm.com>
Re: Help me please <makkulka@cisco.com>
How Do I Display Perl Results in a second Frame?? <jharmer@ican.net>
Re: How Do I Display Perl Results in a second Frame?? (Michael Stevens)
Re: How Do I Display Perl Results in a second Frame?? <mike@crusaders.no>
Re: how to create temporary cookie and destroy it <dwoods@ucalgary.ca>
Re: Looking for tools. (MauWolff)
Re: Math with Perl? <cassell@mail.cor.epa.gov>
Need a job programming perl? <indexfinger@usa.net>
Re: Perl and Win32 API <gellyfish@gellyfish.com>
Perl and WIN32 GUI <email@reply2.field>
Re: Perl Challenge makau@multimania.com
Re: Perl Module for MS Access? <gellyfish@gellyfish.com>
Re: perl related question now! (Abigail)
Re: perl related question now! <cassell@mail.cor.epa.gov>
Re: pl reads files on remote server? <cassell@mail.cor.epa.gov>
Re: Programmer's Editor scottlong@my-deja.com
Re: Query date for tommorow (Kragen Sitaker)
reading registry in Perl on WinNT <trice@nortelnetworks.com>
Re: Regulat Expressions and Tabulator Problems <cassell@mail.cor.epa.gov>
Re: Sorting on a string, by value. (Jim Matzdorff)
Re: Statistics for comp.lang.perl.misc <cassell@mail.cor.epa.gov>
Re: Statistics for comp.lang.perl.misc (Kragen Sitaker)
Re: target frame in URL redirection (Kragen Sitaker)
Re: target frame in URL redirection <flavell@mail.cern.ch>
Re: target frame in URL redirection <flavell@mail.cern.ch>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 20 Sep 1999 15:39:25 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Языки программирования, технология разработки ПО и многое другое
Message-Id: <37E6B79D.425779@mail.cor.epa.gov>
Aleksey Zvyagin wrote:
>
> Все о языках программирования C/C++, Delphi, Perl, Java, статьи, исходные
> тексты
> http://pingwin.net.ru/node/folder-0768/
> Технологии программирования: как разрабатывают софт в Майкрософт, CASE
> средства, о надежности ПО и многое другое:
> http://pingwin.net.ru/node/ProgTechno/
> Все это в самом дружественном, большом каталоге ПИНГВИН -
> http://pingwin.net.ru/
Sorry. Wrong place.
Jobs go to some newsgroup that has the word _job_ in it.
Obfuscated Perl contest entries go to TPJ, but you missed the
deadline.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 20 Sep 1999 14:25:40 -0700 (PDT)
From: Michael de Beer <madebeer@igc.apc.org>
Subject: Re: Anomymous Hash
Message-Id: <APC&1'0'50775db5'668@igc.apc.org>
Have you read the perldoc/man-page perldsc ?
In terms of what data structure to use, it would depend, IMO,
on how you are going to use the data later. a list of hash of hashes
might be good, but so might a list of list of lists, or maybe it would
be best to store the whole thing in a database.
-Michael
------------------------------
Date: Mon, 20 Sep 1999 21:55:07 GMT
From: mrbog@my-deja.com
Subject: Re: Case insensitive SQL query
Message-Id: <7s6afm$52p$1@nnrp1.deja.com>
No, the goal isn't to solve people's perl problems, it's to solve their
problems! If one of "the regulars" has the answer to a question that is
tangentially related to perl, as mine was, then it does just as much
good for him to answer it as anyone.
Remember, there are people asking perl questions on non-perl newsgroups
as well, so the argument that "oh there are sooo many questions" is
completely ridiculous.
In article <7rvbtt$m25@junior.apk.net>,
catfood@apk.net (Mark W. Schumann) wrote:
> In article <37E2E094.DF9BFD72@mail.cor.epa.gov>,
> David Cassell <cassell@mail.cor.epa.gov> wrote:
> >mrbog@my-deja.com wrote:
> >[snip of blather]
> >> > >YES, I DO, because there are 2400 people to answer them.
> >> >
> >> > More like a couple dozen. And they're here to help answer
questions
> >> > about Perl. Why make busy-work for them? They're doing a nice
thing
> >> > for us. It's only fair to avoid making extra demands.
> >>
> >> couple dozen?! Try a couple thousand. The more people posting
> >> questions, the more people there are to answer them.
> >
> >Hardly. If you knew enough Perl you would notice that many of
> >the people who only drop in to ask one question and stick around
> >to answer one to three others, give the WRONG answers! So
> >then the 'couple dozen' not only have to answer those same
> >questions, but have to go back and fix the wrong answers,
> >pointing out why they were not good things to tell people to do.
>
> I think the main thing is that the few regulars who give most of
> the useful answers here are helping the rest of us for free.
>
> The least we could do is to apply a little self-filtering, to avoid
> wasting their time. Sticking to Perl questions in comp.lang.perl
> sounds like a reasonable way to start.
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 20 Sep 1999 22:29:51 GMT
From: mstevens@ashre.demon.co.uk (Michael Stevens)
Subject: Re: Case insensitive SQL query
Message-Id: <slrn7uddav.18s.mstevens@swirl.internal.fict>
On Mon, 20 Sep 1999 21:55:07 GMT, mrbog@my-deja.com <mrbog@my-deja.com> wrote:
>No, the goal isn't to solve people's perl problems, it's to solve their
>problems! If one of "the regulars" has the answer to a question that is
>tangentially related to perl, as mine was, then it does just as much
>good for him to answer it as anyone.
Does the name of the group not suggest anything to you? People
come here to discuss perl. Why do you want to force them to talk
about other things?
>Remember, there are people asking perl questions on non-perl newsgroups
>as well, so the argument that "oh there are sooo many questions" is
>completely ridiculous.
Make the connection here or expect people to consider this silly.
------------------------------
Date: 20 Sep 1999 21:05:08 GMT
From: uzs8n8@uni-bonn.de (Konstantin Wiesel)
Subject: Changing Passwords from CGI Script with Perl?
Message-Id: <7s67i4$vbe@news.rhrz.uni-bonn.de>
I would like to change Passwords with Perl
but i dont know in detail how to proceed.
I was thinking about calling passwd
but how do i pass the parameters, the way
i tried it was not successful.
Then i thought about using the crypt function
and changing the passwd file directly but then i would
have to change the process id in order to be able to
modify the passwd file.
Or is there an easier direct way usind built in functions
of any module.
Thanks in advance
Konstantin Wiesel
Email:uzs8n8@uni-bonn.de
------------------------------
Date: Mon, 20 Sep 1999 21:18:15 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Changing Passwords from CGI Script with Perl?
Message-Id: <rwxF3.22904$N77.1812358@typ11.nn.bcandid.com>
In article <7s67i4$vbe@news.rhrz.uni-bonn.de>,
Konstantin Wiesel <uzs8n8@uni-bonn.de> wrote:
>I would like to change Passwords with Perl
>but i dont know in detail how to proceed.
>
>I was thinking about calling passwd
>but how do i pass the parameters, the way
>i tried it was not successful.
Use Expect.pm.
>Then i thought about using the crypt function
>and changing the passwd file directly but then i would
>have to change the process id in order to be able to
>modify the passwd file.
No, you need to change the uid, by making the Perl script setuid root.
Don't do this unless you really know what you're doing. My guess is
that if you think you need to change the pid, you don't.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 20 Sep 1999 17:15:59 -0400
From: "Peter M. Perchansky" <pperchan@DynamicNet.net>
Subject: Connecting to P.O.S. Devices ?
Message-Id: <rud9131alg753@news.supernews.com>
Greetings:
Is there a web site, book, or other sources that discuss how you can connect
Point-of-Sale devices (cash register, bar code, etc.) to an application
written in Perl?
Thank you.
P.S. If convenient, please copy reply to email.
--
===================================
Peter M. Perchansky, Microsoft FrontPage MVP
Dynamic Net, Inc.
------------------------------
Date: Mon, 20 Sep 1999 15:37:16 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Converting Perl pages from ODBC to OLE
Message-Id: <37E6B71C.407997F9@mail.cor.epa.gov>
jakoye wrote:
[snip of problem]
> problem is, I cannot find any examples anywhere (O'Reilly book
> Programming Perl, various websites inc. www.perl.com &
> www.activestate.com) on how to change, or even establish, database
The docs for the DBI module may be what you want. If not, go
to www.perl.com and use the search facility to look for links
for 'tutorial' and/or 'database'.
> connection calls. Here's some of the code in the pages as it is now
> using ODBC connection:
>
> #!/usr/local/bin/perl
> use Win32::ODBC;
This only tells Perl to import the subroutines et al. exported
by the Win32::ODBC module. It doesn't make any database
connection.
> //This is at the beginning of the page. I assume I would change ODBC to
> //OLEDB, right?
Not that I know of. OLE is not a database connectivity system
per se. You're still going to want to use either Win32::ODBC
or one of the DBD::* modules to make the connection. If you
want to interface with Word or Excel, then you'd do that via
OLE.
> $DSN = "BusinessMgmt";
> $db = new Win32::ODBC($DSN);
>
> //This is later in the code when a database connection is actually
> //being made. Again, I would assume I change ODBC to OLEDB, right?
Well, you'd need to change the module name. But I don't know
of an OLEDB module anywhere.
> I don't see any other code within the page that indicates it has
> anything to do with database connectivity. I don't understand how the
> Perl page could know where the database is since it is never given a
> path to it, but again, I do not know Perl so maybe I'm missing
> something.
Maybe. But somewhere in the code someone has to give the Perl
program a data source to go look in.
> Just changing ODBC to OLEDB everywhere it occurs in the code seems too
> simple, but it's also the obvious thing to do. Am I right here or
> sniffing up the wrong tree? Any help would be appreciated. If anyone
> can point me to online resources which deal with database connections
> within Perl, I would appreciate that as well.
I think you're going in the wrong direction. I don't see how
switching from a database connectivity interface to OLE is
going to solve your database programming problem.
Sorry I can't be of more help, but you haven't given us much
to work with here.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 20 Sep 1999 21:49:13 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: CRAP Software
Message-Id: <7s6a4p$320$1@gellyfish.btinternet.com>
On 20 Sep 1999 05:16:54 GMT David H. Adler wrote:
> In article <EagKUAAoSS53EwMh@elmbronze.demon.co.uk>, Dave Eastabrook wrote:
>>on Sun, 19 Sep 1999 Neil <neil@pacifier.com> wrote
>>>
>>>> JS> 'A young woman walks into a bar and asks the barman for a double
>>>> JS> entendre so he gave her one'
>>>
>>>> one what?
>>>
>>>I think the idea is that she asked for a *double* but only got *one*.
>>
>>Man walks into a bar. "Ouch". It was an iron bar.
>
> Two guys walk into a bar. You'd think the second one would have seen
> it.
>
An Englishman, an Irishman , a Scotsman and a Welshman all walk in to a
bar and the barman says 'This is got to be some kind of a joke' ...
(Enough ... )
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Mon, 20 Sep 1999 18:48:26 -0400
From: Burt Hwang <bhwang@prodigy.net>
Subject: File Upload
Message-Id: <37E6B9BA.AF5ABAA0@prodigy.net>
Objective: I need to pass a file from a webpage along with some other
data (i.e, email address, name, etc.) and store the uploaded file on the
web server.
Problem: I've checked out cgi-lib.pl and used a sample code to display
(on the user's browser) the uploaded file but I can't figure out how to
actually store the uploaded file on the server.
Can anyone help? Am I providing enough info? Here's the PERL code
which I use to handle the user's data:
-------------------------------------------------------------------------
require "../cgi-lib.pl";
# When writing files, several options can be set... here we just set one
# Limit upload size to avoid using too much memory
$cgi_lib'maxdata = 524288;
# Start off by reading and parsing the data. Save the return value.
# We could also save the file's name and content type, but we don't
# do that in this example.
$ret = &ReadParse;
# A bit of error checking never hurt anyone
&CgiDie("Error in reading and parsing of CGI input") if !defined $ret;
&CgiDie("No data uploaded",
"Please enter it in <a href='fup.html'>fup.html</a>.") if !$ret;
# Munge the uploaded text so that it doesn't contain HTML elements
# This munging isn't complete -- lots of illegal characters are left
as-is.
# However, it takes care of the most common culprits.
$in{'upfile'} =~ s/</</g;
$in{'upfile'} =~ s/>/>/g;
# Now produce the result: an HTML page...
print &PrintHeader;
print &HtmlTop("File Upload Results");
print <<EOT;
<p>You've uploaded a file. Your notes on the file were:<br>
<blockquote>$in{'note'}</blockquote><br>
<p>The file's contents are:
$in{'upfile'}
EOT
print &HtmlBot;
-----------------------------------------------------------------------------
Here's my HTML:
-----------------------------------------------------------------------------
<FORM ENCTYPE="multipart/form-data" NAME=upload METHOD=POST
ACTION="cgi-bin/processOrder">
<INPUT TYPE=hidden NAME=hiddenVar VALUE=nothing>
File Name:<INPUT NAME=upfile TYPE=file><P>
<INPUT TYPE=submit>
</FORM>
-----------------------------------------------------------------------------
TIA.
------------------------------
Date: Mon, 20 Sep 1999 22:17:44 GMT
From: Farhad Farzaneh <ff@arraycomm.com>
Subject: formatting output using swrite()
Message-Id: <37E6B288.59D3A966@arraycomm.com>
Hello,
I'm trying to format output to a string as I would with a standard
format and write(). I would like to use field continuations so that more
lines are printed until all the fields are printed out completely.
Here is an example script I've used for testing. The desired output is:
aaaa xxx yy
aaaa
a
I can't figure out an elegant way of doing this. The script below does
work but it sure is ugly - there must be a good way of doing this with
swrite(). Any help would be appreciated. Thanks.
----
#!/bin/perl
use Carp;
use strict;
my ($a,$b,$c);
$a = "aaaaaaaaa";
$b = "xxx";
$c = "yy";
if ( 0 ) {
format STDOUT =
^<<< ^||| ^>>>
$a, $b, $c
^<<< ^||| ^>>> ~~
$a, $b, $c
.
write STDOUT;
} else {
my $format = " ^<<< ^||| ^>>>\n";
my $formatb = " ^<<< ^||| ^>>>~~\n";
$^A = "";
formline($format,$a,$b,$c);
print $^A;
$^A = "";
formline($formatb,$a,$b,$c);
print $^A;
}
sub swrite {
croak "usage: swrite PICTURE ARGS" unless @_;
my $format = shift;
$^A = "";
formline($format,@_);
return $^A;
}
--
Farhad
------------------------------
Date: Mon, 20 Sep 1999 15:37:14 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: Help me please
Message-Id: <37E6B71A.F264BCDA@cisco.com>
{ Frenzyr wrote:
> $SUBJECT="Thank you";
> $REPLYTO="info@blablabla.com;
The @ needs to be escaped.
> $TO=$FORM{'email'};
The names in $TO should have @ escaped.
--
------------------------------
Date: 20 Sep 1999 21:47:24 GMT
From: "jharmer" <jharmer@ican.net>
Subject: How Do I Display Perl Results in a second Frame??
Message-Id: <01bf03b1$cd47e940$2e539a8e@gordthat>
For example, if in one frame I had 5 URL's (pointing to a perl program), I
would like to display a list in the second frame that would display the URL
Name as they are clicked in the first frame.
First Frame Second Frame
perl_prg?test1 test2
perl_prg?test2 test3
perl_prg?test3 test1
Thanks, Jim
------------------------------
Date: 20 Sep 1999 22:17:19 GMT
From: mstevens@ashre.demon.co.uk (Michael Stevens)
Subject: Re: How Do I Display Perl Results in a second Frame??
Message-Id: <slrn7udcjf.18i.mstevens@swirl.internal.fict>
On 20 Sep 1999 21:47:24 GMT, jharmer <jharmer@ican.net> wrote:
>For example, if in one frame I had 5 URL's (pointing to a perl program), I
>would like to display a list in the second frame that would display the URL
>Name as they are clicked in the first frame.
>First Frame Second Frame
>perl_prg?test1 test2
>perl_prg?test2 test3
>perl_prg?test3 test1
What does this have to do with perl?
------------------------------
Date: Tue, 21 Sep 1999 01:07:41 +0200
From: "Trond Michelsen" <mike@crusaders.no>
Subject: Re: How Do I Display Perl Results in a second Frame??
Message-Id: <V3zF3.1181$1s6.10834@news1.online.no>
jharmer <jharmer@ican.net> wrote in message
news:01bf03b1$cd47e940$2e539a8e@gordthat...
> For example, if in one frame I had 5 URL's (pointing to a perl program), I
> would like to display a list in the second frame that would display the
URL
> Name as they are clicked in the first frame.
You can't do this with Perl. You can only control the output-target with
HTML-code.
Look up the A and FORM tags in any HTML-documentation you can find. I'm sure
they will mention the TARGET attribute and how you use it.
http://www.w3.org/TR/REC-html40/present/frames.html#h-16.3
--
Trond Michelsen
------------------------------
Date: Mon, 20 Sep 1999 16:02:35 -0700
From: Dan Woods <dwoods@ucalgary.ca>
Subject: Re: how to create temporary cookie and destroy it
Message-Id: <7s6b40$8ac@ds2.acs.ucalgary.ca>
Jonathan Stowe wrote:
> On Fri, 17 Sep 1999 23:29:31 -0400 ken wrote:
> > Can someone show me how to create a temporary cookie in perl so I can
> > passing the value from page to page in my website, and how to delete the
> > cookie from the user browser when they leaving my website. Thanks.
>
> I would first look in the CGI FAQ:
>
> <http://www.webthing.com/tutorials/cgi-faq.html>
The correct address is (small typo)
http://www.webthing.com/tutorials/cgifaq.html
Thanks...Dan.
http://www.4loops.com
------------------------------
Date: 20 Sep 1999 19:41:07 -0300
From: mauriciowolffNOSPAM@hotmail.com (MauWolff)
Subject: Re: Looking for tools.
Message-Id: <37e6b803@irc.ez-poa.com.br>
Perl Builder from solutionsoft lets you test the script debbuging line by line,
and has a lot of other great stuff, inclding a time-saver wizard.
It saves a lot of time for me.
http://www.solutionsoft.com
+++
mauwolff
In article <37CEEE15.8E2FE9C9@arrakis.es>, mogrim@arrakis.es says...
>
>Sidney Orret wrote:
>>
>> Hello
>>
>> What are the best enviroment and tools for PERL's programming??????????????
>>
>> Currently I am using Viotix PERLPad 3.5, and the Programmer's File Editor
>> 1.01, but I am looking for something with more facilities as sintax highligt
>> for example. Also I am looking for a shareware, and better for a freeware.
>>
>
>UltraEdit has syntax highlighting, amongst a great deal more things.
>Best lightweight editor I've seen for Windows. It's shareware, BTW.
>
>
>JimC
------------------------------
Date: Mon, 20 Sep 1999 15:15:55 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: ulugeyik@ulugeyik.org
Subject: Re: Math with Perl?
Message-Id: <37E6B21B.1A98906D@mail.cor.epa.gov>
[courtesy cc to poster's Reply-To address]
Turgut Durduran wrote:
>
> any experiences with number crunching, mathematical simulations,
> monte-carlo etc with perl? how does it rate??? the ease of
> programming, data file handling capabilities etc make it attractive for
> me but is it a lot slower than C? are there any numerical recipes type of
> libraries written for perl? IF not, is it easy to embedd the C libraries
> into perl?
Ease of programming? Yes.
data and file handling capabilities? Yes.
A lot slower than C? Can be. Using modules which are written
in C rather than Perl can help some here, but nothing will make
Perl run as fast as C. You may be able to make it run almost as
fast as C++, depending on the modules and the code. You ought to
be able to make it much faster than Java.
Numerical recipes? Yes. Not only is there the new 'wolf'
book from O'Reilly, but there are lots of helpful Perl modules
at CPAN to choose from. Start at the Math::* hierarchy.
The PDL module can help you too.
Embedding C in Perl? Yes. A common solution for lots of
computation. Write the interface in Perl, and the number-
cruncher in C. Perl comes with a couple docs which will help
you here. Type 'perldoc perl' to get a list of the docs.
then start with 'perldoc perlxstut' and go from there.
> also, how is the complex math module?
Nice. But not as fast as if your computational part was
written in pure C. Or pure FORTRAN, for that matter, although
I may be flamed for saying so. ;-)
In my experience, it is often faster to do the coding in Perl
and let the computer run a tad longer while I am elsewhere,
than to code in another language and waste more of *my* time.
But that changes as the size of the computational task gets
ever larger...
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 20 Sep 1999 16:39:09 -0500
From: "Joseph Bannon" <indexfinger@usa.net>
Subject: Need a job programming perl?
Message-Id: <496BCC0E3249EC98.F76F301CDE588BB0.E384E1EC29D6E898@lp.airnews.net>
Post your resume.
http://forums.indexfinger.com/bigtalker.cgi?action=viewcategory&category=31
--
---------------------------------------------------
Copyright 1997-99 - Index Finger, Inc.
The Leader In Website Software Development
> Visit us online at http://www.indexfinger.com
BigTalker.com - Bulletin Board Software
> http://www.bigtalker.com
BigPurchase.com - Shopping Cart Software
> http://www.bigpurchase.com
IF's Webmaster Forums, powered by BigTalker
> http://forums.indexfinger.com
Webmaster Resources, powered by IF Pro
> http://directory.indexfinger.com
---------------------------------------------------
Distribution prohibited - All information contained
within this message is confidential and proprietary
information of the sender. It may not be used by
you other than the purpose for which this document
was intented.
---------------------------------------------------
------------------------------
Date: 20 Sep 1999 21:19:04 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl and Win32 API
Message-Id: <7s68c8$31h$1@gellyfish.btinternet.com>
On Mon, 20 Sep 1999 13:00:05 -0400 Jon Banquer wrote:
> Is there a good book available on this subject ?
>
> Can Perl be compiled into an .exe ?
>
> I tried the FAQ and got this :
>
> "Perl for Win32 FAQ from Evangelo Prodromou is currently
> missing. We are trying to contact the author, but he too is
> missing. "
>
The Activestate distribution comes with a Win32 specific FAQ that is
based on that of Evangelo I believe.
/j\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Mon, 20 Sep 1999 23:55:56 +0200
From: "Joe Yates" <email@reply2.field>
Subject: Perl and WIN32 GUI
Message-Id: <37e6adab.0@news.dada.it>
I am developing a system for the easy use of Perl from other languages in
the Windows environment.
I use this system on Windows 95/98/2000 indifferently and call functions
from programs written in Visual basic and C++.
The thing which I really consider is a step forward is that I can get return
values from the functions I call.
Another is that I do not spawn a separate process when calling perl: if
you're programming for GUI, little black windows which pop up are not
attractive and are confusing to the user.
I am trying to find out if there is sufficient interest in this stuff before
contributing it and this depends on how many people use, or would like to
use, perl as a tool in Windows programming.
------------------------------
Date: Mon, 20 Sep 1999 21:52:32 GMT
From: makau@multimania.com
Subject: Re: Perl Challenge
Message-Id: <7s6aar$50n$1@nnrp1.deja.com>
> >Damn, seems I am far newbier than I ever thought :-)
>
> reviewing your short but colourful posting history to c.l.p.misc it
> would seem very apparent .. if you thought you were anything but a
> newbie then - yes - you are far newbier than you ever thought
Yeah, but I am pretty sure that in a very near future, you will need my
help. As we say, newbies become knowbies...
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 20 Sep 1999 21:05:43 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Module for MS Access?
Message-Id: <7s67j7$31e$1@gellyfish.btinternet.com>
In comp.lang.perl.misc jdkronicz@my-deja.com wrote:
> Thanks to you and Eric for the responces. Just to clarify ... are you saying
> that using both DBD::ODBC and Win32::ODBC are suitable to use if I'm going to
> switch to a more robust database later or just DBD::ODBC?
>
DBD::ODBC allows you to switch to another DBI driver by switching the connect
string - it will also mean that your application will be portable to other
OS. To the DBI module ODBC is just another type of database - you supply
the DSN as part of the connect string. Also when you use a DBD driver for
another database sunch as Informix or Sybase you are using the native
database libraries as near as directly as you get without going through
the ODBC drivers first. With Win32::ODBC you always use ODBC (obviously)
and of course it is not portable to other OS ...
> Secondly, (please pardon the simplicity of the question) what do you mean
> when you say that they are both available from the active state repository?
> Does that mean that they are inherently a part of recent versions of Perl?
>
Neither DBI (and the various DBD::* drivers) nor Win32::ODBC are part of
the standard Perl distribution - they have to be installed separately.
If you have Activeperl then you can install straight off the net by using
the Perl Package Manager (PPM) e.g. :
C:\>PPM INSTALL DBD-ODBC
There are instructions for using PPM with the documentation the comes with
the Activestate Perl - you can also what modules are available for
installation in this manner via <http://www.activestate.com/packages>.
> Last question- I am constructing a website on my webhosts server. If I find
> a module that does some things I like would I want my webhost to install it
> or could I just upload it to my directory tree on there server? My webhost
> (Burlee) seems to be somewhat inresponsive to individual requests. They take
> the attitude that they will upgrade or whatever when they deem it is time.
> And based on that and my general lack of understanding in regards to using
> modules, I'm not sure if I'm going to have a problem.
>
Because both Win32::ODBC and DBD::ODBC contain some binary XS components
they will need to be installed properly (probably using PPM). I think
that a case can be made for installing these modules if your Hosting
Provider needs some persuasion as it does add value to the service ...
of course you will in all probability have to persuade them to set up
the DSN anyway. A spot of bribery will often help .
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Sep 1999 16:50:47 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: perl related question now!
Message-Id: <slrn7udb6g.bfi.abigail@alexandra.delanet.com>
Young-Soo Roh (ysroh@chat.carleton.ca) wrote on MMCCXI September MCMXCIII
in <URL:news:37E69E20.E7BA6455@chat.carleton.ca>:
;;
;; Anyway, thank you to the person above for being nice.
;; But, One thing, you don't have right to say "go away".
;; I hope you don't talk to people like that even if you don't see them.
You post Jeopardy style. Go away.
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 20 Sep 1999 15:48:13 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: perl related question now!
Message-Id: <37E6B9AD.1489A780@mail.cor.epa.gov>
Young-Soo Roh wrote:
> This is newsgroup for perl.
Yes. It is *not* for things which have as much relation to
Perl as they do to Java.
> I posted this message because I was wondering something can be done by perl cgi script.
Not quite. You asked a question that was more appropriate
for several other newsgroups, and were told so. Quite abruptly.
> Anyway, thank you to the person above for being nice.
> But, One thing, you don't have right to say "go away".
Why doesn't the unattributed person [who we all know]
have such a right, if you have a right to ask anything
you feel like, whether it is appropriate for this newsgroup
or not? Are you saying you have a right to free speech but
no one else does? Your post irritated someone a great deal,
and that someone let you know. Now you're doing *exactly*
the same thing. That post irritated you a great deal,
so you are letting that someone know. What is the difference?
> I hope you don't talk to people like that even if you don't see them.
> Loser.
I hope you don't talk to people like that even if you don't
see them. And I hope you learn what is appropriate to ask
in newsgroups and what is not. Note that I am not going
to continue by calling you a 'loser' also, as _ad_hominem_
arguments and name-calling are not appropriate here.
BTW, you posted Jeopardy-style, putting your words ahead of
the previous post. That's bad style in Usenet. You're
supposed to post in sequence, so that a logical thread can
be maintained. And you failed to attribute anyone except
yourself, which is also bad Usenet style. For more details,
you can read the intro materials in news.announce.newusers
or news.newsusers.questions .
And for CGI questions with no Perl programming content,
please ask in a CGI/HTML/web newsgroup in future.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 20 Sep 1999 15:19:02 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: pl reads files on remote server?
Message-Id: <37E6B2D6.D3EFB8BA@mail.cor.epa.gov>
Pascal wrote:
>
> Is it possible to read .pl or html files on a webserver or is it only
> possible to execute them.
>
> If so, how can they be read ? as if they were files that have to be
> opened ?
Kragen already gave the short answer. LWP::Simple or
LWP::UserAgent . But you need to see the critical point.
open() works on files in filesystems. HTTP gives you a
network of URLs which only *look* like they might be part of
a filesystem. You have to use HTTP to access any URL .
Hence open() alone is not the right tool.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 20 Sep 1999 21:55:20 GMT
From: scottlong@my-deja.com
Subject: Re: Programmer's Editor
Message-Id: <7s6ag3$52r$1@nnrp1.deja.com>
Try the CRiSP text editor. You can donload a free evaluation at
http://vital.com/download.htm.
In article <MPG.12405b3989eaf327989cb6@news-server>,
elephant@squirrelgroup.com (elephant) wrote:
> Randal L. Schwartz writes ..
> >Syntax highlighting for Perl. I'll believe it when I see it.
>
> thing is that with syntax highlighting (as with a lot of things)
> "useful" is a subset of "complete"
>
> --
> jason - elephant@squirrelgroup.com -
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 20 Sep 1999 21:35:05 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Query date for tommorow
Message-Id: <dMxF3.22927$N77.1814821@typ11.nn.bcandid.com>
In article <37E5F838.975C47F0@tiss.com>,
Dietmar Bestenlehner <bestenl@ibm.net> wrote:
>Maybe a simple question: I know how to query the current date
>(date_local).
What's date_local? What language is that from? (Not Perl, I guess.)
> But i need to know the date for tomorrow.
>How can i do this ???
localtime (time() + 24 * 60 * 60);
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 20 Sep 1999 17:40:40 -0400
From: Tony Rice <trice@nortelnetworks.com>
Subject: reading registry in Perl on WinNT
Message-Id: <37E6A9D8.CAF1D0B4@nortelnetworks.com>
Is it just an environment variable or do I need separate module to get
access to the registry by key?
------------------------------
Date: Mon, 20 Sep 1999 15:02:53 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Regulat Expressions and Tabulator Problems
Message-Id: <37E6AF0D.E98AD395@mail.cor.epa.gov>
Wise Guy wrote:
>
> Hello Michael !
>
> Try something like this :-
But not *too* much like it. :-)
Obviously, 'use strict;' was omitted. Not a good idea.
> # Read all lines into aan array
Aan? Are you one of *them*? Flinx has been wondering
where you guys were.
> $File = "a.txt";
Single quotes will do when no interpolation is needed.
> open(FILE, "<$File") || die "Cannot open $File\n";
A $! would help identify the reason why the open() failed.
> @FileList = <FILE>;
Not a good idea in the general case. Unless you're sure
you'll never run out of memory, I'd suggest processing
the file line-by-line.
> close FILE;
>
> # Compile the whole bunch into one string
> $AllTabs = join "\t", @FileList;
> # Remove all new line characters
> $AllTabs =~ s/\n//g;
[1] This wasn't what the poster wanted, AFAIK. He
really wanted to learn about the split() function
and do processing on each line. Not to join all the
lines.
[2] This isn't optimal either. If you want to do this,
try something like:
{ undef $/; $filelines = <FILE>; }
> # This is your list
> @Variables = split "\t", $AllTabs;
Ummm, you do know that split() takes a regex rather than a
string as its first element, right? As in
split /\t/, $filelines
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 20 Sep 1999 21:34:32 GMT
From: syran@best.com (Jim Matzdorff)
Subject: Re: Sorting on a string, by value.
Message-Id: <37e6a868$0$216@nntp1.ba.best.com>
<irritation>
Alright, I agree that I do not
a) have the best syntax
b) have error-free code
c) have the most optimal way
d) make you not want to retch when you read it
but I do try to
a) proofread for errors
b) attempt to do what I am trying to do, even if it's not the best way
to do it to show that I am not just looking for a "quick" answer -- that
I have actually attempted to solve for my own
c) thank those that have helped me
however when you folks constantly criticize and berate me (or anyone,
for that matter) when they do it the correct way, the best way, or even
the obvious way (to you), well, it's gets a bit demeaning.
is this comp.lang.perl.misc or comp.lang.perl.expert.only.misc?
Ok, with that off my back,
</irritation>
Opps, i didn't even realize I didn't include the string comparison.
The order should have been (1).(2)(3) or (numeric).(string)(numeric).
So, from your latest example I can figure out
my ( $num1, $str, $num2 ) = /([\d_]+)\.([a-z]+)(\d*)/i ;
divide and conquer
pack 'C5 A* x A*' =>
split(/_/ => $num1), $num2 || 0, $str, $_
ok, first i've never seen the "splat /_/ => $num1" syntax. am I to assume
this will split a string and put the results into that string (and/or
array?).
pack 'C5 A* x A*' packs a unsigned char of len 5 (from num1), but I am
unsure of what the A* x A* relates to? pack num2 (or 0) as an ASCII
string then str as the same? what's the $_ needed for then?
@out = map substr($_, 1 + rindex $_, "\0"),
one then sorts all this to get a sorted list that then is mapped to
@out by way of substr??? i am now officially lost as to how this
translates. perhaps I don't understand the pack/substr functions well
enough yet, but i am reading the camel book and did a perldoc on pack
(which yields essentially the same text) put still am a bit lost.
Gads,
--jim
In article <x7btazaiqc.fsf@home.sysarch.com>,
Uri Guttman <uri@sysarch.com> wrote:
>>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
>
> LR> Only in your dreams! At least this way the world will have seen yet
> LR> another well-written example of this magnificent technique. :-)
>
>regarding you, it is in my nightmares. :-)
>
> LR> Note that use of the Schwartz on these six sortfields would have been
> LR> pretty ugly, to say nothing of slow and error-prone. (You got a bug in
> LR> with only three sortfields. :-)
>
>i beg to differ, python breath. the original post did a pure numeric
>compare on the prefix digits as a single number. i quote:
>
>And I want them to be sorted first by the prefix to the period, as if
>they are numeric (2345, 2346, 23411, etc.) and if they are the same
>numerical value,
>
> my ($parta1, $parta2) = split /\./, $a;
>
> $parta1 =~ s/_//g;
>
>that makes it a single numeric string
>
> return ( ( $parta1 == $partb1) ? (( $parta2 > $partb2 ) ? 1 : -1) :
> ^^
> (($parta1 > $partb1) ? 1 : -1 ));
> ^
>both are numeric compares of the prefix digits as a single number.
>
>so my ST was correct in making that one field. i admit the minor bugs
>you found but you are dead wrong here! what you have to do is make the
>numeric prefix a single N pack field.
>
>uri
>
>--
>Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
>uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
>Have Perl, Will Travel ----------------------------- http://www.sysarch.com
>The Best Search Engine on the Net ------------- http://www.northernlight.com
>"F**king Windows 98", said the general in South Park before shooting Bill.
--
--
If life is a waste of time, and time is a waste of life,
then let's all get wasted together and have the time of our lives.
------------------------------
Date: Mon, 20 Sep 1999 15:05:39 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <37E6AFB3.44829D11@mail.cor.epa.gov>
Greg Bacon wrote:
[snip]
> Top 10 Posters by Volume
> ========================
>
> (kb) (kb) (kb) (kb)
> Volume ( hdr/ body/ orig) Posts Address
> -------------------------- ----- -------
>
> 425.6 (163.4/216.9/138.2) 221 kragen@dnaco.net (Kragen Sitaker)
^^^^^ ^^^^^ ^^^
Holy bandwidth, Batman!
I see Kragen took Jonathan's suggestion and got that Mavis
Beacon typing program. :-)
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 20 Sep 1999 22:37:24 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <EGyF3.23088$N77.1825091@typ11.nn.bcandid.com>
In article <37E6AFB3.44829D11@mail.cor.epa.gov>,
David Cassell <cassell@mail.cor.epa.gov> wrote:
>Greg Bacon wrote:
>[snip]
>> Top 10 Posters by Volume
>> ========================
>>
>> (kb) (kb) (kb) (kb)
>> Volume ( hdr/ body/ orig) Posts Address
>> -------------------------- ----- -------
>>
>> 425.6 (163.4/216.9/138.2) 221 kragen@dnaco.net (Kragen Sitaker)
> ^^^^^ ^^^^^ ^^^
>
>Holy bandwidth, Batman!
Sorry, folks. I've been quite depressed lately; my marriage is in a
state of, well, transition, my job might be too, and Usenet has been my
only solace. I find great satisfaction in answering people's
questions, especially when I haven't answered those questions before.
I'll try to keep it down below 30 posts a day.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 20 Sep 1999 21:16:50 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: target frame in URL redirection
Message-Id: <6vxF3.22903$N77.1812197@typ11.nn.bcandid.com>
In article <37E6A12D.135C4BCC@westat.com>, HHH <hartleh1@westat.com> wrote:
>Wesley Warren wrote:
>> My guess doesn't work:
>> print ("Location: $go\n\n" target="4_display_area");
>
>The \n\n (two of them) indicate the end of the header being sent. Try
>this:
>
>print "Location: wherever\nTarget=whatever\n\n" ;
Target=whatever is not a valid HTTP header line.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
Mon Sep 20 1999
49 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Mon, 20 Sep 1999 23:12:34 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: target frame in URL redirection
Message-Id: <Pine.HPP.3.95a.990920230716.6599G-100000@hpplus03.cern.ch>
Hello, I've just been answering this same question on a different group.
I hate it when people cause me to do that.
On Mon, 20 Sep 1999, HHH wrote:
> Try this:
^^^^^^^^ the bogosity detector is twitching strongly...
> print "Location: wherever\nTarget=whatever\n\n" ;
Now what reason can you offer for anyone bothering to try that piece of
invalid CGI syntax? I don't suppose you've ever considered reading
some relevant documentation? I thought not.
f'ups set.
------------------------------
Date: Mon, 20 Sep 1999 23:55:45 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: target frame in URL redirection
Message-Id: <Pine.HPP.3.95a.990920235318.8108A-100000@hpplus03.cern.ch>
On Mon, 20 Sep 1999, Kragen Sitaker wrote:
> In article <37E6A12D.135C4BCC@westat.com>, HHH <hartleh1@westat.com> wrote:
> >print "Location: wherever\nTarget=whatever\n\n" ;
>
> Target=whatever is not a valid HTTP header line.
The creature has just posted a different answer to the same question, on
c.i.w.a.cgi, with nary a mention of this thread. Ho hum, another
candidate for the killfile.
------------------------------
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 859
*************************************