[8991] in Perl-Users-Digest
Perl-Users Digest, Issue: 2609 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 15 13:11:06 1998
Date: Fri, 15 May 98 10:00:59 -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 Fri, 15 May 1998 Volume: 8 Number: 2609
Today's topics:
Re: "if" statement help <aqumsieh@matrox.com>
Customer Service <tchrist@mox.perl.com>
Re: Does Perl have a IDE?I don't like command line. (Mike Stok)
Re: Does Perl have a IDE?I don't like command line. <keithmur@mindspring.com>
Re: Does Perl have a IDE?I don't like command line. (Stuart McDow)
Re: Does Perl have a IDE?I don't like command line. <keithmur@mindspring.com>
Re: Does Perl have a IDE?I don't like command line. <koos_pol@bigfoot.com>
Re: Does Perl have a IDE?I don't like command line. <keithmur@mindspring.com>
Re: Does Perl have a IDE?I don't like command line. (Ken Fox)
Re: Does Perl have a IDE?I don't like command line. <keithmur@mindspring.com>
Re: Does Perl have a IDE?I don't like command line. <keithmur@mindspring.com>
Re: Does Perl have a IDE?I don't like command line. <tchrist@mox.perl.com>
Re: Does Perl have a IDE?I don't like command line. <tchrist@mox.perl.com>
Re: Does Perl have a IDE?I don't like command line. chris+usenet@netmonger.net
Re: Does Perl have a IDE?I don't like command line. <lr@hpl.hp.com>
Inserting commas and decimal point into a signed value. <mr_hellas@hotmail.com>
Re: Inserting commas and decimal point into a signed va (Mike Stok)
Re: Inserting commas and decimal point into a signed va <tchrist@mox.perl.com>
Re: installing CGI.PM <rbskipper@wimberley-tx.com>
Re: Learning Perl vs Programming Perl (Books) <aqumsieh@matrox.com>
Major problem on upgrade to Linux 5.0 <root@mail.mcoe.k12.ca.us>
Re: Newbie question: how do I..... <aqumsieh@matrox.com>
Re: Nuclear bombing of NEW YORK! Small countries can ta <smichels@is.nascar.com>
Re: Perl not and ! operator differences <dbushong@my-dejanews.com>
Re: PERL5LIB, @INC, and "Can't locate loadable object.. <xuming@xxx.email.unc.edu>
Print Array adds space when sent to SENDMAIL???? <tag@io.com>
Problem with s/// (Collin Rogowski)
Re: Problem with s/// <rbskipper@wimberley-tx.com>
Re: Problem with s/// <tchrist@mox.perl.com>
Re: reading file into an array of hash <aqumsieh@matrox.com>
Re: reading file into an array of hash <aqumsieh@matrox.com>
Re: Removing ^M at the end of each line of a file. (Abigail)
Should Berkeley DB file be locked during tie? <Brian_ONeill@uml.edu>
Re: Should Berkeley DB file be locked during tie? <Brian_ONeill@uml.edu>
Re: Substitution Problems :( <aidan@crux.blackstar.co.uk>
Re: Substitution Problems :( (Jim Allenspach)
Re: Substitution Problems :( <lr@hpl.hp.com>
Re: TIMTOWTDI - regex vs. if (function) <aqumsieh@matrox.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 15 May 1998 11:31:29 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: "if" statement help
Message-Id: <355C5FD0.72DE355C@matrox.com>
--------------4EE943DB2691D578EC1E2D49
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Martien Verbruggen wrote:
> In article <355A53C1.6BD4FAA4@colba.net>,
> Ala Qumsieh <qumsieh@colba.net> writes:
> > Reginald Johnson wrote:
> >
> >> <snip>
> >
> >> if ($dbh = Msql->Connect(defiant,"cs495")){
> >> print "<body bgcolor=#3300cc text=white link=yellow vlink=green>";
> >
> > if ($dbh == ...)
> >
> > = is an assignment .. == is a comparison.
>
> I think that in this case it is meant to be an assignment.
>
Then I humbly apologize :-)
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
--------------4EE943DB2691D578EC1E2D49
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
Martien Verbruggen wrote:
<BLOCKQUOTE TYPE=CITE>In article <355A53C1.6BD4FAA4@colba.net>,
<BR> Ala Qumsieh <qumsieh@colba.net>
writes:
<BR>> Reginald Johnson wrote:
<BR>>
<BR>>> <snip>
<BR>>
<BR>>> if ($dbh = Msql->Connect(defiant,"cs495")){
<BR>>> print "<body bgcolor=#3300cc text=white
link=yellow vlink=green>";
<BR>>
<BR>> if ($dbh == ...)
<BR>>
<BR>> = is an assignment .. == is a comparison.
<P>I think that in this case it is meant to be an assignment.
<BR> </BLOCKQUOTE>
Then I humbly apologize :-)
<PRE>--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)</PRE>
</HTML>
--------------4EE943DB2691D578EC1E2D49--
------------------------------
Date: 15 May 1998 16:02:51 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Customer Service
Message-Id: <6jhovb$ig9$4@csnews.cs.colorado.edu>
When you work in Customer Service, you never have folks who actually
bothered to read the instructions call in to tell you what a good job
you're doing. Incoming calls are not because something's working right,
but because something's missing or broken or confusing--or far more
likely, simple because the confused caller thinks it is. So you
end up reading them the manual they have sitting in front of them.
Just like here.
--tom
--
You are the sponsor for the account andrew (Andrew Hume).
------------------------------
Date: 15 May 1998 15:02:27 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jhle3$h8a@news-central.tiac.net>
In article <6jhk40$e1t$2@csnews.cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> wrote:
>In comp.lang.perl.misc, fsg@ultranet.com writes:
>:It's like screaming at a pig that has taken a dump in your yard:
>:ultimately, you're not going to educate the pig. Instead, build a fence
>:around your yard. Make a killfile,
>
>And shoot the pig?
"... mmmmmmm ... pork"
-- Homer Simpson
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: Fri, 15 May 1998 10:18:05 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <355C5CAD.99D1F2AF@mindspring.com>
fsg@ultranet.com wrote:
>
> In a perfectly idealistic
> world where I had an infinite amount of time and the stomach to deal with
> the Windows API directly, I would possibly not use an IDE.
One quibble: strictly speaking, the IDE isn't shielding you from the
Windows API: it's the language and its libraries (VB, Object Pascal,
VCL, MFC, etc.) that's doing that. You could use Notepad and the
command line to do everything you need to do to make a program in, say,
Delphi, and still not have any more contact with the API than before.
Somewhat tangentially, I have a friend who just told me that he and his
cow orkers use Perl to batch-manipulate VB form files! It's a big,
messy world out there!
------------------------------
Date: 15 May 1998 15:08:06 GMT
From: smcdow@arlut.utexas.edu (Stuart McDow)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jhlom$7nt$1@ns1.arlut.utexas.edu>
fsg@ultranet.com writes:
>
> If in the act of attracting 1,000 posers, 1 cool hacker is made,
> let's attract 1,000,000.
Um, you go ahead. I'll just watch.
The prospect of 1,000,000 posers is too depressing for words. If you
want to deal with them, that's your prerogative.
--
Stuart McDow Applied Research Laboratories
smcdow@arlut.utexas.edu The University of Texas at Austin
"Look for beauty in roughness, unpolishedness"
------------------------------
Date: Fri, 15 May 1998 10:25:20 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <355C5E60.D447022B@mindspring.com>
Lloyd Zusman wrote:
> Let's face it ... the days when computers were the domain of a select
> few freaks, wizards, and hackers are over. Kids who have been
> routinely using computers since early grammar school are already in
> college, or even older. It won't be long before the home computer
> will be considered to be as much of an appliance as the washing
> mashine and as much of an everyday fixture as the TV set and the
> telephone. Like it or not, millions of regular folks who never heard
> of Alan Turing or Donald Knuth or Kernighan and Ritchie are trying and
> will continue to try their hands at programming.
>
One question to ponder: as a machine becomes an appliance (think "car",
for instance), are *more* or *fewer* people qualified to
make/modify/repair it?
------------------------------
Date: Fri, 15 May 1998 16:57:41 +0200
From: Koos Pol <koos_pol@bigfoot.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <355C57E5.7A11@bigfoot.com>
Tom Christiansen wrote:
> --tom, still wondering how to pass arguments to a mouse click
Very appropriate and in line with your line of thought. Nevertheless,
I think you have to be (very) carefull not generalizing too much.
I can't believe there is only room for black and white without
grayshades.
--
Koos Pol
----------------------------------------------------------------------
S.C. Pol tel: +31 20 3116122
Systems Administrator email: Koos_Pol@bigfoot.com
Compuware Europe PGP public key available upon request
A little inaccuracy sometimes saves tons of explanation.
-- H. H. Munroe
------------------------------
Date: Fri, 15 May 1998 10:44:31 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <355C62DF.71536D7A@mindspring.com>
Eric Bohlman wrote:
> One could argue that IDEs were created to fulfill a need that no longer
> exists. They originated as DOS applications, where they served an
> important function, namely getting around some of the limitations imposed
> by having a single-task OS. The benefit of an IDE was that, for example,
> you didn't have to keep reloading your editor and then reloading your
> source after after trying a compile, and you didn't have to write down or
> print out your list of error messages and warnings (in case you couldn't
> memorize them at all) before reloading your editor wiped them off the
> screen. Those were real benefits.
>
> But now, even Win95 lets you have multiple console windows open at the
> same time. You can keep one (or several) editing sessions open at the
> same time you run a compilation. You can be editing in one window and
> looking at error messages in another one. Now, it's possible to get
> those benefits without an IDE, using ordinary command-line tools. From
> this point of view, people look for IDEs not because IDEs are
> particularly useful, but because IDEs are what they're used to.
>
Those are all good points. I'd point out, though, that a console window
in Win95 still isn't as good as an xterm or Win95 editor in at least one
respect: you can't scroll in it! And that's a *big* advantage you have
in the Win IDEs.
So to some extent the IDEs are still a crutch for the deficiencies of
the OS.
------------------------------
Date: 15 May 1998 14:58:48 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jhl78$5tp2@eccws1.dearborn.ford.com>
Tom Christiansen <tchrist@mox.perl.com> writes:
> In comp.lang.perl.misc, fsg@ultranet.com writes:
> :But unless you can explain how win32 people asking questions in
> :comp.lang.perl.misc will cause the downfall of Perl, I'm afraid
> :you're just being unpleasantly religious.
>
> It's trivial: They flood the group with useless questions that they are
> too lazy to lift a finger for themselves. They don't look up the docs
> even though these are included on their very systems. ...
I agree with Tom that c.l.p.m is clogged with people just like he
describes. I have to wonder whether these people are representative of the
entire Windows community, the Windows programming community, or even just
the Windows Web development community. Seems to me that Windows has a
captive (but not captivated... ;) developer base in the tens of millions
and we only see a few thousand of them here. Can we recognize the clueful
Windows programmers?
IMHO, this discussion is only important to the future of Perl if the
clueless newbies are really representative of the Windows programming
community. If they are, I'd say Perl's future depends on Linux (because
Unix' future seems to depend on Linux). Anybody have solid data?
- Ken
--
Ken Fox (kfox@ford.com) | My opinions or statements do
| not represent those of, nor are
Ford Motor Company, Powertrain | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section | "Is this some sort of trick
| question or what?" -- Calvin
------------------------------
Date: Fri, 15 May 1998 11:01:51 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <355C66EF.56806D69@mindspring.com>
Tom Christiansen wrote:
> My dad can send mail, but she
> can't program -- that's what Mom's around for. :-)
>
As well as for being the *male*, judging by your use of pronoun... :-)
------------------------------
Date: Fri, 15 May 1998 11:05:28 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <355C67C8.D2A9ECBF@mindspring.com>
Art Cohen wrote:
>
> Greg Bacon <gbacon@cs.uah.edu> wrote:
> : In article <6je3d3$o7q@news.nl.compuware.com>,
> : koos@stag (Koos Pol) writes:
> : : Flipping pages is
> : : better that flipping manpages after all...
>
> : I'm not sure who said it first (I suspect Tom C.), but you can't grep
> : dead trees.
>
> That's why books have indexes. (Or indices, if you're anal retentive).
>
> And you can't take manpages into the bathroom...
>
OTOH, if you're anal retentive, why would you... oh, never mind...
------------------------------
Date: 15 May 1998 15:46:57 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jho1h$ig9$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
keithmur@mindspring.com writes:
:I'd point out, though, that a console window
:in Win95 still isn't as good as an xterm or Win95 editor in at least one
:respect: you can't scroll in it!
While you're naming points of pain,
consider how to telnet into your machine to do the same work
remotely as you had sitting at the console (ie. telnet style)
Or how to do remote GUIs (ie. export DISPLAY=foo.bar.com:0 style).
--tom, opposing yesterday's computing tomorrow.
--
/* we have tried to make this normal case as abnormal as possible */
--Larry Wall in cmd.c from the perl source code
------------------------------
Date: 15 May 1998 15:57:19 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jhokv$ig9$3@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, keithmur@mindspring.com writes:
:Tom Christiansen wrote:
:> My dad can send mail, but she
:> can't program -- that's what Mom's around for. :-)
:>
:As well as for being the *male*, judging by your use of pronoun... :-)
Bug. My mom (female) can program. My dad (male) does not.
--tom
--
"Unix has its weak points, but its file system is not one of them." -Chris Torek
------------------------------
Date: 15 May 1998 16:36:45 GMT
From: chris+usenet@netmonger.net
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jhqut$f46$1@schenectady.netmonger.net>
Keywords: If you're happy and you know it, clunk your chains.
In article <6jforg$o5i$7@csnews.cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc,
> murrayb@vansel.alcatel.com writes:
> :So at what point does this IDE become redundant because you are doing
> :work already available via the operating system?
>
> That's the whole point. These silly things -- including emacs -- are
> best for people who don't know how to use the tools that came with
> their operating system. And they'll never learn them either, since
> they aren't using them. It's like emacs weenies who freak out
> when you autoreformat paragraphs in vi. Folks who never learned the
> multiple-tool philosophy and orthogonal command set are stumped.
I've had quite enough of this; I'm taking you out of my auto-select
file. You used to occasionally post useful insights, bits of code
you've written, or even the odd bit of entertainment, but now it's at
least 90% venom and garbage. And the sad part is that I AGREE WITH
MUCH OF IT, but it's still not worth reading.
As an Emacs user, I gave up "vi bashing" in my unix infancy. There's
no point. Both editors work, both are available in a variety of
free-software forms, and both a very much suited to the Unix Way and
are certainly on Perl's side in the grand scheme of things. (Pun only
partially intended.) You obviously haven't a clue (or are choosing to
ignore in order to persist in dribbling pablum) that there are people
with ten times as much knowledge and talent as you who use Emacs.
Some of them WROTE those tools you claim they don't know how to use.
M-q C-x C-s C-x C-c
--
Christopher Masto <chris+usenet@netmonger.net>
Director of Operations, NetMonger Communications, Inc.
"Behold the Power of Cheese"
------------------------------
Date: Fri, 15 May 1998 09:27:25 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6jhqdm$mg6@hplntx.hpl.hp.com>
[courtesy cc of this posting sent to cited author via email]
Tom Christiansen wrote in message
<6jho1h$ig9$1@csnews.cs.colorado.edu>...
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc,
> keithmur@mindspring.com writes:
>:I'd point out, though, that a console window
>:in Win95 still isn't as good as an xterm or Win95 editor in at least
one
>:respect: you can't scroll in it!
>
>While you're naming points of pain,
>consider how to telnet into your machine to do the same work
>remotely as you had sitting at the console (ie. telnet style)
>Or how to do remote GUIs (ie. export DISPLAY=foo.bar.com:0 style).
I use two commercial products (Carbon Copy and pcAnywhere) which support
remote GUI access, exactly as if one were sitting at the console. But
they are not true multiple terminals -- they share the same display,
mouse and keyboard drivers. So anyone actually sitting at the console
sees the same display as you and can also control the mouse and
keyboard. It's a weird experience, but it works (even over ordinary
modems) and can be configured for appropriate security.
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Fri, 15 May 1998 08:26:00 -0700
From: "Mr. Hellas" <mr_hellas@hotmail.com>
Subject: Inserting commas and decimal point into a signed value.
Message-Id: <355C5E88.6AAD48F9@hotmail.com>
I've been trying to do this with regular expressions but Im still wet
behind the ears on this. I want to place commas and a decimal point
into a signed value. The number of sigificant digits (left of the
decimal point) could be AT MOST six, and the degree of precision (right
of the decimal point) MUST ALWAYS be two. The following potential
values could appear.
S########
S#####
S####
Mr. H.
--
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
|-| Mr. Hellas "I don't make problems. |-|
|-| mr_hellas@hotmail.com I just fix them."|-|
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
------------------------------
Date: 15 May 1998 15:46:55 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Inserting commas and decimal point into a signed value.
Message-Id: <6jho1f$i0g@news-central.tiac.net>
Given some sample data and expected output this would probably be a little
easier, but using the answer from FAQ section 5 (perldoc perlfaq5 or go to
http://www.perl.com and browse the FAQs link...) and sprintf you might end
up with something like:
$value = 123456.7;
$formatted = sprintf '%.2f', $value;
1 while $formatted =~ s/^(-?\d+)(\d{3})/$1,$2/;
which leaves $formatted containing '123,456.70'.
There are many other ways to do it, all of the things I've used above are
explained in the docs supplied with perl...
Hope this helps,
Mike
In article <355C5E88.6AAD48F9@hotmail.com>,
Mr. Hellas <mr_hellas@hotmail.com> wrote:
>I've been trying to do this with regular expressions but Im still wet
>behind the ears on this. I want to place commas and a decimal point
>into a signed value. The number of sigificant digits (left of the
>decimal point) could be AT MOST six, and the degree of precision (right
>of the decimal point) MUST ALWAYS be two. The following potential
>values could appear.
>
> S########
> S#####
> S####
>
>Mr. H.
>
>--
>|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
>|-| Mr. Hellas "I don't make problems. |-|
>|-| mr_hellas@hotmail.com I just fix them."|-|
>|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: 15 May 1998 15:50:14 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Inserting commas and decimal point into a signed value.
Message-Id: <6jho7m$ig9$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, "Mr. Hellas" <mr_hellas@hotmail.com> writes:
:I've been trying to do this with regular expressions but Im still wet
:behind the ears on this. I want to place commas and a decimal point
:into a signed value. The number of sigificant digits (left of the
:decimal point) could be AT MOST six, and the degree of precision (right
:of the decimal point) MUST ALWAYS be two. The following potential
:values could appear.
What part of perlfaq4's question on ``Why am I getting long decimals
(eg, 19.9499999999999) instead of the numbers I should be getting (eg,
19.95)?'' or perlfaq5's question ``How can I output my numbers with
commas added?'' did you find particularly opaque?
--tom
--
TCP/IP: handling tomorrow's loads today
OSI: handling yesterday's loads someday
------------------------------
Date: Fri, 15 May 1998 11:58:37 -0500
From: Robert Boyd Skipper <rbskipper@wimberley-tx.com>
To: carrr@mris.com
Subject: Re: installing CGI.PM
Message-Id: <355C743C.EB3BCDE2@wimberley-tx.com>
Windows is different. Makefile and MakeMaker don't work for them. Use the
perlw32-install batch file included in the distribution, and it should solve
your problems. Also, activestate has a very lively users' group listserv for
Win32.
I hope this helps.
Skipper
carrr@mris.com wrote:
> I installed activestates Win32 perl on my Win95 machine but it seems to be
> missing stuff. I downloaded CGI.pm but when I run the makefile.pl it says I
> am missing some files. It can't find \core\perl.h. I don't have that
> directory or file. Help.
>
> Rick
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 15 May 1998 10:53:48 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Learning Perl vs Programming Perl (Books)
Message-Id: <355C56FC.54AEB63E@matrox.com>
> print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
> ## legal fund: $20,990.69 collected, $186,159.85 spent; just 110 more days
> ## before I go to *prison* for 90 days; email fund@stonehenge.com for details
>
> --
> Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
> Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
> Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
> Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
> Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
I have a confession to make:
The only thing that keeps me around this newsgroup is contained in Randal's .sig!
(Yes .. it wildly amuzes me .. and confuses me .. and motivated me!)
I am waiting for those 110 days to pass by...
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: Fri, 15 May 1998 08:46:59 -0700
From: Mcoe NT <root@mail.mcoe.k12.ca.us>
Subject: Major problem on upgrade to Linux 5.0
Message-Id: <355C6373.7D86ADBC@mail.mcoe.k12.ca.us>
Estimados perleros,
I just got through upgrading to Linux 5.0 and when I went to run my perl
scripts in my cgi-bin directory, I got the following:
Can't find loadable object for module Msql in @INC
(/usr/lib/perl5/i386-linux/5.
00401 /usr/lib/perl5 /usr/lib/perl5/site_perl/i386-linux
/usr/lib/perl5/site_per
l .) at find_site line 26
BEGIN failed--compilation aborted at find_site line 26.
It appears the perl can not find all of these *.pm. As you can guess
this brings down my whole site, as everything is perl based. Can anyone
tell me what to do about this? More importantly, can anyone give me a
plan to avoid this problem in the future?
Thank you for your help. Please reply to: sirron@mail.mcoe.k12.ca.us
Joseph Norris (Sys Admin/perl/Linux/cgi)
@n=(106,117,115,116,32,97,110,111,116,104,101,114,32,112,101,114,108,32,
104,97,99,107,101,114,32,106,111,115,101,112,104,32,78,111,114,114,105,115,10);
print @c=map chr,@n;
------------------------------
Date: Fri, 15 May 1998 11:19:42 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Newbie question: how do I.....
Message-Id: <355C5D0E.7EA8D3B9@matrox.com>
> p.s. You can get your very own copy of that HTML FAQ at
> ftp://ftp.wownet.net/pub2/PERL/doc/FAQs/FAQ/PerlFAQ.html . Click on it,
> and save it to your hard disk locally so you don't have to pull it up
> from the Web whenever you want to look at it.
Great idea .. but what happens when the FAQ gets updated ? ;-)
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: Fri, 15 May 1998 11:11:19 -0400
From: "Scott Michels" <smichels@is.nascar.com>
Subject: Re: Nuclear bombing of NEW YORK! Small countries can target with nukes!
Message-Id: <6jhluh$e1s$1@supernews.com>
Gee, my wife subscribes to Redbook magazine and I never had a clue that they
put things like that in there. Wow!
Scott
smichels@is.nascar.com
Jonathan Feinberg wrote in message ...
> All-One or none! As Mao found in Redbook '51, "Marxism once in power,
> is unworkable! Has less value than cow dung! Its power is the gun!"
------------------------------
Date: Fri, 15 May 1998 11:26:12 -0400
From: Dave Bushong <dbushong@my-dejanews.com>
Subject: Re: Perl not and ! operator differences
Message-Id: <355C5E93.D0D7D6E1@my-dejanews.com>
Tom Christiansen wrote:
> capital all these bogotic quote and quote comma quote or quote comma
> and quote not quote absurdities do is push down knowledge of operator
> precedence from one place in the language to the other period capital
> they also make it harder to read and maintain code period capital
> punctutation is a good thing period Too many words turn into lisp
> comma which no claims easy to read period
*** Error in line 5: Missing keyword "capital" before unknown character "T"
(0x54)
*** Can't call method "Too" in empty package "many" at (eval 4) line 5, <IN>
chunk 1.
------------------------------
Date: Fri, 15 May 1998 10:36:14 -0400
From: xuming wang <xuming@xxx.email.unc.edu>
Subject: Re: PERL5LIB, @INC, and "Can't locate loadable object..."
Message-Id: <355C52DE.8811644B@xxx.email.unc.edu>
Tom Phoenix wrote:
>
> Hi, Eryq!
>
> On Thu, 14 May 1998 eryq@zeegee.com wrote:
>
> > When I try to just "use lib ..." that directory, though,
> > and erase the PERL5LIB environ var, I get...
> >
> > Can't locate GDBM_File.pm in @INC (@INC contains...)
> >
> > where @INC contains the same path to my Perl modules as was
> > in my PERL5LIB environment variable!
>
> Weird! Are you absolutely sure that you've got the exact same path in both
> places? (For example, could there be control characters or whitespace in
> the name somewhere? Printing unpack("H*", $whatever) can be informative.)
> Also, can you set PERL5LIB within a BEGIN block in your program to get it
> to work?
>
> But you may have uncovered a real bug....
I had same problem on Linux and have it on 2 win95 machines.
I solved the problem on Linux by adding one more path to @INC. (I installed
modules to my own dir and have to add 2 paths to @INC.)
--
Xuming Wang
To reply via email, remove x's from address.
------------------------------
Date: Fri, 15 May 1998 10:18:33 -0500
From: "Todd A. Guillory" <tag@io.com>
Subject: Print Array adds space when sent to SENDMAIL????
Message-Id: <355C5CC4.1DBAF7C2@io.com>
I was writing a PERL script to format an HTML form. I was parsing each
newline into an array index when I started noticing that a white space was
inserted at the beginning of each line EXCEPT the first, so I tried this:
@array = ("cat","dog","pig","goat");
open (SENDMAIL, "| /usr/lib/sendmail -t -n");
print SENDMAIL <<End_of_Mail;
From: tag\@io.com
To: tag\@io.com
@array;
End_of_Mail
close(SENDMAIL);
exit;
In the email body I got this:
cat dog pig goat
but at the CL I got:
catdogpiggoat
Anybody know what gives???
------------------------------
Date: Fri, 15 May 1998 16:29:50 GMT
From: collin@rogowski.de (Collin Rogowski)
Subject: Problem with s///
Message-Id: <355c6d13.5533236@news.uni-X.net>
#!/usr/local/bin/perl -w
use strict;
my $t = '(a -> (a -> b)) -> (a -> b)';
my $s = 'a -> (a -> b)';
$t =~ s/$s//g;
Why doesn't s/// replace $s in $t. To match $s with $t you just have
to shift one pos to the right.
I'm going crazy on this. Please help.
------------------------------
Date: Fri, 15 May 1998 11:48:15 -0500
From: Robert Boyd Skipper <rbskipper@wimberley-tx.com>
To: Collin Rogowski <collin@rogowski.de>
Subject: Re: Problem with s///
Message-Id: <355C71CE.B7C176D6@wimberley-tx.com>
You have to backslash the parens in $s.
my $t = '(a -> (a -> b)) -> (a -> b)';
my $s = 'a -> \(a -> b\)';
$t =~ s/$s//g;
changes $t to
() -> (a -> b)
Check out the man pages.
Skipper
Collin Rogowski wrote:
> #!/usr/local/bin/perl -w
>
> use strict;
>
> my $t = '(a -> (a -> b)) -> (a -> b)';
> my $s = 'a -> (a -> b)';
>
> $t =~ s/$s//g;
>
> Why doesn't s/// replace $s in $t. To match $s with $t you just have
> to shift one pos to the right.
> I'm going crazy on this. Please help.
------------------------------
Date: 15 May 1998 16:38:58 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Problem with s///
Message-Id: <6jhr32$n0h$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
collin@rogowski.de (Collin Rogowski) writes:
:Why doesn't s/// replace $s in $t. To match $s with $t you just have
:to shift one pos to the right.
:I'm going crazy on this. Please help.
Because "(" is special to pattern matching.
--tom
--
"Perl is to sed as C is to assembly language." -me
------------------------------
Date: Fri, 15 May 1998 10:45:30 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: reading file into an array of hash
Message-Id: <355C550A.22C7BA47@matrox.com>
> while (<FILE) {
Ooops .. that should've been:
while (<FILE>) { # of course you knew that! ;-)
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: Fri, 15 May 1998 10:42:40 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: reading file into an array of hash
Message-Id: <355C5460.1646AA5D@matrox.com>
Xah wrote:
<snip>
> #!/usr/local/bin/perl -w
>
> use strict;
>
> my($filePath) = '/somedir/tempRawData.txt';
>
> # @array1
> my(@array1);
>
> # the final desired ref.
> my($record);
>
> {
>
Not sure why you need this brace for .. that defines a block .. which doesn't
really hurt, but isn't very useful!
> local($/) = '-----------';
> if (not(open(FILE,"<$filePath"))) {die "Cannot open file: $!;"};
>
Apparently you come from a C culture ;-)The above line works fine, but the
Perlish way to go is:
open File, "$filePath" or die "Can not open file: $!";
(No need for the "<" and the semicolon should be outside the quotes ;-)
> @array1 = <FILE>;
>
You read the ENTIRE file into an array. What if the file is HUGE? Too much
memory consumption and less speed!
> if (not(close(FILE))) {die "Cannot close file: $!;"};
>
Again.close FILE or die "Can not close file: $!";
> };
>
> {
> my($textBlock);
> my($i);
>
Could've saidmy ($textBlock, $i);
Although you don't really need the $i
> foreach ($i = 0; $i <= $#array1; $i++) {
Hmmm.. first time I see such a construct using "foreach" (I know .. foreach is
an alias to for .. or vice versa) .. but the Perlish way is:foreach $i
(0..$#array1)
> $textBlock = $array1[$i];
> my(@lines) = split('\n',$textBlock);
>
> my($line);
> foreach $line (@lines) {
> if ($line =~ m{^([^:]+): (.+)$}) {
> $record->[$i]->{$1} = $2;
> };
> };
> };
> }
>
I am not your average Perl expert .. but I would do things a bit differently:
open FILE, "$filePath" or die "Can't open file: $!";
while (<FILE) {
next if (/^\s+$/ or /\-+/); # skip over empty and separating lines
my ($key, $value) = split /:/;
$record{$key} = $value;
}
One of the first things I did when I started learning Perl is to get used to the
Perlish way of doing things. It just makes your life a whole lot easier!
Hope that was helpful
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: 15 May 1998 16:58:08 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Removing ^M at the end of each line of a file.
Message-Id: <6jhs70$hks$1@client3.news.psi.net>
Leonard Miller (millers3@sonic.net) wrote on MDCCXVIII September MCMXCIII
in <URL: news:millers3-1405982327540001@d58.pm8.sonic.net>:
++ In article <6j9jhi$plt$1@inn.imcn.com>, "N6006024"
++ <pernande@dev.amadeus.net> wrote:
++
++ > After having saved a perl script with Homesite 3.0, when I open the script
++ > using vi I can see that each line is ended by a ^M. Consequently, I made a
++ > perl script to remove ^M.
++ > My code looks like this :
++ >
++ > open (FILE, ">$ARGV[0]") || die "Cannot open $ARGV[0] : $!";
++ > while (<FILE>) {
++ > s/\^M//g;
++ > print <FILE> $_;
++ > }
++ > close(FILE) || die $!;
++ >
++ > Thanks in advance for your help,
++ >
++ > Philippe.
++
++ When you print to a FILEHANDLE the angle operator is not used.
++ Should be:
++
++ print FILE $_;
No, not really. Think about it.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: Fri, 15 May 1998 11:58:58 -0400
From: Brian O'Neill <Brian_ONeill@uml.edu>
Subject: Should Berkeley DB file be locked during tie?
Message-Id: <355C6642.44EE8A62@uml.edu>
I heard someone mention that DB/DBM files didn't need to be locked, but
I wasn't sure. I'm not implementing something doing a DB_File tie, and
was wondering if I should be locking the file? Multiple writes is a
potential hazard in this case.
--
======================================================================
Brian O'Neill - Director of Computing, Computer Science (978) 934-3645
University of Massachusetts Lowell <*> Brian_ONeill@uml.edu
Acting Postmaster
------------------------------
Date: Fri, 15 May 1998 12:09:05 -0400
From: Brian O'Neill <Brian_ONeill@uml.edu>
Subject: Re: Should Berkeley DB file be locked during tie?
Message-Id: <355C68A1.AEA2A652@uml.edu>
Hate to follow up to myself so soon, but Guy Decoux pointed out its in
the docs...I have the book, but those pages were stuck together and I
didn't notice... :^(
--
======================================================================
Brian O'Neill - Director of Computing, Computer Science (978) 934-3645
University of Massachusetts Lowell <*> Brian_ONeill@uml.edu
Acting Postmaster
------------------------------
Date: Fri, 15 May 1998 15:05:48 GMT
From: Aidan Rogers <aidan@crux.blackstar.co.uk>
Subject: Re: Substitution Problems :(
Message-Id: <895248353.162005@sparc.tibus.net>
: I really think maybe you ought to be using the quotemeta operator.
: It's built in, and does what you want (probably).
: John Porter
I wasn't ware that it existed :) However, it backslashes out characters
that I don't want backslashed out. So, I still have the same problem :(
Aidan
- A camel is a llama that has taken the hump
------------------------------
Date: 15 May 1998 10:22:40 -0500
From: jima@MCS.COM (Jim Allenspach)
Subject: Re: Substitution Problems :(
Message-Id: <6jhmk0$4d6@Mercury.mcs.net>
> s/\'/\\\'/g;
>all this seems to do is put 2 backslashes in front of the '. Does anyone know
>a way to substitute in just _one_ backslash?
Well, since ' is not a special character in an RE, you should
probably be able to do
> s/'/\\'/g;
and that should be okay. (BTW, you don't mention what version of Perl
you're using, but in testing under 5.004_01, your original RE seems to
work. Perhaps this an old bug/feature?)
jma
------------------------------
Date: Fri, 15 May 1998 08:36:10 -0700
From: "Larry Rosler" <lr@hpl.hp.com>
Subject: Re: Substitution Problems :(
Message-Id: <6jhne3$li4@hplntx.hpl.hp.com>
[posted and emailed]
Aidan Rogers wrote in message <895241294.543069@sparc.tibus.net>...
>I'm having a slight problem with a substitution. Basically, I am
writing a little
>subroutine that will put a backslash before any special characters in a
variable.
>However, when I came to do the substitution for the ' character, it
wouldn't work.
>
>here is the syntax of the command I was using...
>
> s/\'/\\\'/g;
>
>all this seems to do is put 2 backslashes in front of the '. Does
anyone know a
>way to substitute in just _one_ backslash?
>
>Thanks in advance,
>
>Aidan
>(slowly learning quickly :)
Your example does what you want. Why do you think it doesn't?
my $x = "a'b'c";
$x =~ s/\'/\\\'/g;
print "$x\n";
__END__
a\'b\'c
Note that the backslashes before the single-quotes are unnecessary,
because single-quotes are not "special" in regular expressions or in
substitutions. So this:
$x =~ s/'/\\'/g;
works just as well. But some of the other characters that you consider
"special" may be special in these circumstances and require the extra
backslash (e.g., | in the regex, or backslash on either side).
--
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: Fri, 15 May 1998 11:15:28 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: TIMTOWTDI - regex vs. if (function)
Message-Id: <355C5C10.97247F07@matrox.com>
Ward Kaatz wrote:
> I considered but avoided use of (s)printf based on the camel book
> observation (pg 200, 2nd ed.).
I don't see any considerations about using sprintf on that page of the
camelbook .. or on any other page for that matter!!!
--
Ala Qumsieh | No .. not just another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
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 2609
**************************************