[13954] in Perl-Users-Digest
Perl-Users Digest, Issue: 1364 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 12 18:11:35 1999
Date: Fri, 12 Nov 1999 15:10:21 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942448221-v9-i1364@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 12 Nov 1999 Volume: 9 Number: 1364
Today's topics:
Newbie: Secure DBI connection <webmaster@webdream.com>
Re: pattern matching packages <cassell@mail.cor.epa.gov>
Re: perl as first language? <cassell@mail.cor.epa.gov>
Re: Perl Interpreter in Java <cassell@mail.cor.epa.gov>
Re: Perl parseing teknik2000@my-deja.com
Re: Perl Wizards (David H. Adler)
Re: Perl,MySQL,PHP,Servlets, and more gtown97@my-deja.com
Re: Perl/CGI and NT Challenge/Response Problem <cassell@mail.cor.epa.gov>
Q: how to get tied variable within FETCH <ken@bitsko.slc.ut.us>
Re: Q: Instructions for embedding Perl in Borland Delph <jon@midnightbeach.com>
Re: Reflective gtown97@my-deja.com
Re: regular expression to parse html out- (Simon Cozens)
Re: Removing occurrences of a string from another strin (Tad McClellan)
Re: Removing occurrences of a string from another strin (Simon Cozens)
Re: Running shell commands via CGI script <cassell@mail.cor.epa.gov>
Re: Senior Software Engineer (Perl)-Positions Available (Tad McClellan)
Re: Senior Software Engineer (Perl)-Positions Available <cassell@mail.cor.epa.gov>
Re: split <sariq@texas.net>
Thanx! (Kazz Asher)
Time <christian@wix.dk>
Re: Too much Perl? (Craig Berry)
Re: Too much Perl? (Bart Lateur)
Re: Trying to combine a cgi perl script <cassell@mail.cor.epa.gov>
Re: Use perl with SAS and MS Access? <cassell@mail.cor.epa.gov>
Re: Visual Package Manager (VPM) <cassell@mail.cor.epa.gov>
Watchout!! (was Re: Help with collecting -w information <christopher.kuhi@stud.uni-muenchen.de>
Re: Weekday in perl (Viscano)
Re: Why does print only prints to STDOUT when <cassell@mail.cor.epa.gov>
Re: Why does print only prints to STDOUT when mirranda@my-deja.com
Why Doesn't This Work on ICOM? (Kendar)
Re: Win32::Process problem <tye@metronet.com>
Re: Writing data to file on another server. <cassell@mail.cor.epa.gov>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 12 Nov 1999 20:00:30 GMT
From: "Craig Vincent" <webmaster@webdream.com>
Subject: Newbie: Secure DBI connection
Message-Id: <yl_W3.736$Zx1.635@198.235.216.4>
I have two systems right now running Linux RH 6.1
One is a typical webserver, the other contains a MySQL database and will
also be used as an E-commerce server
The problem I am having is this...
Very sensitive information is to be passed between the two servers and I'm
looking for a way to secure any information
being passed from the webhost to the database and vice versa (on port 3306).
The connection between the server and the database will be through a Perl
DBI protocol.
Any suggestions of either securing the protocol or just the port itself
would be very much appreciated.
--
Sincerely,
Craig Vincent
Senior Webmaster/Programmer
------------------------------
Date: Fri, 12 Nov 1999 14:54:55 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: pattern matching packages
Message-Id: <382C9ABF.2B65C6A4@mail.cor.epa.gov>
wang wrote:
>
> Hi,
> Are there any pattern matching packages(libraries) in Perl and
> where I can get them?
You're not kidding, are you?
> I used one a couple of years ago and it was a free package, but
> I forgot the name.
Then it must have been something other than Perl. Maybe C or
C++ or...
Perl has all the regex features you'll need already built in.
Read the perlre and perlop pages to learn more.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 14:10:39 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: perl as first language?
Message-Id: <382C905F.1D617D6B@mail.cor.epa.gov>
Damian Conway wrote:
>
> David Cassell <cassell@mail.cor.epa.gov> wrote:
>
> >Second thought: so you're the *typical* major prof...
>
> I am the very model of a modern major profess-or:
[snip of rest of song]
Very nice. You're just lucky I haven't dug out my old score
to this music. In grad school I wrote an operetta for the
Stat Dept's winter party. All the songs were G&S. That one
was "I am the very model of a modern anti-Bayesian". It
even scanned better than yours.
[I'd explain that Oscar Kempthorne was in the department
then, but probably only Eric Bohlmann would get it...]
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 14:32:19 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl Interpreter in Java
Message-Id: <382C9573.617756D@mail.cor.epa.gov>
Abigail wrote:
[snip]
> Combine that with the fact that Perl is considered "slow", and Java
> isn't on the fast side either...
Brilliant! Andy Grove was asking me just the other day if I had
any ideas on how to slow down systems to the point where people
would flock to buy their latest expensive CPU's, and a Perl+Java
product...
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 19:47:40 GMT
From: teknik2000@my-deja.com
Subject: Re: Perl parseing
Message-Id: <80hqsq$778$1@nnrp1.deja.com>
Many thanks to all for the solutions. It has helped immensely.
I have one other question:
How to split the sting "Alphabet|3_5" to extract the numbers (3 and 5)?
How would you do the same if the string was "Alphabet|3_5_6"??
Thanks again
TK
In article <slrn82np5c.33.tadmc@magna.metronet.com>,
tadmc@metronet.com (Tad McClellan) wrote:
> On Fri, 12 Nov 1999 01:31:53 GMT, teknik2000@my-deja.com
> <teknik2000@my-deja.com> wrote:
> >I am trying to split up the following string -
> >
> >&time=1999.11.03.13.03.12&X_PREF=_tst1&CT_AMID=34&
> >DB_DATA=Alphabet|3_5
> >
> >I information I require is between the "=" and
> >the follwing "&".
>
> I hope that you are not doing URL decoding yourself (unless you
> happen to be doing it correctly, which is rare :-)
>
> > For example in the above I am
> >after 4 components:
> >1999.11.03.13.03.12
> >_tst1
> >34
> >Alphabet|3_5
>
> Uhh, that last one is NOT qq/between the "=" and the follwing "&"/
> as there is no follwing "&" ...
>
> >Does any have any ideas?
>
> my @parts = /=([^&]*)(?:&|$)/g;
>
> --
> Tad McClellan SGML Consulting
> tadmc@metronet.com Perl programming
> Fort Worth, Texas
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 12 Nov 1999 14:20:08 -0500
From: dha@panix.com (David H. Adler)
Subject: Re: Perl Wizards
Message-Id: <slrn82oq37.d8v.dha@panix.com>
On Wed, 10 Nov 1999 16:55:16 -0800, David Cassell
<cassell@mail.cor.epa.gov> wrote:
>But I don't consider myself a Perl wizard. Just a satisfied
>customer. Abigail, Larry, Uri, Damian... They're wizards.
I'm a Perl Druid, if that's any help. :-)
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
America leads the world in shocks.
- Gil Scott-Heron
------------------------------
Date: Fri, 12 Nov 1999 21:57:10 GMT
From: gtown97@my-deja.com
Subject: Re: Perl,MySQL,PHP,Servlets, and more
Message-Id: <80i2fj$d87$1@nnrp1.deja.com>
In article <382B7F53.109F5A8@useractive.com>,
Scott Gray <scotty@useractive.com> wrote:
> The ultimate...http://www.useractive.com
>
The penultimate.../dev/null
Lauren
--
Upset that my admin cancelled usenet service...
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 12 Nov 1999 14:47:51 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl/CGI and NT Challenge/Response Problem
Message-Id: <382C9917.7C92E9FC@mail.cor.epa.gov>
Michael Scheferhoff wrote:
>
> Hello,
>
> I need access to the LDAP API of an Microsoft Exchange Server. Anonymous
> is no problem, but now users need to authenticate themselves. Clear text
> over the network is not so secure, so I need to use Windows NT
> Challenge/Response.
You can get two different modules which do LDAP, and both are
available from ActiveState [I assume you want this for win32].
You can find them by searching with ppm, like this command:
ppm search ldap
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 22:37:11 GMT
From: Ken MacLeod <ken@bitsko.slc.ut.us>
Subject: Q: how to get tied variable within FETCH
Message-Id: <m390431gn1.fsf@biff.bitsko.slc.ut.us>
Basic question:
I have a package that implements a tied hash. When FETCH is called,
I need to pass back the tied variable as part of the structure I
return (not the underlying object $self passed to FETCH). I need
the opposite of tied().
I could store the tied variable in the underlying object but that
would create a cyclic reference which is one of the major reasons
for using the tied implementation.
I've looked for answers in perltie, perlfaq4, perlfunc in 5.005_02,
in some modules in Tie::*, and searches for "tied" at perl.com and
Deja.
More detail:
In libxml-perl I've implemented two modules for handling deeply
structured data, Data::Grove and Data::Grove::Parent (they'll move
to their own module when a few of these issues get worked out).
Data::Grove is the base class for defining application specific
subclasses (like XML::Grove for XML objects). Data::Grove
implements new() and acts as a placeholder package for adding
extension modules like Data::Grove::Visitor and Data::Grove::Parent.
Data::Grove does not contain parent references, to allow fragments
of the grove to be referenced multiple times and to avoid cyclic
references and a delete() function.
Data::Grove::Parent implements a virtual parent reference for
Data::Grove objects using tied variables. The underlying object
contains a reference to the parent tied object and a reference to
the "raw" object. Requests for the Parent attribute are returned
with the parent reference, requests for other attributes are
forwarded to the Raw object. When FETCH is called for an attribute
and that attribute is a hash or an array, a new tied variable is
returned that should contain the tied variable associated with $self
and a Raw value pointing to the requested attribute.
The problem is that I can't find a way to get the tied variable
associated with $self to store in the newly created tied variable.
Thanks for your help,
--
Ken MacLeod
ken@bitsko.slc.ut.us
------------------------------
Date: Fri, 12 Nov 1999 11:22:18 -0800
From: Jon Shemitz <jon@midnightbeach.com>
Subject: Re: Q: Instructions for embedding Perl in Borland Delphi
Message-Id: <382C68EA.57E7609F@midnightbeach.com>
The Glauber wrote:
> > 2) The code to capture StdOut currently doesn't work, though according
> > to dougl it should.
>
> Don't really know what this means, and if it's a Perl or Delphi
> problem. Stdout/Stdin/Stderr redirection under command.com is flaky.
What it means is that PerlEzO contains some code that does an
AllocConsole, creates and opens a temp file, and redirects StdOut to the
temp file. But print statements go to nul:, not the capture file.
I *think* it's a perlez issue, but I'm not sure. I test my redirection
by doing a WriteFile to GetStdHandle(STD_OUTPUT_HANDLE) and my capture
file gets the results, which dougl says should be enough for perlez ....
--
http://www.midnightbeach.com - Me, my work, my writing, and
http://www.midnightbeach.com/hs - my homeschool resource pages
------------------------------
Date: Fri, 12 Nov 1999 21:55:08 GMT
From: gtown97@my-deja.com
Subject: Re: Reflective
Message-Id: <80i2bp$d78$1@nnrp1.deja.com>
In article <01bf2a16$73a985c0$330eead4@pat>,
"Jean-Patrick Madelon"
<balance08@bow.intnet.mu> wrote:
> Is Perl fully reflective?
In its personal quest for meaning, I know that I
leave my perl.exe to itself sometimes, just so
that it has time to think. This perl.exe may be
an exception, so YMMV. I can't imagine that
EVERY perl.exe is this reflective, some could be
quite boisterous and unruly.
Lauren
--
:-)
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 12 Nov 1999 19:06:45 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: regular expression to parse html out-
Message-Id: <slrn82opa5.1s1.simon@othersideofthe.earth.li>
vod (comp.lang.perl.misc):
>Thanks a lot i wil check out the perldoc.
>U see i had just learnt Perl and wasnt aware of "perldoc".
OK; I'm not having a go - this is a serious question: what book
did you use to learn Perl? if you could, I'd like the title and author.
I'll tell you why I ask: A lot of people seem to be in your position,
and I'm finding it annoying that whatever books or tutorials these people
learnt from neglected to mention the documentation, the FAQ or perldoc.
Countless man-hours and bandwidth could be saved here alone if these
resources were pointed out by whatever references people `out there' are
using.
In the case of web-based documentation and tutorials, we might be able
to lean on people to put some pointers to the documentation in their
sites; for books, we can't really make any changes but at least we can
know what to tell people not to buy.
Hoping for a better world and stuff,
Simon.
--
Use an accordion. Go to jail.
-- KFOG, San Francisco
------------------------------
Date: Fri, 12 Nov 1999 08:58:28 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Removing occurrences of a string from another string
Message-Id: <slrn82o784.vt.tadmc@magna.metronet.com>
On Fri, 12 Nov 1999 17:40:20 GMT, Scratchie <AgitatorsBand@yahoo.com> wrote:
>Abigail <abigail@delanet.com> wrote:
>: Really? You have looked through the manpages and FAQs of Perl, and
>: you managed to miss to s///?
>
>: That's utterly amazing. What's next, someone reading a book about
>: Java, and "missing" how to do OO?
>
>
>What's even more amazing is that two people actually pointed him to the
>correct documentation and gave him some useful help before you felt the
^^^^^^
How can _you_ tell when news articles have propogated to
_Abigail's_ server?
>need to belittle him like this.
>
>Boy, Abigail sure is smart. I wish I were more like Abigail.
Me too.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 12 Nov 1999 17:57:03 GMT
From: simon@brecon.co.uk (Simon Cozens)
Subject: Re: Removing occurrences of a string from another string
Message-Id: <slrn82ol7f.1s1.simon@othersideofthe.earth.li>
Scratchie (comp.lang.perl.misc):
>What's even more amazing is that two people actually pointed him to the
>correct documentation and gave him some useful help before you felt the
>need to belittle him like this.
>
>Boy, Abigail sure is smart. I wish I were more like Abigail.
When people need to learn, sometimes they need the carrot.
Sometimes they need the stick.
They don't need spoon-feeding the answer.
--
"There... I've run rings 'round you logically"
-- Monty Python's Flying Circus
------------------------------
Date: Fri, 12 Nov 1999 14:16:26 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Running shell commands via CGI script
Message-Id: <382C91BA.8253CB46@mail.cor.epa.gov>
--==[bolMyn]==-- wrote:
>
> Before someone starts yelling at me about a security risk, I want to
> mention that what I want to accomplish is only for internal networks so
> no outsider will ever see it. [snip]
But.. but.. we *like* to yell at visitors. And regulars too. :-)
[snip]
> returned by my BASH script. However, now I would like to take it a step
> further and I'd rather have now a user input the location for pinging.
> That's when I ran into a road block. I'm not sure how I can pass a
> value from a form input field into my BASH script. So I turned to
> PERL (as a matter of fact, I just started it so I'm sure there is plenty
> I don't know about it).
Rather than use Perl as an intermediary, go ahead and use Perl
modules to do it all. Use CGI.pm to get the params from the
form, and use Net::Ping to do the ping. Might even be faster.
The modules which are not part of your install are available
at CPAN [www.cpan.org].
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 09:02:41 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Senior Software Engineer (Perl)-Positions Available
Message-Id: <slrn82o7g1.vt.tadmc@magna.metronet.com>
On 12 Nov 1999 10:21:21 -0700, Eric The Read <emschwar@rmi.net> wrote:
>tadmc@metronet.com (Tad McClellan) writes:
>> If it is not truly urgent, then you are a liar, and are
>> subject to ignoration (or worse).
> ^^^^^^^^^^
>I just have to ask-- is that a word in your normal lexicon?
No, it is part of my abnormal lexicon :-)
> 'cause it
>just *SCREAMS* PHB-speak to me.
As did the article I was replying to.
I do my best to write for the audience being addressed.
Though I think I did use several words that were more than
a single syllable, so I guess I failed that time.
Oh well.
>BOFH: "Let's just ignore him."
>PHB: "Let's subject him to ignoration."
"ignoration with extreme prejudice" !!
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 12 Nov 1999 13:51:36 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Senior Software Engineer (Perl)-Positions Available
Message-Id: <382C8BE8.71C7C461@mail.cor.epa.gov>
Eric The Read wrote:
>
> "David Winsen" <david@hotjobs2000.com> writes:
[snip]
> > From: David Winsen - Senior Consultant - High Technology Executive Search
> > (HTES)
>
> Are you sure that doesn't stand for "He Ties Excellent Shoelaces"?
"Hey That's Egregiously Stupid"
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 13:31:42 -0600
From: Tom Briles <sariq@texas.net>
Subject: Re: split
Message-Id: <382C6B1E.B1DE0DA7@texas.net>
Nigell Boulton wrote:
>
> How do I open a text file that has data such as
>
> fred:30
> bill:25
> john:30
>
> open the file and then change and display it on screen in the format
>
> Fred is 30 years old
> Bill is 25 years old
> John is 30 years old
split_name_and_age.plx :
#!/usr/bin/perl -w
use strict;
while (<>) {
my ($x,$y,$z);
chomp;
$x.=chop until (split /|/, $_)[-1] eq ':';
chop;
$z.=chop while $_;
print ucfirst(reverse($z)).' is '.reverse($x)." years old\n";
}
-----
data.txt :
fred:30
john:15
sue:10
-----
acme$ ./split_name_and_age.plx data.txt
Fred is 30 years old
John is 15 years old
Sue is 10 years old
acme$
HTH. HAND in class.
- Tom
------------------------------
Date: Fri, 12 Nov 1999 21:37:51 GMT
From: kazz@ashernet.net (Kazz Asher)
Subject: Thanx!
Message-Id: <382c888e.158819580@news.pajo.com>
Thanx for the reply. Not only did you waste YOUR time but you wasted
mine as well... very helpful individual you are!
------------------------------
Date: Fri, 12 Nov 1999 23:49:30 +0100
From: Christian Wix <christian@wix.dk>
Subject: Time
Message-Id: <382C997A.37F84B90@wix.dk>
Hi
I have a web server in another time zone than I. I want to convert the
time and date 6 hours forward. How do I do that very easy?
Here is the script I'm using:
sub get_date {
# Define arrays for the day of the week and month of the
year. #
@days = ('Sunday','Monday','Tuesday','Wednesday',
'Thursday','Friday','Saturday');
@months = ('January','February','March','April','May','June','July',
'August','September','October','November','December');
# Get the current time and format the hour, minutes and seconds.
Add #
# 1900 to the year to get the full 4 digit
year. #
($sec,$min,$hour,$mday,$mon,$year,$wday) =
(localtime(time))[0,1,2,3,4,5,6];
$time = sprintf("%02d:%02d:%02d",$hour,$min,$sec);
$year += 1900;
# Format the
date. #
$date = "$days[$wday], $months[$mon] $mday, $year at $time";
}
--
Christian Wix
Bergsøekollegiet 23,st - 2309
Søllerød
2850 Nærum
Denmark
Phone: +45 45505171-(tone)-2309 / +45 26258162
Email & www: mailto:christian@wix.dk - http://www.wix.dk
ICQ #21322285
------------------------------
Date: Fri, 12 Nov 1999 20:13:44 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Too much Perl?
Message-Id: <s2ot7orkhsq15@corp.supernews.com>
Steve Linberg (slinberg@crocker.com) wrote:
: Just wondering if any other Perl hackers experience this sensation. Maybe
: it's the uptight blueblood Yankee in me, feeling that I'm not suffering
: enough and that I need more penance, that I've got it too easy. :) Maybe
: people in Californina don't experience this. I wonder.
I'm in California, and I *definitely* do! I hop between Perl, Java, and
C++. The first transition isn't as bad; Java offers better primitive data
types for e.g. string and container handling, and also does garbage
collecting, so a lot of the idioms and 'headspace' carry over with only
minor pain. But doing C++ coding feels like doing assembly felt when I
was primarily a C coder.
--
| Craig Berry - cberry@cinenet.net
--*-- http://www.cinenet.net/users/cberry/home.html
| "They do not preach that their God will rouse them
a little before the nuts work loose." - Kipling
------------------------------
Date: Fri, 12 Nov 1999 20:54:06 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Too much Perl?
Message-Id: <38317d71.2957052@news.skynet.be>
Steve Linberg wrote:
>I still feel, though, that I need to get back to doing more C. C is the
>mother tongue, after all, and I feel I'm being disloyal to the mother.
>Perl is doing too much work for me, managing all my variables and memory,
>giving me English-like constructs to manipulate text and language with.
>It's gotten too easy.
Rubbish. You're saying you don't remember how to do the repetitive work,
and that that would be a pity. There's tools for that! At least, get
some language that is higher level than bare C (pretty much like Perl,
but one that can be "compiled" into C), quickly dabble the "high level
stuff", and let the tool write the drab for you. Then, you may fill in
the interesting bits, and maybe even tweak what the compiler produced.
Nobody writes a whole huge application in assembly, do they?
--
Bart.
------------------------------
Date: Fri, 12 Nov 1999 14:59:24 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Trying to combine a cgi perl script
Message-Id: <382C9BCC.D4CBB54F@mail.cor.epa.gov>
Michel Dalle wrote:
[snip]
> Moderate :
> Read up on using the CGI module and re-build from scratch.
>
> Difficult :
> Try to combine two Matt Wright scripts into a single monster. :-)
I don't recommend this last one. There are several things
you should *never* do, and this is on that list. Others
include:
solving that little golden puzzle box
reading from that old book in that deserted cabin
saying 'Candyman' three times while looking in a mirror
breaking that ancient seal on that huge door in the basement
taking the 'Sunnyvale at night' tour
.
.
.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 14:06:54 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
To: jkort@wimberley-tx.com
Subject: Re: Use perl with SAS and MS Access?
Message-Id: <382C8F7E.21A8FC54@mail.cor.epa.gov>
[courtesy cc emailed also]
jkort@wimberley-tx.com wrote:
>
> I need to compare SAS datasets to MS Access tables. Can't afford SAS
> license, so doing this in SAS is not an option, and I'd rather not use
> VB. Does perl, with ODBC connections, offer me a way to hit against
> both data sources? If yes, can you please point me to some good
> documentation for this?
You can't afford the SAS license? Join the club.
You'd rather not use VB? I know of no VB translator which would
help you.
Perl with ODBC will only help you if you have SAS and also
the SAS/ACCESS package [which is extra moolah]. This doesn't
sound like what you want.
As an alternative, buy a copy of DBMS/Copy. It's pretty cheap,
and it translates just about anything into just about anything
else. Then you'll have the SAS files translated into tables
you can use.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 14:02:46 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Visual Package Manager (VPM)
Message-Id: <382C8E86.CCCB2475@mail.cor.epa.gov>
Ashaman wrote:
>
> Well I use PPM at home however, it won't work at work. I have configured
> with numerous proxies that are available and nothing seems to work. I was
> thinking that VPM would be an easier work around rather than using PPM at
> home then do a directory comparison between my work and home pc to determine
> where the modules were installed.
I doubt VPM will be easier here. You should re-read the
ActiveState HTML docs on your hard drive [specifically the
section on using PPM] to see how to cope with proxies and/or
firewalls.
Or, since you can get this to work at home, just snag the PPD
files from ActiveState while you are at home, bring them in
via sneakerware [floppies], put them on your hard drive,
point ppm at the new PPD files using the --location option
of 'ppm install', and install the packages that way.
> I'm fairly new to Perl and the module installation is all confusing for me.
You may want to read some of the Perl docs on modules. In
the HTML docs you have, you can browse down to the perlmod
and perlmodlib pages. Some of the sections will cover what
you want, while others will address making modules. Don't
worry about the latter yet.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 21:44:06 +0100
From: "Chris Kuhi" <christopher.kuhi@stud.uni-muenchen.de>
Subject: Watchout!! (was Re: Help with collecting -w information!)
Message-Id: <80hu6n$kb1$1@sparcserver.lrz-muenchen.de>
>>use CGI ':standard';
>>$file = param('file');
>>
>>$cmd = `perl -w $file`;
>
>
> Whoa nelly!
>
> The crackers are gonna *love* you...
Not only that, but the entire cgi-bin folder is browsable over http
including something that looks like password data. Methinks someone needs
to configure the webserver better.
Chris
------------------------------
Date: Fri, 12 Nov 1999 21:21:37 GMT
From: kc@disinfo.net (Viscano)
Subject: Re: Weekday in perl
Message-Id: <382c8369.5444336@news.idt.net>
Probably a faster way to do it..but...
use Time::Local;
sub weekday
{
# Determine epoch seconds for current day
my($d, $m, $y) = (localtime)[3..5];
$epoch_seconds = timelocal(0, 0, 0, $d, $m, $y);
$date = scalar(localtime($epoch_seconds));
@datemembers = split(/ /, $date);
$xweekday = $datemembers[0];
return $weekday;
}
That will give you the current day of the week in three letter form,
ie: Mon, Tue, Wed, etc....
for any other date....just set the $d $m $y variables to the specific
values.
-kc
------------------------------
Date: Fri, 12 Nov 1999 14:30:28 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Why does print only prints to STDOUT when
Message-Id: <382C9504.C8BBD23@mail.cor.epa.gov>
mirranda@my-deja.com wrote:
>
> I am running a perl script inside another perl script.
> My program runs the test like
> system ( "perl $my_other_perl $logfile);
> in $my_other_perl I have a bunch of "print" statements but none of them
> get printed in the $logfile.
Yes.
[1] You have an error in your code, so I assume you aren't
showing us the real code. So I'll have to guess whether your
real code works properly.
[2] You should use error-checking in all cases like this.
See the perlfunc page for more on system() .
[3] Without seeing your 'other' program, it's hard to tell
whether it writes to $logfile properly. And, if this is
a CGI script, then you may not have $logfile where you think
it should be. Webservers love to fib to you about your
current directory.
[4] This is probably *not* the best way to go about solving
your problem. I think you probably should be using do()
or require() or use() instead. Read the perlfunc pages
to see more on them, or use perldoc to get just the useful
pieces by typing:
perldoc -f system
perldoc -f use
perldoc -f require
perldoc -f do
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 12 Nov 1999 22:40:21 GMT
From: mirranda@my-deja.com
Subject: Re: Why does print only prints to STDOUT when
Message-Id: <80i50k$f9j$1@nnrp1.deja.com>
Kragen,
inside my test.pl:
&run( "perl $my_other_perl $arg1 $arg2", "$logfile", "a message");
sub run {
my( $test, $log_file, $title ) = @_;
my($result) = system("$cmd > $log_file");
.
}
in "my_otherperl" script I call a foo.exe which has print statemnts too.
I get the print statements from the foo.exe in the log file but not the
ones from "my_otherperl.pl"
??
Thanks.
Mirranda
In article <HQMW3.451$YI2.24895@typ11.nn.bcandid.com>,
kragen@dnaco.net (Kragen Sitaker) wrote:
> In article <80ftri$r4k$1@nnrp1.deja.com>, <mirranda@my-deja.com>
wrote:
> >I am running a perl script inside another perl script.
> >My program runs the test like
> >system ( "perl $my_other_perl $logfile);
> >in $my_other_perl I have a bunch of "print" statements but none of
them
> >get printed in the $logfile.
> >
> >Any idea?
>
> Presumably $my_other_perl isn't opening the logfile and printing to
> it. (Are you sure it's running at all?)
> --
> <kragen@pobox.com> Kragen Sitaker
<http://www.pobox.com/~kragen/>
> The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
> <URL:http://www.pobox.com/~kragen/bubble.html>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 12 Nov 1999 21:41:12 GMT
From: heron@hell.com (Kendar)
Subject: Why Doesn't This Work on ICOM?
Message-Id: <382c8928.175834482@news-server>
Why doesn't the following work on ICOM?
Is there another way to execute the CGI program?
Every time I try any such configuration I get the ERROR:
Script execution error
Unable to execute script due to a configuration problem.
Please notify the webmaster of this error.
exec() returned: 2: No such file or directo
But I have CHMODes everything correctly and all
files are configured right!
Thanks!
Here is the little piece of code:
<a href="/cgi-bin/track.cgi?os=www.soulis.com/search.html">
<img src="http://www.soulis.com/banners/cyberg.gif" border="0"
alt="Cyberg"></a>
medusa@beaute.org
------------------------------
Date: 12 Nov 1999 14:21:41 -0600
From: Tye McQueen <tye@metronet.com>
Subject: Re: Win32::Process problem
Message-Id: <80hssl$3vk@beanix.metronet.com>
"Mark Ruedy" <mruedy@alidian.com> writes:
) 8 Win32::Process->Create($proc, 'C:\\winnt\\Notepad.exe',
) 9 "Notepad perlnut.txt", 1, DETACHED_PROCESS, ".");
[...]
) Usage: Win32::Process::Create(cP,appname,cmdline,inherit,flags,curdir) at
Win32::Process->Create(@args);
is the same as
SomePackage::Create( "Win32::Process", @args );
where C<SomePackage> is determined using inheritance.
The C<Create> you are using doesn't appear to be an object-oriented
call so you should, as noted in the usage message, use:
Win32::Process::Create(...
# ^^ Note that this isn't "->".
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: Fri, 12 Nov 1999 15:03:45 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Writing data to file on another server.
Message-Id: <382C9CD1.46DF9049@mail.cor.epa.gov>
Crawfishy wrote:
[snip]
> Desired scenario:
> * HTML Form and CGI Program located on www.somesite.com (ficticious domain)
> * My computer is running a small server progam on a static IP of
> 120.121.122.123 (ficticious ip)
> * Data would be written to a file located at http://120.121.122.123/data.db
If you want to do this, then you'll have to use the HTTP protocol
to connect these. These are URL's, not file locations. If you
have to live with the URL's, then you'll probably want to look
at the wealth of HTTP::* modules. OTOH, you might be able to
get away with some of the LWP modules if your connections
are straightforward enough.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
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 1364
**************************************