[11528] in Perl-Users-Digest
Perl-Users Digest, Issue: 5128 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 13 19:07:23 1999
Date: Sat, 13 Mar 99 16:00:17 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 13 Mar 1999 Volume: 8 Number: 5128
Today's topics:
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos jeff@axismutatis.net
Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Pos (Abigail)
Re: Array-Sort (Abigail)
Re: Can't Increment Counter in FILE Using http:// (George Crissman)
complicated reg-exp question <alex@kawo2.rwth-aachen.de>
Crypt-SSLeay <witless@my-dejanews.com>
Re: Deleting the rest of the line... (Abigail)
Re: Deletion of a List Array Entry <uri@besmarter.com>
discard libraries when complete? <design@raincloud-studios.com>
Re: inv. cos <cassell@mail.cor.epa.gov>
Re: inv. cos <jhi@alpha.hut.fi>
Re: inv. cos <jhi@alpha.hut.fi>
Re: inv. cos <jhi@alpha.hut.fi>
Re: Learn the truth - In Dear Recruiter we establish ex <design@raincloud-studios.com>
need help installing Perl on IRIX 6.3 <tedshieh@monmouth.com>
Re: need help installing Perl on IRIX 6.3 (Alastair)
Re: newbie <cassell@mail.cor.epa.gov>
Re: Output to file - Thanks - but it still don't work! <asquith@macconnect.com>
PGP encryt script that does NOT USE A TEMP FILE benquintana@my-dejanews.com
Re: Regex $1 behavior (the jackal)
Re: Shopping Cart with Email Encryption? benquintana@my-dejanews.com
Re: Web Databases <alex@kawo2.rwth-aachen.de>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 13 Mar 1999 21:57:56 GMT
From: jeff@axismutatis.net
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <7cen10$8a3$1@nnrp1.dejanews.com>
In article <7bhei2$rgt$1@client2.news.psi.net>,
abigail@fnx.com wrote:
> Andrew Fry (andrewf@beausys.demon.co.uk) wrote on MMIX September MCMXCIII
> in <URL:news:g75mKCA88822EwWw@beausys.demon.co.uk>:
> ^^
> ^^ I am quite calm, thanks, and have not made any stupid remarks. My point
> ^^ is simply that I find it irritating and patronizing to be constatntly
> ^^ told what I should be reading. I know what I should be reading, I know
> ^^ how much time I have to read, and Ill get around to it at my own pace.
>
> Your time is more important than other people time?
I seriously doubt your time is terribly important. Most of your replies in
this newsgroup are either filled with sarcasm or insults, and aren't terribly
informative at all.
If your time is so damned precious, perhaps you should leave this newsgroup?
The guy has a point - not everything is answered in a FAQ. Not every question
is frequent. Sometimes, the answer given in a FAQ is unclear. Many people
come here when the FAQs have failed them.
Your ramblings are those that I would expect of a consultant who would rather
keep his/her craft to him/herself, rather than share it with the world and
make everyone a good Perl coder. Everyone was a newbie once, why don't you
help them along rather than alienate them?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 13 Mar 1999 23:40:03 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
Message-Id: <7cet0j$81b$1@client2.news.psi.net>
jeff@axismutatis.net (jeff@axismutatis.net) wrote on MMXX September
MCMXCIII in <URL:news:7cen10$8a3$1@nnrp1.dejanews.com>:
// In article <7bhei2$rgt$1@client2.news.psi.net>,
// abigail@fnx.com wrote:
// > Andrew Fry (andrewf@beausys.demon.co.uk) wrote on MMIX September MCMXCIII
// > in <URL:news:g75mKCA88822EwWw@beausys.demon.co.uk>:
// > ^^
// > ^^ I am quite calm, thanks, and have not made any stupid remarks. My point
// > ^^ is simply that I find it irritating and patronizing to be constatntly
// > ^^ told what I should be reading. I know what I should be reading, I know
// > ^^ how much time I have to read, and Ill get around to it at my own pace.
// >
// > Your time is more important than other people time?
//
// I seriously doubt your time is terribly important. Most of your replies in
// this newsgroup are either filled with sarcasm or insults, and aren't terribly
// informative at all.
Guess why.
// If your time is so damned precious, perhaps you should leave this newsgroup?
If everyone except those who have questions would leave the newsgroup,
then all that's left for newbies are the FAQs. Questions beyond that
won't be answered.
// The guy has a point - not everything is answered in a FAQ. Not every question
// is frequent. Sometimes, the answer given in a FAQ is unclear. Many people
// come here when the FAQs have failed them.
That's not the point the guy is making. Noone minds questions that are not
answered in the FAQ or the manual. Noone minds questions about answers in
the FAQ. The point the guy is making is "I don't want to read the FAQ".
// Your ramblings are those that I would expect of a consultant who would rather
// keep his/her craft to him/herself, rather than share it with the world and
// make everyone a good Perl coder. Everyone was a newbie once, why don't you
// help them along rather than alienate them?
When I was a newbie in reading, Usenet didn't exist yet. When I was a Perl
newbie, I read the manual. And the FAQ was written to help newbies. The
FAQ isn't there for those who know the answers.
Abigail
--
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'
------------------------------
Date: 13 Mar 1999 23:42:57 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Array-Sort
Message-Id: <7cet61$81b$2@client2.news.psi.net>
stefan_0815@my-dejanews.com (stefan_0815@my-dejanews.com) wrote on MMXX
September MCMXCIII in <URL:news:7cdmu2$ekv$1@nnrp1.dejanews.com>:
^^ Hi all,
^^
^^ I can't solve the following problem alone - please help me:
^^
^^ @Data = ( ("1", "Hans", Hamburg), ("5", "Maria", "Mainz"), ("2", "Frank",
^^ "Frankfurt") );
^^
^^ Now I need a new array (@Data2) which is sorted by the first Item of @Data:
^^
^^ @Data2 = ( ("1", "Hans", Hamburg), ("2", "Frank", "Frankfurt"), ("5", "Maria",
^^ "Mainz") );
^^
It looks like you don't understand lists.
( ("1", "Hans", Hamburg), ("5", "Maria", "Mainz"), ("2", "Frank",
"Frankfurt") );
is the same as:
( "1", "Hans", Hamburg, "5", "Maria", "Mainz", "2", "Frank", "Frankfurt" );
Perhaps you mean you want to sort
( ["1", "Hans", Hamburg], ["5", "Maria", "Mainz"], ["2", "Frank",
"Frankfurt"] );
but that's a FAQ, so you must have meant something else.
Abigail
--
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))
------------------------------
Date: Sun, 14 Mar 1999 23:10:43 GMT
From: strads@tmisnet.com (George Crissman)
Subject: Re: Can't Increment Counter in FILE Using http://
Message-Id: <36ec413a.28423812@news2.tmisnet.com>
On 12 Mar 1999 15:41:38 GMT, (Abigail) wrote:
>George Crissman (strads@tmisnet.com) wrote on MMXIX September MCMXCIII in
><URL:news:36e88bb1.12273154@news2.tmisnet.com>:
>`` I thought maybe Perl worked differently when called by a
>`` browser as compared to the command line.
>Of course not. That would be stupid. Besides, Perl cannot know whether
>it's called from a browser.
That still leaves me wondering why the program works great when
called from the command line but not when called by the browser.
-- George Crissman
-- strads@tmisnet.com
-----------------------------------------------------------------------
"There is no need to criminalize millions of legitimate and responsible
businesses and individuals in order to stop a very small group of
irresponsible people, particularly when there are other ways already
working ." says Mr. Dan Hufnal of the 10,000 member DEAA
<http://www.deaa.com>. What does he mean by "already working"?
Maybe: <http://www.tmisnet.com/~strads/spamhunt/index.html>
-----------------------------------------------------------------------
------------------------------
Date: Sat, 13 Mar 1999 23:21:12 -0500
From: Alex Farber <alex@kawo2.rwth-aachen.de>
Subject: complicated reg-exp question
Message-Id: <36EB3938.4CEA92FD@kawo2.rwth-aachen.de>
Hi,
I must extract all the function names from some MATLAB files.
So I am going first remove all names between quotes, since
these are not function names. But the problem is to recognize
escaped quotes which are double quotes ('') in MATLAB:
'blah' -> ''
'Say ''Hello!''' -> ''
So I have tried the following regular expression:
s/ (?<![]})\w]) # not preceeded by a closing bracket or \w
' # opening quote
.+? # anything (not greedy)
(?<!') ' (?!') # closing quote (not surrounded by another quotes)
/ '' /gx; # remove everything between quotes
But unfortunately it does not work on 'Say ''Hello!'''
Any ideas? What I actually would like to say instead of .+? is
"anything (non greedy), including double (but not single) quotes"
Thank you!
/Alex
PS: The lookbehind expression (?<![]})\w]) is needed, because A'
or for example [1 0 0]' mean transposed matrices in MATLAB.
------------------------------
Date: Sat, 13 Mar 1999 23:36:01 GMT
From: Witless <witless@my-dejanews.com>
Subject: Crypt-SSLeay
Message-Id: <7cesp0$d41$1@nnrp1.dejanews.com>
I have read many postings stating that the Crypt-SSLeay module is needed for
HTTPS access. I do not have a C compiler on my Win98 system to build it, can
someone with the binary please email it to me @ phtan@bigfoot.com
Thanx
If nothing goes wrong on the first run, you must be using some sample
code...
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 13 Mar 1999 23:46:19 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Deleting the rest of the line...
Message-Id: <7cetcb$81b$3@client2.news.psi.net>
David Falconer (webmaster@guestcities.com) wrote on MMXX September
MCMXCIII in <URL:news:7cdahm$ukj$1@reader1.reader.news.ozemail.net>:
==
== In a text file I have, I want to delete all characters after a certain
== occurance of a word.
man perlre
Abigail
--
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))
------------------------------
Date: 13 Mar 1999 23:45:35 +0100
From: Uri Guttman <uri@besmarter.com>
Subject: Re: Deletion of a List Array Entry
Message-Id: <7mzp5hxb3k.fsf@glory.besmarter.com>
>>>>> "MJTG" == M J T Guy <mjtg@cus.cam.ac.uk> writes:
>>> Is it possible to delete an entry of a list array? I know it is
>> There's no single command to do this, but you can do it this way:
MJTG> Yes there is - see "split".
s/it/ice/ ;
probably a braino. i know you know the right answer.
uri
--
Uri Guttman Hacking Perl for USite
uri@sysarch.com uri@besmarter.com
------------------------------
Date: Sat, 13 Mar 1999 21:58:55 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: discard libraries when complete?
Message-Id: <zcBG2.2289$0l4.1384@news.rdc1.tn.home.com>
I'm working on a script that runs multiple reports in a
batch-like fashion. The reports each exist in seperate files on
the system as libraries and are called in a foreach loop from an
array sorta like this pseudocode...
foreach $report(@requested_reports){
require( $REPORT_PATH . $report)|| die;
&process_report;
}
There are around 50 reports which can be run in any order and
combination from 1 to all 50 reports at a time depending on the
user's needs. Plus, new reports are designed almost daily so I
don't want to put them all in one library because of the
maintenance nightmare that would ensue. We are shooting for a
'drop-in' kind of code where we just install new reports on the
system as they come along by copying them to the reports
directory.
My concern is when someone wants to run a 'Master' which can
loop through 30-40 reports or more at a time. It tends to put a
bit of a draw on the system the deeper it goes.
I need to know, is there any way to discard my report library
after &process_report has run for each required library? If I
shouldn't start with require, how should I approach this?
I've looked for unrequire and flipped through the mammal books
for a way to resolve this... no results yet. Any insight would
be appreciated.
Thanks,
CT
------------------------------
Date: Sat, 13 Mar 1999 14:50:19 -0800
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
Subject: Re: inv. cos
Message-Id: <36EAEBAB.14182C6C@mail.cor.epa.gov>
Dirk Alberti wrote:
> sup, I am having a litte difficulty figurin something out. I know the
> cosine function works like this:
> ... retval = sin (some_number); ...
I take it you mean that the cosine function should work analogously
to the sine function? Yes, up to epsilon. Try:
$retval = cos($some_number);
> Is it possible to figure out inverse cosines, is there some kind of
> function for that I can use? I am working on a project for school
> using angles, triangles, etc. I need to write a perl program to
> make a whole bunch of calculations for me.
>
> Even though it is possible using the sin function to use some smart
> programming to compare Sin values of a list of angles to the Sin
> result I get when dividing the length of the opposite and hypotenuse
> of a triangle.
>
> So far I haven't been able to find anything on inverse sines and
> cosines, so any help/commant would be greatly apprecited.
You should have the POSIX module. It's part of the standard
Perl distribution.. assuming you have a modern version of Perl.
So, if you have it, you can use the POSIX::asin() function to get
the inverse sine [asin is short for arcsine], and so on. Just
about all the trig and inverse trig functions you could want are
there, and you can read the documentation on them using the
perldoc program. Type perldoc -h to get the help screen.
If you have an out-of-date version of Perl, you can either
(1) install a new version; or (2) do all the math by hand using
standard trig relationships and the Perl functions sin(), cos(),
and atan2() .
David
--
David L. Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 14 Mar 1999 00:53:47 +0200
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: inv. cos
Message-Id: <oeezp5h80hw.fsf@alpha.hut.fi>
Dirk Alberti <alber213@wxs.nl> writes:
> sup, I am having a litte difficulty figurin something out. I know the
> cosine function works like this:
>
> ... retval = sin (some_number); ...
>
> Is it possible to figure out inverse cosines, is there some kind of
> function for that I can use? I am working on a project for school
> using angles, triangles, etc. I need to write a perl program to
> make a whole bunch of calculations for me.
Your question is a Frequently Asked Question, which means you didn't
do your homework, which is a bit funny considering that you are doing
this for a school project :-)
>From perlfaq4 - Data Manipulation:
Does perl have a round function? What about ceil() and floor()? Trig
functions?
...
In 5.000 to 5.003 Perls, trigonometry was done in the Math::Complex module.
With 5.004, the Math::Trig module (part of the standard perl distribution)
implements the trigonometric functions. Internally it uses the
Math::Complex module and some functions can break out from the real axis
into the complex plane, for example the inverse sine of 2.
For example:
use Math::Trig;
$y = asin(1);
> Even though it is possible using the sin function to use some smart
> programming to compare Sin values of a list of angles to the Sin
> result I get when dividing the length of the opposite and hypotenuse
> of a triangle.
>
> So far I haven't been able to find anything on inverse sines and
> cosines, so any help/commant would be greatly apprecited.
>
> Kind Regards, K.I.
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
------------------------------
Date: 14 Mar 1999 01:08:59 +0200
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: inv. cos
Message-Id: <oeeww0l7zsk.fsf@alpha.hut.fi>
"David L. Cassell" <cassell@mail.cor.epa.gov> writes:
> You should have the POSIX module. It's part of the standard
> Perl distribution.. assuming you have a modern version of Perl.
> So, if you have it, you can use the POSIX::asin() function to get
> the inverse sine [asin is short for arcsine], and so on. Just
> about all the trig and inverse trig functions you could want are
Well, POSIX has asin(), acos(), and atan() (perl core already has
atan2()). But Math::Trig has the trigonometric and hyperbolic
functions tan(), csc(), cosec(), sec(), sec(), cot(), cotan(), acsc(),
acosec(), asec(), acot(), acotan(), sinh(), cosh(), tanh(), csch(),
cosech(), sech(), coth(), cotanh(), asinh(), acosh(), atanh(),
acsch(), acosech(), asech(), acoth(), acotanh(), and as a bonus the
constant pi. And all these functions (plus the sin(), cos(), atan2())
work for the entire complex plane, not just the real axis.
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
------------------------------
Date: 14 Mar 1999 01:19:32 +0200
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: inv. cos
Message-Id: <oeeu2vp7zaz.fsf@alpha.hut.fi>
Jarkko Hietaniemi <jhi@alpha.hut.fi> writes:
> Well, POSIX has asin(), acos(), and atan() (perl core already has
> atan2()). But Math::Trig has the trigonometric and hyperbolic
> functions tan(), csc(), cosec(), sec(), sec(), cot(), cotan(), acsc(),
> acosec(), asec(), acot(), acotan(), sinh(), cosh(), tanh(), csch(),
> cosech(), sech(), coth(), cotanh(), asinh(), acosh(), atanh(),
> acsch(), acosech(), asech(), acoth(), acotanh(), and as a bonus the
> constant pi. And all these functions (plus the sin(), cos(), atan2())
> work for the entire complex plane, not just the real axis.
Slight debragging: there are aliases in there, e.g. csc() cf cosec().
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
------------------------------
Date: Sat, 13 Mar 1999 22:10:14 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: Learn the truth - In Dear Recruiter we establish exactly what a recruiter does.
Message-Id: <anBG2.2294$0l4.1336@news.rdc1.tn.home.com>
>This is the first
and last
> in a series of
one
>documents I will be writing to
educate (i.e. give the illusion that I have knowledge in one
particular area of non-interest)
>the computer consulting industry as a whole.
After all.. with an ego like mine, I really think I can change
the world.
>The answer to the question "establish exactly what a recruiter
does" is
>NOTHING.
Geez.. and to think I shaved my head to become enlightened.
Could have saved a ton on razors if I would have read this years
ago.
(:-)
>*********************
>
>Dear Recruiter,
>
>I understand that you believe that you are accomplishing
something in your day
>to day work but I have to tell you that you have been fooled.
>
>Who do you receive job positions from? A Human Resources worker
at a company.
>This same company hired that Human Resources person to find
prospective
>employees for their company. In essence this Human Resources
person is not
>doing the job they were hired to do. It seems like you are
doing the "job"
>that the Human Resources person is not doing themselves.
Actually, you do not
>have the skills to do the job that the Human Resources person
should be
>trained and was hired to do. Each company with it's own
individual
>requirements for each individual job opening. You cannot
possibly have the
>talent of all of the positions of all of the companies your
firm "services".
>Without this talent there is no way you could possibly make a
knowledgeable
>decision. So YOU are not doing the Human Resources persons job
either.
>
>So what do you do? Well, without that individual knowledge, you
use what is
>commonly referred to as "buzzwords". Wait, did I say you
actually look for
>words on resumes? Well, I surely didn't say that you would
actually READ
>THEM. (Not even before an interview with the consultant.) But I
digress. What
>really happened was a CONSULTANT built a program so that the
resumes could be
>searched by keywords. Keywords = "buzzwords" Makes it real hard
to
>find...anything. First - you really don't even know what you
are looking for.
>Next - you are trying to find out if a consultant is qualified
for a job you
>know nothing about. Is this actually working? Do you have the
knowledge to
>make these kind of decisions?
>
>Are you doing the job of the consultant? No, you are not.
Companies have many
>ways to find prospective employees; and consultants "could"
utilize those
>resources to find CLIENTS. But that is not how it works. I have
watched my
>local newspaper go from between five and seven pages of
computer consulting
>job openings down to between one-half and one page of
consulting firm "job
>openings" in a three year span. Since the job of the human
resource person is
>not being filled by ANYONE, this is one of the reason companies
no longer
>advertise. They pick the phone up - call a recruiter - get a
free lunch. You
>getting the picture here? I bet some human resource employees
have had more
>paid lunches than the president of the their company.
>
>Another reason is that consulting firms are just like real
estate agencies.
>The real estate workers drive around and look for houses for
sale by owner
>and try to talk the owners into paying them a large sum to do
very little.
>Same tactic - different field, only everybody in the real
estate business is
>doing a job. So when a company puts a computer consulting ad in
the newspaper
>they are swamped with calls from recruiters - sales people who
want paid a
>large sum while having no knowledge of how to accomplish the
task. The human
>resource person (who was hired to do this job) could very
easily do their job
>and contact the consultants and post ads in the paper and on
the world wide
>web. And if they were smart enough they would know how to find
consultants
>without having to take more of their companies money to pay
you.
>
>I can see where you feel like you have accomplished something.
I know that if
>I could actually do the "job" you do, with the computer
CONSULTING mentality
>you have, that I would feel great about myself to.
>
>But really are you actually doing anything?
>
>You may not like me but we are all entitled to our opinion and
this is my
>opinion.
>
>CLIENTS AND COMPANY OWNERS: I charge between $35 and $50 to
create MS Access
>databases as an independent consultant through telecommuting.
How much are the
>consulting firms charging you? Please include your Human
Resources employees
>free lunch we both paid for.
>
>I will except opinions from all QUALIFIED COMPUTER CONSULTANTS.
Everyone else
>will be ignored.
>
>-----------== Posted via Deja News, The Discussion Network
==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start
Your Own
------------------------------
Date: Sat, 13 Mar 1999 17:05:07 -0500
From: "Ted Shieh" <tedshieh@monmouth.com>
Subject: need help installing Perl on IRIX 6.3
Message-Id: <7cemsu$co5$1@news.monmouth.com>
The IRIX 6.3 machine I am using has Perl version 4.0; I would like to
install 5.005_02
I did
rm -f config.sh
sh Configure
as per the instructions
I accepted all of the defaults up to and including
Do you want to do setuid/setgid emulation? [n]
And now it shows
System manual is in /usr/local/man/man1
and nothing more. Hitting return does not help.
Actually, I did this twice, and the Configure script stopped at the same
place each time.
Can anyone tell me what to try next? I find it ironic that it is so much
easier to install Perl on Windows; I just had to download the binaries. If
someone has already compiled the binaries for Perl on IRIX 6.3 and can mail
them to me, please contact me.
Ted
------------------------------
Date: Sat, 13 Mar 1999 23:02:50 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: need help installing Perl on IRIX 6.3
Message-Id: <slrn7elrof.5h.alastair@calliope.demon.co.uk>
Ted Shieh <tedshieh@monmouth.com> wrote:
>Can anyone tell me what to try next? I find it ironic that it is so much
>easier to install Perl on Windows; I just had to download the binaries. If
>someone has already compiled the binaries for Perl on IRIX 6.3 and can mail
>them to me, please contact me.
I believe Perl 5.005 is available from SGI - packaged up for trivial
installation ;
http://freeware.sgi.com/1999Feb/index-by-alpha.html
Lots of other good things there too.
HTH.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Sat, 13 Mar 1999 14:22:15 -0800
From: "David L. Cassell" <cassell@mail.cor.epa.gov>
Subject: Re: newbie
Message-Id: <36EAE517.12834155@mail.cor.epa.gov>
Ronald J Kimball wrote:
> Kimbrough Gray <kimbrough.gray@amd.com> wrote:
> > I have a line
> > system ("more /etc/group group sysadmin")
> > I could save the output in a file. Instead, I want to save the output
> > in a variable called $var. Is this possible.
>
> [lots of useful info about system() and backticks omitted]
But you might want to consider whether:
(1) you really want to save all your output to a single scalar $var, or
if it might make more sense to put the lines in an array @lines, or
perhaps given your planned use, it might be even better to turn your
output into a hash (an associative array, if you're used to awk); AND
(2) you really want to use backticks, when Perl provides lovely ways of
reading in files, such as the <> operator.
I found that as I learned more about Perl, I began to re-think the way
I accessed and stored my data.
David
--
David L. Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Sat, 13 Mar 1999 16:22:08 -0600
From: "William H. Asquith" <asquith@macconnect.com>
Subject: Re: Output to file - Thanks - but it still don't work!
Message-Id: <7ceoov$flm@enews4.newsguy.com>
A really good practice is to always check for error conditions on system
interaction.
open(SAVE, ">$save") or die "Could not open $save because $!\n";
If your script dies then, you have a system problem and not a script.
However, note that ">$save" is an explicit open to write and NOT read like
your doing with print. Use "<$save" instead.
close(SAVE) or die "Could not close $save because $!\n";
# Almost no one checks their closing, but this can be important in
# situations of low memory.
----------
In article <7cdm0u$od2$1@news-1.news.gte.net>, "Timothy Cember"
<timothy.cember@gte.net> wrote:
>
>
> $save = "/demosite/options.txt";
> open(SAVE, ">$save");
> print SAVE "Content-type: text/html\n\n";
> print SAVE "Yadda yadda \n";
>
> I made the change you reccomended but it still doesn't work. (?)
> Could I be missing something elsewhere?
>
>
------------------------------
Date: Sat, 13 Mar 1999 21:58:38 GMT
From: benquintana@my-dejanews.com
Subject: PGP encryt script that does NOT USE A TEMP FILE
Message-Id: <7cen2a$8af$1@nnrp1.dejanews.com>
I am trying to write a perl script that uses PGP to
encrypt some text.
All the example scripts that I find use a clear text
temp file to invoke PGP and then delete the temp file.
Is it me, or does this seem stupid?
I located a perl module on CPAN, but even that uses
the temp file method.
I am trying to run pgp with:
+batchmode and -f
but its just not working!!!
Any help, or example code would be GREATLY appreciated.
thanks!
Ben Quintana
quintana@email.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 13 Mar 1999 21:27:23 GMT
From: hdiwan@diwanh.stu.rpi.edu (the jackal)
Subject: Re: Regex $1 behavior
Message-Id: <slrn7elm01.sjm.hdiwan@diwanh.stu.rpi.edu>
In article <slrn7ej4n4.cbq.jalovel@dogbert.orl.ilstu.edu>, Jeff Lovell wrote:
>Ok, I'm sure I must be missing something fairly obvious here, but I can't
>seem to find it. When I use the $1 backreference in s/// it doesn't seem
^ <------- inside a regexp, this needs to be
a '\'
>to work. Here is the code I am working with:
>
>#!/usr/bin/perl -w
>
use strict; use diagnostics; # always!!!!
>$address = "127.0.0.1";
you should be declaring this as my $address="127.0.0.1", but that's a minor
point. Also, remember, use double quotes for variable interpolation and escape
sequences. Hence this would be best written as follows:
my $address = '127.0.0.1';
>print $address, "\n"; # eq "127.0.0.1" <- I don't want this.
Variable interpolation is performed inside double quotes [this is not C(++)]
>$address =~ s/((\d+\.)*)/$1/;
$address =~ s/((\d+\.)*)/\1/; # ****!!!!
You may want to check out Jeffrey Freidl's Mastering Regular Expressions for a
section on matching IP Addresses. In short, this regular expression states.
look for any number of numbers followed by a period [something like
276.276.265.256 would match].
>print $1, "\n"; # eq "127.0.0." <- I want this.
Make the change marked with a '# ****!!!!' above and you will get the result
you seek.
>
>
>Any help would be appreciated. If you could CC via mail I would be greatful
>too. My news server is on the fritz here, and posts are lost left and right.
>
>
>Jeff
--
Hasan Diwan
------------------------------
Date: Sat, 13 Mar 1999 22:06:11 GMT
From: benquintana@my-dejanews.com
Subject: Re: Shopping Cart with Email Encryption?
Message-Id: <7cengd$8pd$1@nnrp1.dejanews.com>
Yes, you definitely need SSL so that the data between the
web browser and web server is encrypted ...
benq
In article <slrn7eh485.l7g.sholden@pgrad.cs.usyd.edu.au>,
sholden@cs.usyd.edu.au wrote:
> On Fri, 12 Mar 1999 03:51:21 GMT, Brantley Smith <mtbdude1999@yahoo.com>
wrote:
> >Does anyone know of a PERL Shopping Cart program that encrypts order
> >data before sending to the merchant? I'm thinking of something that
> >processes orders, encrypts them with PGP or something similar, and
> >emails the encrypted data to the merchant. I'm trying to get something
> >more secure than normal email, but without the expense and hassle of a
> >secure server. Any help would be appreciated.
>
> But the data is still being sent from the broweser to the CGI over an
> insecure channel.
>
> --
> Sam
>
> If your language is flexible and forgiving enough, you can prototype
> your belief system without too many core dumps.
> --Larry Wall
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 14 Mar 1999 00:23:53 -0500
From: Alex Farber <alex@kawo2.rwth-aachen.de>
To: Jeff Doak <jdoak@MailAndNews.com>
Subject: Re: Web Databases
Message-Id: <36EB47E9.E2069169@kawo2.rwth-aachen.de>
Jeff Doak wrote:
> I am creating a web site, and I want
> to add an interactive database.
> Can I do that using Perl,
Hi Jeff,
sure it's possible - using DBI/DBD - see for example
a gut introductory article by Nathan Torkington at
http://www.zdnet.com/devhead/stories/articles/0,4413,2220157,00.html
Or see a good example on CGI and DBI/DBD at:
http://mysql.turbolift.com/mysql/contactME.txt
There are several databases available for Linux now:
MySQL, mSQL, Sybase, Oracle. Maybe you should take
MySQL (fast, free, ported to many platforms, good DBD)
> and is there a good book to tell me how it's done?
There will be one - "MySQL & mSQL"
http://www.oreilly.com/catalog/msql/index.html
/Alex
--
http://www.simplex.ru/pref.html
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 5128
**************************************