[9160] in Perl-Users-Digest
Perl-Users Digest, Issue: 2778 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 1 12:08:00 1998
Date: Mon, 1 Jun 98 09:00:31 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 1 Jun 1998 Volume: 8 Number: 2778
Today's topics:
Re: Beginner problems with Win32 Perl <dk@tundra.winternet.com>
Re: Best tool? (Andy Lester)
Re: Best tool? <dk@tundra.winternet.com>
Re: Best tool? (Abigail)
Re: Best tool? (Abigail)
CGI mail form format problem (Bobby)
Re: Control characters <rlogsdon@io.com>
Re: Control characters <aqumsieh@matrox.com>
Re: Converting 31.12.1998 -> 12/31/1998 <aqumsieh@matrox.com>
Re: Don't Know how to decrypt using PERL (Abigail)
Re: Don't Know how to decrypt using PERL (Clinton Pierce)
Re: expanding a perl variable back to the shell <dk@tundra.winternet.com>
Re: Help with a Socket Problem <rlogsdon@io.com>
Re: HELP::Comparing strings (Marek Jedlinski)
Re: How to read AND write to a programm? <barnett@houston.Geco-Prakla.slb.com>
inet/database programmers urgently needed - boston area <zoon@stumpworld.com>
Re: location of archive <barnett@houston.Geco-Prakla.slb.com>
Re: location of archive (John Moreno)
Re: parentheses throwing RE match? <dk@tundra.winternet.com>
Re: Perl Scripts <daniel.fox@virgin.net>
Re: Perl Standard In/Out/Error on NT <dk@tundra.winternet.com>
PerlScript ASP request->num1 with POST method displays <dave_rayner@hotmail.com>
Permissions, permissions, permissions.... (Robert Webb)
please help!! <melissa@celsvr.stortek.com>
Re: Random permutations in Perl <gnat@frii.com>
Re: seek advice on simple first program <rlogsdon@io.com>
Re: split behavious <dk@tundra.winternet.com>
Tom Christiansen Tests Thermonuclear Device! <perlguy@inlink.com>
Re: Tom Christiansen Tests Thermonuclear Device! (Michael Fowler)
Re: Tom Christiansen Tests Thermonuclear Device! (I R A Aggie)
Re: Tom Christiansen Tests Thermonuclear Device! (Chris Nandor)
user autentification <webstranger@earthling.net>
Re: Visibility of "my" vars <dformosa@st.nepean.uws.edu.au>
Re: Why is `undef' a unary op and not a list op? <chris.wareham@blackwell.co.uk>
Re: Why is `undef' a unary op and not a list op? (Bbirthisel)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 1 Jun 1998 14:27:01 GMT
From: Dave Kenny <dk@tundra.winternet.com>
Subject: Re: Beginner problems with Win32 Perl
Message-Id: <6kudnl$hfl$1@blackice.winternet.com>
tom arnall <kloro@erols.com> wrote:
: dear group and cameron and james,
If you're new to perl, you may want to play with it from the command line
too, not just from CGI.
: Cameron Dorey wrote:
:> James S Kang wrote:
:> >
:> > Ok, I'm just starting to mess with perl, and I don't have a book right now.
:>
:> RUN, do not walk, to the nearest bookstore and purchase a copy of
:> "Learning Perl on Win32 Systems," by Schwartz, Olsen, and Christiansen.
<big snip>
------------------------------
Date: 1 Jun 1998 15:03:52 GMT
From: petdance@maxx.mc.net (Andy Lester)
Subject: Re: Best tool?
Message-Id: <6kufso$mhb$1@supernews.com>
Why do people answer such unanswerable question?
: 1) What is the best tool for PERL programmer?
: 2) What is the best tool for Web developer?
We'll tell you as soon as you tell me the best vehicle to buy.
xoxo,
Andy
--
--
Andy Lester: <andy@petdance.com> http://tezcat.com/~andy/
Chicago Shows List: <shows@ChicagoMusic.com> http://ChicagoMusic.com/
------------------------------
Date: 1 Jun 1998 15:23:35 GMT
From: Dave Kenny <dk@tundra.winternet.com>
Subject: Re: Best tool?
Message-Id: <6kuh1n$j7r$1@blackice.winternet.com>
IMHO the best tool for Perl (or any other similarly powerful and elegant
tool) is a combination of adventuresomeness and restraint. There's so
much to explore; but that also means there is so much to get lost in.
I often code in Perl the way I used to code in Forth, a few lines
at a time, testing frequently. Then when something _doesn't_ work
I can have reasonable confidence that it was related to the last
little edit I made.
Oh, try to use an editor that can help you match parens, braces etc.
For me the biggest danger in Perl is that it's easy to get
sloppy, especially in "single-use" programs. Testing early and
often is my defense against stupid typo's and mental blindspots,
and it doesn't take real long.
As for adventure, I have to prod myself to keep playing with stuff
I do not know well. It's easy to get into a rut, because of the
There's More Than One Way To Do It principle.
stlam@yahoo.com wrote:
: hi all,
:
: 1) What is the best tool for PERL programmer?
: Is Perl Builder from www.solutionsoft.com is the best IDE for PERL?
:
: 2) What is the best tool for Web developer?
<snip>
------------------------------
Date: 1 Jun 1998 15:49:22 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Best tool?
Message-Id: <6kuii2$rm6$3@client3.news.psi.net>
Stuart McDow (smcdow@arlut.utexas.edu) wrote on MDCCXXXIV September
MCMXCIII in <URL: news:6kq9ke$sp7$1@ns1.arlut.utexas.edu>:
++
++ Probably a good web server and a good web browser. I'd use apache and
++ navagator. ^^^^^^^^^^^^^^^^
^^^^^^^^^
Why don't you practise what you preach?
Abigail
--
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
------------------------------
Date: 1 Jun 1998 15:44:43 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Best tool?
Message-Id: <6kui9b$rm6$2@client3.news.psi.net>
stlam@yahoo.com (stlam@yahoo.com) wrote on MDCCXXXIII September MCMXCIII
in <URL: news:6kocuc$ve9$1@nnrp1.dejanews.com>:
++
++ 1) What is the best tool for PERL programmer?
The manual.
++ 2) What is the best tool for Web developer?
The DTDs.
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
------------------------------
Date: Mon, 01 Jun 1998 11:44:11 -0500
From: bob@simplydigital.com (Bobby)
Subject: CGI mail form format problem
Message-Id: <bob-0106981144120001@powerbook.doublespeak.com>
I have a pretty large form (100 text fields) on a clients site that I am
using as a mailto order form run by a basic Perl cgi. Everything works
well except the output in the email message is not sorted in any specific
way. I need the output sorted alphabeticaly. Can anyone give a Perl newbie
any hints/help or suggestions?
Thanks in Advance,
Bob Rhodes
rhodes@doublespeak.com
------------------------------
Date: Sun, 31 May 1998 20:27:13 -0500
From: REUBEN LOGSDON <rlogsdon@io.com>
To: Liz Castro <Liznet@cookwood.com>
Subject: Re: Control characters
Message-Id: <Pine.BSF.3.96.980531202446.20458A-100000@dillinger.io.com>
\cM is some kind of end-of-line marker. i think it is from windows
machines. If you ftp a perl script from win -> unix in binary mode there
will be \cM's at the end of every line (they look like ^M in vi). They
break the code. Also if you submit a form with a textarea field and you
have line breaks in your input, they show up as \cM\n when the form is
processed. The code below looks like it is turning that form data line
breaks into html line breaks. Matt Wright's guestbook.pl does this
Regards,
Reuben Logsdon
On Fri, 29 May 1998, Liz Castro wrote:
> While deciphering someone else's code, I've come across the following:
>
> $val2 =~ s/\cM\n/<BR>/g;
>
> I found a quick reference to \c in the Camel book; it says to use if for
> control characters.
>
> So what does \cM mean?
>
> TIA,
> Liz
>
>
------------------------------
Date: Mon, 01 Jun 1998 09:58:58 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Control characters
Message-Id: <3572B3A2.62B5663B@matrox.com>
Liz Castro wrote:
> While deciphering someone else's code, I've come across the following:
>
> $val2 =~ s/\cM\n/<BR>/g;
>
> I found a quick reference to \c in the Camel book; it says to use if for
> control characters.
>
> So what does \cM mean?
>
> TIA,
> Liz
It means "Control-M" ... which is the carriage return character "\r"
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: Mon, 01 Jun 1998 09:50:10 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Converting 31.12.1998 -> 12/31/1998
Message-Id: <3572B192.F03A8138@matrox.com>
I R A Aggie wrote:
> + $date = '31.12.1998';
> + $date =~ s!^(\d+)\.(\d+)\.!$2/$1/!g;
>
> Strikes me as being somewhat obsfucated. Why not:
>
> $date='31.12.1998';
> ($day,$mon,$year)=split /\./, $date;
> $date=join('/',$mon,$day,$year);
> print "$date\n";
>
> Result: 12/31/1998
Both do the job .. don't they? But, mine is faster and shorter. Always keep in
mind that Perl is synonymous to laZiness (at least from my point of view)! So
.. why should you type more when you can type less? ;-)
(of course I am ignoring maintenance and readability issues here)
But, if you think *THAT* was obfuscated, you should visit the perl.org site.
Tom Phoenix posted a few problems, and he got some interesting answers. Check
them out.
Enjoy,
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: 1 Jun 1998 15:21:00 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Don't Know how to decrypt using PERL
Message-Id: <6kugss$rm6$1@client3.news.psi.net>
Larry Rosler (lr@hpl.hp.com) wrote on MDCCXXXII September MCMXCIII in
<URL: news:6kmv23$2m4@hplntx.hpl.hp.com>:
++
++ Wowee! Now PLEASE tell me how I was supposed to find that out if all I
++ had available was my Windows NT, Windows 95 or Windows CE systems???
Take a 100 Mb partition of your harddisk and put a Unix on it. All it
takes is some disk space and $20 for a CD (or just download it for free).
It's worth it; even if you don't use it all the time.
++ Please, folks. Get your heads out of the Unix sandbox. Continued blind
++ Unix-centrism will hinder Perl, not help it.
crypt() is in Perl *because* of its Unix roots. It behaves identical to
Unix crypt(). It uses the Unix crypt() library function if available.
Abigail
--
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
------------------------------
Date: 1 Jun 1998 15:29:54 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
Subject: Re: Don't Know how to decrypt using PERL
Message-Id: <6kuhdi$nl71@eccws1.dearborn.ford.com>
In article <6ko3tf$dpf@hplntx.hpl.hp.com>,
"Larry Rosler" <lr@hpl.hp.com> writes:
>I R A Aggie wrote in message ...
>>In article <6knd03$qj3$1@monet.op.net>, mjd@op.net (Mark-Jason Dominus)
>wrote:
>>+ THE ON-LINE DOCUMENTATION DOES NOT EXPLAIN THE PURPOSE OF THE SALT.
www.excite.com, "+crypt +salt", fifth hit:
http://www.eee.hku.hk/man/solaris/crypt.3c.html
"salt is a two-character string chosen from the set [a-zA-Z0-9./];
this string is used to perturb the hashing algorithm in one of 4096
different ways, after which the input string is used as the
key to repeatedly encrypt a constant string. The returned value
points to the encrypted input string. The first two characters
of the return value are the salt itself."
Any more information that that, and you should be looking at the source
code to examine the algorithm particulars--and should be competant to do
so.
>Is that too hard for anyone to grasp??? Maybe you need to be as stupid
>as I am to understand it. C compilers are separate products made by
>other vendors, and are not required to use Perl, and are not purchased
>by users who do not need to do C development.
>>In unix, one might say 'man 3 crypt'.
>
>But this is not Unix. That's the point, dammit.
Point is, the information is out there. In boatloads. If you're using
crypt() and don't know what a salt is, it's not unreasonable to assume
you can do some research and reading on your own.
You seem to be good at using the 'Net for ranting about this, why didn't
you suggest the original poster use the 'Net for researching his question
in the first place?
--
+------------------------------------------------------------------------+
| Clinton A. Pierce | "If you rush a Miracle Man, | http://www. |
| cpierce1@ford.com | you get rotten miracles" | dcicorp.com/ |
| fubar@ameritech.net |--Miracle Max, The Princess Bride| ~clintp |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*
------------------------------
Date: 1 Jun 1998 15:03:19 GMT
From: Dave Kenny <dk@tundra.winternet.com>
Subject: Re: expanding a perl variable back to the shell
Message-Id: <6kufrn$hfl$4@blackice.winternet.com>
Fraserwag <fraserwag@aol.com> wrote:
<snip>
: print "enter the name of the file";
: $filename = <STDIN>;
: The problem occurs when I am ready in the script to copy my files. I'm
: doing this as follows:
: system ("copy d:\temp\release\$filename $destpath\$filename");
:
: Whenever I reach this point in the execution of the script, I'm getting an
: error stating that the command syntax is incorrect. Can someone point out
Another poster explained that you need to protect the backslashes
by doubling them (or use normal, forward slashes; they usually work.)
Another thing to remember: chomp() the string to get rid of the newline.
Having a bad memory, I almost always chomp all my text input, then add the
\n's back later if I need them.
Also remember that win32 systems are perverse in distinguishing between
text and binary files. Perl in win32 normally removes the \r's for you
but if you use binmode to look at the file in binary, there'll be \r's.
Another win32 gotcha: win32 munges case distinctions in filenames.
Standard stuff like install/configure scripts might distinuish related
files this way, eg. makefile vs Makefile vs MakeFile vs MAKEFILE etc.
------------------------------
Date: Sun, 31 May 1998 20:39:46 -0500
From: REUBEN LOGSDON <rlogsdon@io.com>
To: dwright@thuntek.net
Subject: Re: Help with a Socket Problem
Message-Id: <Pine.BSF.3.96.980531203710.20582C-100000@dillinger.io.com>
I believe the proper request syntax is HEAD $uri HTTP/1.0\n\n instead of
$url, like GET /index.html instead of GET http://foo.com/index.html. Also
\r\n\r\n might keep apache happy
Regards,
Reuben Logsdon
On Sat, 30 May 1998 dwright@thuntek.net wrote:
> Hi, I have a PERL script that creates a socket to port 80 on a server and
> runs a PERL script on that server. The line I use to print to the socket is
> as follows:
>
> print S "HEAD $url HTTP/1.0\n\n";
>
> Where S is the socket and $url is the complete URL for the PERL script to be
> run. Now, this has worked just fine but recently I am running into
> problems. The script sends me an email indicating a bad response and lately
> I have been receiving the 403 forbidden response and further research seems
> to indicate that servers using the latest version of the Apache choke on this.
>
> Can anyone tell me if there is a different way of doing this that will help.
> Thanks in advance...
>
> David Wright
> dwright@thuntek.net
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
>
------------------------------
Date: Mon, 01 Jun 1998 13:16:02 GMT
From: cicho@polbox.com (Marek Jedlinski)
Subject: Re: HELP::Comparing strings
Message-Id: <3571e08e.12682877@news.nask.org.pl>
Keywords: If you're happy and you know it, clunk your chains.
Johan Priwshy <Centollo@iname.com> wrote:
>Hi there. I've a little problem comparing strings.
>let's say we have these two variables:
>$str1 = "test";
>$str2 = "test";
>
>and let's say we can compare them within an if statement:
>if ($str1 == $str2) {
you mean:
if ($str1 eq $str2 ) { ...
Use `eq' for string comparisons where you use `==' for numeric,
and `neq' where you use `!='
.marek
--
After things go from bad to worse, the cycle will repeat itself.
http://come.to/fnord/
------------------------------
Date: Mon, 01 Jun 1998 08:02:17 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: How to read AND write to a programm?
Message-Id: <3572A659.29DDED61@houston.Geco-Prakla.slb.com>
Mark Seuffert wrote:
>
> Larry Rosler wrote:
> > Look for `` (backquotes) or qx() in the Perl documentation.
>
> This is what I usually do. But how do I give the programm
> some more lines when it is started... that was my question.
> So I execute the programm, but then it wants some input lines.
> These lines are seperated with newlines... how to write this in
> perl?
>
> `program\nextraline1\nextraline2` ???
>
> --
> /Moak (delete "nospam" in emailadress)
> http://home.pages.de/~irc ~html ~unix
Let me summarize:
You want to:
1. Start program named 'program'
2. Interactively feed input to program
3. Have program run
Right?
1 is easy. use system, qx, or ``
3 is also easy, if 2 is not needed, see above
Now for the not-quite-as-easy part.
You are trying to take an interactive program, and turn it into a
non-interactive one. Someone (I don't know the author of the code) has
gone to a good deal of trouble creating a programming interface
(language?) called 'Expect'.
You write the code in tcl/tk (I think. It's been a while.), telling the
program what it should see as it goes, and how it should respond. It is
very much akin to a dial-up script in which you tell the system what to
do, and what it should get back in response.
There is a Perl Expect module, I think. See CPAN for details.
Hope that helps.
Dave
--
"Security through obscurity is no security at all."
-comp.lang.perl.misc newsgroup posting
----------------------------------------------------------------------
Dave Barnett U.S.: barnett@houston.Geco-Prakla.slb.com
DAPD Software Support Eng U.K.: barnett@gatwick.Geco-Prakla.slb.com
----------------------------------------------------------------------
------------------------------
Date: Mon, 01 Jun 1998 11:06:10 -0400
From: Pete Wason <zoon@stumpworld.com>
Subject: inet/database programmers urgently needed - boston area
Message-Id: <3572C362.BA08EDB3@stumpworld.com>
This is a multi-part message in MIME format.
--------------E11191FCF9A6927CEBAF3DEA
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Stumpworld Systems is a full service Internet and e-commerce technology
company located in Allston, Massachusetts. We are a service business
providing Online consulting and application production. Our core focus
is the development of business to business and business to consumer
Online Applications, including Web Site design, Intranets, custom
software, Online database applications and e-commerce solutions.
Stumpworld is a five-year old company with a start-up mentality. We
work hard and play hard. Among our clients are The Rolling Stones,
Stone & Webster, Ben & Jerry's Ice Cream, SONY, MediaOne, Aerosmith, The
Woolworth Corporation, Phish and Supercoups, to name just a few.
We believe that human relationships, in one form or another, determine
the success of any organization. Our culture is built on teamwork,
trust, commitment, and respect for the individual. Our commitment is to
provide an environment where individuals have project ownership, are
intellectually challenged and having fun.
We are currently in the process of recruiting a number of world-class
technology professionals. If you thrive in a creative and casual
atmosphere and are a person who enjoys working in a fast-paced,
team-oriented environment your career will flourish at Stumpworld
Systems. You won't have to wait months or years before you make an
impact.
We offer attractive salaries, benefits; guitar lessons are optional.
JOB DESCRIPTION
2 Web Database Programmers
In this role, you will:
Plan and Implement large-scale database internet applications.
Requirements:
1 year client/server or Web programming experience, and 3 to 5 years of
technical experience.
The ideal candidate should have the following:
-Knowledge of software development tools for the internet.
-Knowledge of relational database design and implementation (SQL is a
MUST)
-Experience with medium to large databases (fully understand common
database objects, relational design and performance and tuning)
-Demonstrated ability to work in a team environment with critical
deadlines and changing priorities
-Knowledge of JavaScript, Java, C++, VB script or other front-end
application languages.
-Knowledge of Intrabuilder 4.5, IIS, Delphi and/or Domino
-Knowledge of Windows NT
-Other web development skills, including HTML authoring and CGI
programming.
-----------------------------------------------------------------------------
Pamela Burton
pamela@stumpworld.com
(617) 787-6900 X 223
.mrz.
--------------E11191FCF9A6927CEBAF3DEA
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Return-Path: <pamela@stumpworld.com>
Received: from pamela.stumpworld.com (pamela.stumpworld.com [207.244.97.103])
by mail.stumpworld.com (8.8.7/8.8.7) with SMTP id RAA27525;
Thu, 3 Apr 1997 17:40:23 -0500
Message-Id: <1.5.4.32.19980601135949.00a6c13c@mail.stumpworld.com>
X-Sender: pamela@mail.stumpworld.com
X-Mailer: Windows Eudora Light Version 1.5.4 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Mon, 01 Jun 1998 09:59:49 -0400
To: melissa@mail.stumpworld.com
From: Pamela Burton <pamela@stumpworld.com>
Subject: db programmer
Cc: zoon@mail.stumpworld.com, cjm@mail.stumpworld.com,
dawn@mail.stumpworld.com
If you could please go onto the news groups and post this. We are not
getting anywhere with our search... thanx
COMPANY BLURB
Stumpworld Systems is a full service Internet and e-commerce technology
company located in Allston, Massachusetts. We are a service business
providing Online consulting and application production. Our core focus is
the development of business to business and business to consumer Online
Applications, including Web Site design, Intranets, custom software, Online
database applications and e-commerce solutions.
Stumpworld is a five-year old company with a start-up mentality. We work
hard and play hard. Among our clients are The Rolling Stones, Stone &
Webster, Ben & Jerry's Ice Cream, SONY, MediaOne, Aerosmith, The Woolworth
Corporation, Phish and Supercoups, to name just a few.
We believe that human relationships, in one form or another, determine the
success of any organization. Our culture is built on teamwork, trust,
commitment, and respect for the individual. Our commitment is to provide an
environment where individuals have project ownership, are intellectually
challenged and having fun.
We are currently in the process of recruiting a number of world-class
technology professionals. If you thrive in a creative and casual atmosphere
and are a person who enjoys working in a fast-paced, team-oriented
environment your career will flourish at Stumpworld Systems. You won't have
to wait months or years before you make an impact.
We offer attractive salaries, benefits; guitar lessons are optional.
JOB DESCRIPTION
2 Web Database Programmers
In this role, you will:
Plan, Implement, and Execute Build large-scale database internet applications.
Requirements: 1 year client/server or Web programming experience, and 3 to
5 years of technical experience. The ideal candidate should have the following:
-Knowledge of software development tools for the internet.
-Knowledge of relational database design and implementation (SQL is a MUST)
-Experience with medium to large databases (fully understand common database
objects, relational design and performance and tuning)
-Demonstrated ability to work in a team environment with
critical deadlines and changing priorities
-Knowledge of JavaScript, Java, C++, VB script or other front-end
application languages.
-Knowledge of Intrabuilder 4.5, IIS, Delphi and/or Domino
-Knowledge of Windows NT
-Other web development skills, including HTML authoring and
CGI programming.
-----------------------------------------------------------------------------
Pamela Burton
email pamela@stumpworld.com
(617) 787-6900 X 223
--------------E11191FCF9A6927CEBAF3DEA--
------------------------------
Date: Mon, 01 Jun 1998 08:44:37 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: location of archive
Message-Id: <3572B045.D05EB72@houston.Geco-Prakla.slb.com>
tom arnall wrote:
>
> where is the location of the archive for this newsgroup?
Deja-News is the only one I am aware of:
http://www.dejanews.com
HTH.
Dave
--
"Security through obscurity is no security at all."
-comp.lang.perl.misc newsgroup posting
----------------------------------------------------------------------
Dave Barnett U.S.: barnett@houston.Geco-Prakla.slb.com
DAPD Software Support Eng U.K.: barnett@gatwick.Geco-Prakla.slb.com
----------------------------------------------------------------------
------------------------------
Date: Mon, 01 Jun 1998 15:35:32 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: location of archive
Message-Id: <1d9xz09.1k9g8yig5zcxcN@roxboro0-020.dyn.interpath.net>
Dave Barnett <barnett@houston.Geco-Prakla.slb.com> wrote:
> tom arnall wrote:
> >
> > where is the location of the archive for this newsgroup?
> Deja-News is the only one I am aware of:
> http://www.dejanews.com
Alta Vista and Reference.com are two others.
Of course the real problem with that question is - there isn't a
"archive" of this ng, there are instead places where ALL newsgroups are
archived and clpm is just one of the herd.
--
John Moreno
------------------------------
Date: 1 Jun 1998 14:45:23 GMT
From: Dave Kenny <dk@tundra.winternet.com>
Subject: Re: parentheses throwing RE match?
Message-Id: <6kueq3$hfl$3@blackice.winternet.com>
Parentheses are metacharacters. The unbackslashed metacharacters are:
\ | ( ) [ { ^ $ * + ? .
quotemeta(stuff) returns a copy of stuff with the metacharacters
backslashed to protect them. All the backslashed metacharacters
are alphanumeric. (Camel p 59 for list, p67 about 2/3 down.)
Perl's taming of regexes is one of its best features IMHO.
------------------------------
Date: Mon, 01 Jun 1998 13:37:33 +0100
From: Dan : Refresh Net <daniel.fox@virgin.net>
To: Steven Roka <rocka@infoserve.net>
Subject: Re: Perl Scripts
Message-Id: <3572A08D.85F25544@virgin.net>
Steven Roka wrote:
> I am new at this and would like to find a perl scripts library (ie i don't
> understand the technical stuff), or even better a script that will email me
> information filled in a form on a web page.
> Steve
YEAH! I need to know exactly the same stuff.
Anybody know some good PERL resources on the web
------------------------------
Date: 1 Jun 1998 14:36:46 GMT
From: Dave Kenny <dk@tundra.winternet.com>
Subject: Re: Perl Standard In/Out/Error on NT
Message-Id: <6kue9u$hfl$2@blackice.winternet.com>
Brian J. Sayatovic <trin@1.net> wrote:
<snip>
: redirection does work on NT as it does on UNIX (except that you can't radily
: redirect STDERR in NT using the 2>&1 redirection syntax.) However, if you
^^^^
FWIW: 2>&1 works for me in Win95 under the Mortice Kern Toolkit kornshell.
------------------------------
Date: Mon, 1 Jun 1998 13:43:55 +0100
From: "david rayner" <dave_rayner@hotmail.com>
Subject: PerlScript ASP request->num1 with POST method displays as a number but cannot be manipulated
Message-Id: <6ku71j$1cq$1@plug.news.pipex.net>
PerlScript request->num1 with POST method displays as a number but cannot be
manipulated
I want to do a simple Form based perlscript example, where it
should add two numbers entered into two text boxs of a form.
I can display the values but when I try to do the Maths I get mumbo-jumbo
see example below
Please post & mail your wisdom cheers Dave
<%@ LANGUAGE = PerlScript%>
<%
$num1=$Request->num1;
$num2=$Request->num2;
$sum=eval (int($num1)+ int($num2));
%>
<p>
The current value of num1 is <%= $num1 %>
<BR>
The current value of num2 is <%= $num2 %>
<BR>
<BR>
The current value of sum is <%= $sum %>
<P>
<FORM METHOD="POST" ACTION="/asp/train/11.asp">
<INPUT TYPE="TEXT" NAME="num1" VALUE="<%=$num1%>">Enter num1
<P>
<INPUT TYPE="TEXT" NAME="num2" VALUE="<%=$num2%>">Enter num2
<P>
<INPUT TYPE="TEXT" NAME="sum" VALUE="<%=$sum%>">result
<P>
<INPUT TYPE="SUBMIT" VALUE="Calculate">
</form>
------------------------------
Date: Mon, 01 Jun 1998 14:06:47 GMT
From: Robert.Webb@yeg.dot.co.dot.uk (Robert Webb)
Subject: Permissions, permissions, permissions....
Message-Id: <3572b2a2.66457751@gate.itt.yeg.co.uk>
Hi All, not sure if this is a Perl thing, or an NT thing.
I have a script which is called from a form in a web page, updates a
simple text file and runs quite happily on a web server.
eg, page is at http://thisserver.com/index.htm and contains -
<form action="http://thisserver.com/cgi-bin/script.pl" method=post>
where script.pl writes to a file c:/data/fred.txt
However, if I try to run the same script from *another* web server but
I still want fred.txt to be updated on thisserver.com I get a
"Permission Denied" error.
eg, page is at http://thatserver.com/index.htm and contains -
<form action="http://thisserver.com/cgi-bin/script.pl method=post>
where script.pl writes to a file c:/data/fred.txt (on thatserver.com)
Given that both web server (and the client PC) is on an intranet, and
I have directory permissions on c:/data set to Everyone | Full control
I'm not sure what I'm doing wrong.... any advice (other than "use
Unix", thanks) gratefully appreciated.
Rob W.
------------------------------
Date: Mon, 01 Jun 1998 08:49:50 -0600
From: Melissa Ferrara <melissa@celsvr.stortek.com>
Subject: please help!!
Message-Id: <3572BF8E.13FE@celsvr.stortek.com>
Hey all. I have a website, and I've created a perl script to run with
my page. My question is, how do I put my perl script in my
"usr/local/perl" directory? My UNIX server does have this directory, so
could someone tell me what command(s) I must enter to put it there.
Please respond to my email. Thanks.
Rob Domanski
domanski@ucsub.colorado.edu
http://ucsub.colorado.edu/~domanski
------------------------------
Date: 01 Jun 1998 09:47:38 -0600
From: Nathan Torkington <gnat@frii.com>
Subject: Re: Random permutations in Perl
Message-Id: <5q1zt9m8dh.fsf@prometheus.frii.com>
mjd@op.net (Mark-Jason Dominus) writes:
> The function `n2perm' below [...]
I'd just like to state for the record that this permutation code has
sealed mjd's status as "scary brain", with me.
Nat
------------------------------
Date: Mon, 1 Jun 1998 01:51:59 -0500
From: REUBEN LOGSDON <rlogsdon@io.com>
To: Shaun Sides <arch@abts.net>
Subject: Re: seek advice on simple first program
Message-Id: <Pine.BSF.3.96.980601014006.25276C-100000@dillinger.io.com>
your code looks fine 'cept it loads the file into the array which may kill
your computer if you have huge 100mb or so files
also you are using pattern matches to double the line breaks, I would
think that a simple addition of \n to the end of each line would work.
here is an on-the-fly way to do it with a temp file, your maximum mem
usage at any given point is @ARGV + $file, $tempfile, and $_ (line of
file):
$tempfile = 'tempfile';
foreach $file (@ARGV) {
open(FILE,"<$file") or die "cant open $file $!";
open(TEMP,">$tempfile") or die "dammit cant write to tmep";
while (<FILE>) {
print TEMP; # $_ is default for print
print TEMP "\n"; # <- TEMP has doubled version of FILE
}
close(FILE), close(TEMP);
unlink($file) or die "cant unlink $file $!";
rename($tempfile,$file) or die "cant rename to $file $!";
# ^^ now TEMP is FILE
}
unlink($tempfile);
Regards,
Reuben Logsdon
On 29 May 1998, Shaun Sides wrote:
> Yay. I've managed to actually write a useful little program in Perl.
> ;-) All it does is doublespace a file. I have a couple of ideas for
> some other simple things I can try my hand at, too. So, what I'd like
> to know is just how inefficient my algorithm is, brief advice on same,
> and that sort of thing. Hell, if someone wants to show me a totally
> obfuscated version of it, go ahead! ;-) I'm sure I'd learn something
> from it.
>
> #!/usr/bin/perl -w
> # ds.pl --> Double-space
> # Program to take single spaced text files and add an
> # extra \n to the end of each line.
> # usage: ds <filename1> <filename1> <...> <filenamen>
>
> foreach $file (@ARGV) {
> open FILE, $file || die "Can't open $file $!";
> while (<FILE>) {
> s/(.\n)$/$1\n/;
> s/^\n$/\n\n/;
> push @file, $_;
> }
> close FILE || die "Can't close $file $!";
> open FILE, ">$file" || die "Can't open $file for write $!";
> print FILE @file;
> undef @file;
> }
> # EOF ds.pl
>
> I see that loading the whole file into an array could cause some barfing
> if the size were significant. I thought about trying to use $^I, but
> figured that I can modify it that way later on. Or even come up with a
> better way.
>
> --
> ==============================================================================
> Shaun L. Sides | Hey! CyberGold | arch@abts.net
> Free Randal Schwartz and Ric Flair! | wastes yer time | arch@sara.mmlc.nwu.edu
> ==============================================================================
> The time for desperation is upon us. Let's play.
> First Wizard Zeddicus Zu'l Zorander
> ==============================================================================
>
>
------------------------------
Date: 1 Jun 1998 15:43:00 GMT
From: Dave Kenny <dk@tundra.winternet.com>
Subject: Re: split behavious
Message-Id: <6kui64$j7r$2@blackice.winternet.com>
Vincent W. Yin <q14988@hkimd.mot.com> wrote:
: Can someone please explain to me the following:
:
: In the camel book (2nd ed.), it says that:
:
: "if PATTERN is also omitted, the function splits on whitespace, /\s+/, after
: skipping any leading whitespace." - p. 220
:
: ($col1, $col2) = split (/\s+/, $line);
^^^
Keep reading. The next page points out that " " is magic:
As a special case, specifiying a space " " will split on
whitespace just as split with no arguments does. Thus
split(" ") can be used to emulate awk's default behavior
whereas split(/ /) will give you as many null initial
fields...
------------------------------
Date: Mon, 1 Jun 1998 11:45:38 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Tom Christiansen Tests Thermonuclear Device!
Message-Id: <35729462.A8D4E2C7@inlink.com>
I'll try this again.
If you don't like how the FSF or any other licenses/copyrights are
worded, then just don't use them!
If you find that you *must* bitch and moan about every detail and want
to go into every incarnation of the word free, please start a new group
with a name like:
comp.lang.perl.i.wanna.bitch.and.moan.about.anything.BUT.the.perl.language
Get a life and take your dicussion somewhere else. I read and post to
this newsgroup to LEARN ABOUT PERL and to HELP OTHERS WITH PERL
QUESTIONS! Not to bitch about how something is worded.
"Stepping down from my soapbox and putting on my asbestos suit."
Thank you.
------------------------------
Date: Mon, 01 Jun 1998 12:52:20 GMT
From: wolfm@pobox.alaska.net (Michael Fowler)
Subject: Re: Tom Christiansen Tests Thermonuclear Device!
Message-Id: <8uxc1.2$h13.44467@binary.alaska.net>
Amen.
------------------------------
Date: Mon, 01 Jun 1998 09:06:40 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Tom Christiansen Tests Thermonuclear Device!
Message-Id: <fl_aggie-0106980906400001@aggie.coaps.fsu.edu>
In article <35729462.A8D4E2C7@inlink.com>, perlguy@technologist.com wrote:
+ I'll try this again.
+
+ If you don't like how the FSF or any other licenses/copyrights are
+ worded, then just don't use them!
+
+ If you find that you *must* bitch and moan about every detail and want
+ to go into every incarnation of the word free, please start a new group
+ with a name like:
So, has Boeing stopped being a merchant of death?
Have you stopped beating your dog?
Some accusations are to be smirked at and ignored. Some are to be
contested.
Followups.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Mon, 01 Jun 1998 13:38:13 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Tom Christiansen Tests Thermonuclear Device!
Message-Id: <pudge-0106980932340001@192.168.0.3>
In article <35729462.A8D4E2C7@inlink.com>, perlguy@technologist.com wrote:
# Get a life and take your dicussion somewhere else. I read and post to
# this newsgroup to LEARN ABOUT PERL and to HELP OTHERS WITH PERL
# QUESTIONS! Not to bitch about how something is worded.
This discussion died down early last week. A little bit late on that one,
Charlie.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Mon, 1 Jun 1998 16:54:33 +0400
From: "stranger" <webstranger@earthling.net>
Subject: user autentification
Message-Id: <6ku85t$c1e$1@si.moris.rosmail.com>
I need autentificate user by password on Linyx RedHat5.
As I understand getpwid, getpnam don't allow to determinate right or wrong
password :
I'm novice in perl and, may be, it's foolish problem ,
but plies don't replay "RTFM ".
I'm also "read the ... manual" and there no solution.
If not so difficult repeat you answer by mail.
sERGEJ pOMYTKIN
WEBmaster of JSC "Svyzinform RM" www.moris.rosmail.com
pers: webstranger@earthling.net
work: webmaster@si.moris.rosmail.com
------------------------------
Date: 1 Jun 1998 13:29:38 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Visibility of "my" vars
Message-Id: <896707778.224893@cabal>
In <35723979.45A4BEAE@spider.herston.uq.edu.au> Jaime Metcher <metcher@spider.herston.uq.edu.au> writes:
>[Back for another go, having wandered through the dusky streets of the
>perl docs tolling a hand bell and calling out "Bring out your
>closures!"]
[...]
>You're right. Your mkcounter example is using closures. Is
>gimme_another a closure???? The docs on closures seem to mention only
>*anonymous* subroutines.
Nope closures work on all subs, for example.
{
my $x=0;
sub getx {
return $x;
}
sub setx {
$x = shift;
}
}
The value of $x is only acceable via setx and getx.
--
I'm a perl programer; if you need perl programing, hire me.
Please excuse my spelling as I suffer from agraphia; see the url. Support NoCeM
http://www.cit.nepean.uws.edu.au/~dformosa/Spelling.html http://www.cm.org/
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: Mon, 01 Jun 1998 13:23:41 GMT
From: Chris Wareham <chris.wareham@blackwell.co.uk>
Subject: Re: Why is `undef' a unary op and not a list op?
Message-Id: <3572ABE6.FBBC869E@blackwell.co.uk>
Randal Schwartz wrote:
>
> The act of "undef"-ing something occurs infrequently enough in my code
> that I'd presume most seasoned Perl programmers also use it sparingly.
>
> So, if you find yourself undef'ing things a lot, perhaps you should
> look at code written by more seasoned Perl programmers so that you can
> find out different ways of doing it.
>
I agree that a seasoned Perl programmer writing a script from scratch
would hardly ever need `undef'. Personally I use the strict module
and declare everything with `my'.
However, seasoned Perl programmers, especially contractors, encounter
labyrinthine scripts written on the fly by C/C++ programmers. These
people expect Perl to follow C scoping rules, and then they have to stick
in hundreds of `undef' statements when they realise otherwise.
When a boss type person says "Fix this buggy system now", the average
code monkey (me) balks at the idea of chucking in `use strict;' at the
top of some vast script that slurps in vasts amount of modules.
I don't post to Perl newsgroups without engaging my brain first (I did
once and Tom Christiansen blasted me mercilessly), but I do think the
undef function taking a list is a good idea. I may encourage bad coding
style I suppose ...
Chris
--
=======================
"It said Windows 95
Windows NT or better on
the box, so Linux must
be supported."
=======================
------------------------------
Date: 01 Jun 1998 13:25:21 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Why is `undef' a unary op and not a list op?
Message-Id: <1998060113252100.JAA09919@ladder03.news.aol.com>
Hi Randal and Chris:
>Chris> what's the chance of one of the Perl maintainers making it take a list
>Chris> in a future Perl revision?
Zero. Consider what happens with "undef @big_array;"
>The act of "undef"-ing something occurs infrequently enough in my code
>that I'd presume most seasoned Perl programmers also use it sparingly.
It has the DOCUMENTED side-effect of recovering memory no longer
needed by objects, arrays and hashes. This is essential for serially using
monster temporary data structures (e.g. an indexing program which builds
word lists by-file as part of its analysis).
>So, if you find yourself undef'ing things a lot, perhaps you should
>look at code written by more seasoned Perl programmers so that you can
>find out different ways of doing it.
A wonderful suggestion. That's how I found the example above.
-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
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 2778
**************************************