[24279] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 6470 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 26 18:10:55 2004

Date: Mon, 26 Apr 2004 15:10:15 -0700 (PDT)
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, 26 Apr 2004     Volume: 10 Number: 6470

Today's topics:
    Re: is there a way ..... any way (Walter Roberson)
    Re: is there a way ..... any way <tadmc@augustmail.com>
    Re: is there a way ..... any way (Walter Roberson)
    Re: is there a way ..... any way <me@privacy.net>
    Re: NEed your help with yahoo and dynamic URL <jwillmore@remove.adelphia.net>
        Newsreader - human error [OT] <jwillmore@remove.adelphia.net>
    Re: noob question: Trying to extract part of a string i <tadmc@augustmail.com>
        Odd behavior of mod_perl's PerlSetEnv with PERL5LIB (Tony Skelding)
    Re: other perl groups <jwillmore@remove.adelphia.net>
    Re: other perl groups <pfancy@bscn.com>
    Re: other perl groups <pfancy@bscn.com>
    Re: other perl groups <pfancy@bscn.com>
    Re: other perl groups (Randal L. Schwartz)
    Re: other perl groups <ittyspam@yahoo.com>
    Re: other perl groups <robin @ infusedlight.net>
    Re: other perl groups <uri.guttman@fmr.com>
        output to STDOUT to a file (joe shaboo)
    Re: output to STDOUT to a file <ittyspam@yahoo.com>
    Re: output to STDOUT to a file <robin @ infusedlight.net>
    Re: output to STDOUT to a file <remorse@partners.org>
    Re: output to STDOUT to a file <dwall@fastmail.fm>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 26 Apr 2004 18:58:51 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: is there a way ..... any way
Message-Id: <c6jm5b$3ke$1@canopus.cc.umanitoba.ca>

In article <Xns94D78E33A157dkwwashere@216.168.3.30>,
David K. Wall <dwall@fastmail.fm> wrote:
:One reason not to post much, though, is that some of you seem to be 
:hooked up to a life-support system that allows you to never leave the 
:computer, constantly answering posts regardless of the time of day or 
:day of the week. Do you all ever sleep? 

I'm not hooked up to a life-support system yet -- but I did spend many
years online and posting so much and at such odd hours that it would
have been hard for anyone out there to tell the difference. Eventually
that lifestyle hit my health, and hit it hard. I'm still learning how
to "let go" and pay attention to what my body is telling me -- still
telling myself "The world won't end if I don't do or answer this
myself."
-- 
100% of all human deaths occur within 100 miles of Earth.


------------------------------

Date: Mon, 26 Apr 2004 14:11:11 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: is there a way ..... any way
Message-Id: <slrnc8qnmf.pjr.tadmc@magna.augustmail.com>

David K. Wall <dwall@fastmail.fm> wrote:

> One reason not to post much, though, is that some of you seem to be 
> hooked up to a life-support system that allows you to never leave the 
> computer, constantly answering posts regardless of the time of day or 
> day of the week. Do you all ever sleep? 


I take cat-naps while writing

   use warnings and strict
   check open's return value
   don't use ampersands on function calls
   don't use dollar-digit vars unless match succeeded
   ...

answers for the 50th time.

I spend so much time on those type of posts that Real Sleep is not necessary.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 26 Apr 2004 20:12:19 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: is there a way ..... any way
Message-Id: <c6jqf3$9d0$1@canopus.cc.umanitoba.ca>

In article <d2023fafe9023c1392d48909b2c9e19a@news.teranews.com>,
Randal L. Schwartz <merlyn@stonehenge.com> wrote:
:>>>>> "Walter" == Walter Roberson <roberson@ibd.nrc-cnrc.gc.ca> writes:

:Walter>  And if no-one answers it, then we save our sanity by just
:Walter> letting it go unanswered.

:Maybe you can afford that luxury in other areas, but there's a lot of
:cargo-culted junk in the semi-answers all over the web, and everyone
:seems to consider themselves an expert after reading some random web
:tutorial.

Randal, I understand what you mean, because I've lived through
much the same experience -- and most times that I felt "in control", I'd
end up pushing into yet another technical area until I was
comfortably overwhelmed again.

About two months ago, I finally listened to what I was saying to myself
and bitching about to others: computers had taken over my life, and my
first reaction to nearly -everything- was to go online, do email, read
and post, do a quick google search. From about 2 minutes after I woke
up until about 2 minutes before I fell asleep at night. So I did something
about it: I took 10 (calendar) days vacation, and turned off my computer
and went "cold turkey" without computers for the entire time. I moped,
I slept, I got sick of myself, felt depressed -- but eventually I
got to the point where I could live with myself, without needing to
turn to the computer all the time, and without always feeling like
I was responsible for all the problems that happened because I wasn't
there to take head them off.


:So, what happens in the Perl community is that the absence
:of good answers from experts gets filled up with crap answers from
:answerer-wannabes.  Eeek.  And this contributes to the burnout from
:the experts.

Randal, you've done an amazing amount for the Perl community, and you
clearly don't want to see your efforts go to waste. But what I "hear"
in what you write is that, at least at this time, your work on Perl is
draining you rather than sustaining you. If you don't want to end up
the way I ended up, in a confused and emotionally draining stupour for
10+ months, nearly unable to leave the house, unable to cook a simple
meal for myself, barely able to use a bottle opener at times, despondant
about how badly I felt and how little I could do for myself -- if you
don't want to end up like that, then LEARN TO LET GO.

Cargo-culted perl sites grow up? Hard as it may be: let them grow.
Some of them will "grow up" and become important and useful; and some
of them will poison the style of people: let their styles be poisoned.
You, Randal, are not *personally* responsible for helping each and
every person achieve their maximum potential in Perl. Perl has gotten
too big: your self-appointed task is akin to trying to educate every
single web page creator about bad HTML, or akin to trying to educate
every PC user about all the ways that MS Windows is broken.

Relinquishing your life's work to the barbarian masses is darn near
heart-breaking -- but if you don't learn how to loosen your grip, then
it's going to break you. :(


Randal, on the whole, I would prefer that instead of answering this
posting, that you would turn off your computer, and go take a walk
in the park, take some old bread and feed the birds along the way.
Sit on a bench and watch some children play. And not "tomorrow, the day
after, real soon now": people like you and I always find another
"emergency" to deal with but never seem to find the time to "just be".
-- 
Warning: potentially contains traces of nuts.


------------------------------

Date: Mon, 26 Apr 2004 21:38:13 +0000 (UTC)
From: anon <me@privacy.net>
Subject: Re: is there a way ..... any way
Message-Id: <c6jvg4$sch$1@hercules.btinternet.com>

Walter Roberson wrote...

 > In article <d2023fafe9023c1392d48909b2c9e19a@news.teranews.com>,
 > Randal L. Schwartz <merlyn@stonehenge.com> wrote:
 > :>>>>> "Walter" == Walter Roberson <roberson@ibd.nrc-cnrc.gc.ca> writes:
 >
 > :Walter>  And if no-one answers it, then we save our sanity by just
 > :Walter> letting it go unanswered.
 >
 > :Maybe you can afford that luxury in other areas, but there's a lot of
 > :cargo-culted junk in the semi-answers all over the web, and everyone
 > :seems to consider themselves an expert after reading some random web
 > :tutorial.
 >
 > Randal, I understand what you mean, because I've lived through
 > much the same experience -- and most times that I felt "in control", I'd
 > end up pushing into yet another technical area until I was
 > comfortably overwhelmed again.
 >
 > About two months ago, I finally listened to what I was saying to myself
 > and bitching about to others: computers had taken over my life, and my
 > first reaction to nearly -everything- was to go online, do email, read
 > and post, do a quick google search. From about 2 minutes after I woke
 > up until about 2 minutes before I fell asleep at night. So I did 
something
 > about it: I took 10 (calendar) days vacation, and turned off my computer
 > and went "cold turkey" without computers for the entire time. I moped,
 > I slept, I got sick of myself, felt depressed -- but eventually I
 > got to the point where I could live with myself, without needing to
 > turn to the computer all the time, and without always feeling like
 > I was responsible for all the problems that happened because I wasn't
 > there to take head them off.
 >
 >
 > :So, what happens in the Perl community is that the absence
 > :of good answers from experts gets filled up with crap answers from
 > :answerer-wannabes.  Eeek.  And this contributes to the burnout from
 > :the experts.
 >
 > Randal, you've done an amazing amount for the Perl community, and you
 > clearly don't want to see your efforts go to waste. But what I "hear"
 > in what you write is that, at least at this time, your work on Perl is
 > draining you rather than sustaining you. If you don't want to end up
 > the way I ended up, in a confused and emotionally draining stupour for
 > 10+ months, nearly unable to leave the house, unable to cook a simple
 > meal for myself, barely able to use a bottle opener at times, despondant
 > about how badly I felt and how little I could do for myself -- if you
 > don't want to end up like that, then LEARN TO LET GO.
 >
 > Cargo-culted perl sites grow up? Hard as it may be: let them grow.
 > Some of them will "grow up" and become important and useful; and some
 > of them will poison the style of people: let their styles be poisoned.
 > You, Randal, are not *personally* responsible for helping each and
 > every person achieve their maximum potential in Perl. Perl has gotten
 > too big: your self-appointed task is akin to trying to educate every
 > single web page creator about bad HTML, or akin to trying to educate
 > every PC user about all the ways that MS Windows is broken.
 >
 > Relinquishing your life's work to the barbarian masses is darn near
 > heart-breaking -- but if you don't learn how to loosen your grip, then
 > it's going to break you. :(
 >
 >
 > Randal, on the whole, I would prefer that instead of answering this
 > posting, that you would turn off your computer, and go take a walk
 > in the park, take some old bread and feed the birds along the way.
 > Sit on a bench and watch some children play. And not "tomorrow, the day
 > after, real soon now": people like you and I always find another
 > "emergency" to deal with but never seem to find the time to "just be".



I agree with this post.





------------------------------

Date: Mon, 26 Apr 2004 14:44:57 -0400
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: NEed your help with yahoo and dynamic URL
Message-Id: <pan.2004.04.26.18.44.51.777325@remove.adelphia.net>

On Mon, 26 Apr 2004 16:10:59 +0000, Danny wrote:

[ ... ]

Where's a code example of what you have tried?

Just to get you started (if you don't have any code written yet :-) ).
read 'lwpcook' - found by typing

perldoc lwpcook

or visit

http://www.perldoc.com/perl5.8.0/lib/lwpcook.html

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
 Oh, wow!  Look at the moon! 
 
 


------------------------------

Date: Mon, 26 Apr 2004 14:36:31 -0400
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Newsreader - human error [OT]
Message-Id: <pan.2004.04.26.18.36.25.900311@remove.adelphia.net>

I use pan and found a whole lot of messages waiting to be sent.  And, like
a trained chimp, I clicked "Yes" a whole lot of times :-(

I know that I *should* know better than to click "Yes" without thinking.

Sorry for any repeat messages.

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
 A lot of people are afraid of heights.  Not me.  I'm afraid of
 widths.   -- Steve Wright 
 


------------------------------

Date: Mon, 26 Apr 2004 16:14:28 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: noob question: Trying to extract part of a string in a variable to another variable
Message-Id: <slrnc8qutk.pqe.tadmc@magna.augustmail.com>

Glenn Jackman <xx087@freenet.carleton.ca> wrote:

> Put the hyphen last:  [\w.+=-]


Or first.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 26 Apr 2004 14:46:55 -0700
From: tony@skelding.co.uk (Tony Skelding)
Subject: Odd behavior of mod_perl's PerlSetEnv with PERL5LIB
Message-Id: <a78026a1.0404261346.4350a717@posting.google.com>

I am using a PerlSetEnv directive in order to have PERL5LIB set to a
directory list at request time.  But the directories are being added
to @INC in reverse order.

For example, in my httpd.conf I have...

PerlSetEnv PERL5LIB foo:bar:xyzzy

In my handler I have...

print "$_\n" for @INC;

The output I get is...

xyzzy
bar
foo
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0

However, if I simply set an environment variable in my shell, e.g.

$ export PERL5LIB=foo:bar:xyzzy
$ perl -e 'print "$_\n" for @INC'

I get...

foo
bar
xyzzy
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
 .


------------------------------

Date: Mon, 26 Apr 2004 14:56:56 -0400
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: other perl groups
Message-Id: <pan.2004.04.26.18.56.47.916850@remove.adelphia.net>

On Sun, 25 Apr 2004 21:30:54 -0500, pfancy wrote:

> Are the any other perl groups who will actually help out people who are NEW
> to perl.

Post a question here and you'll get a response :-)  We do Perl here :-)

If you want something to get you started, read the documentation that
comes with Perl.  perldoc is the utility to read Perl documentation.  For
your starting place, type

perldoc perl

and read :-)  This *should* spark some further reading.

And, you could just read some of the posts here in this newsgroup to see
if what you needed answered has been asked and answered before :-)

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
 Never call a man a fool.  Borrow from him. 
 
 


------------------------------

Date: Mon, 26 Apr 2004 14:32:38 -0500
From: "pfancy" <pfancy@bscn.com>
Subject: Re: other perl groups
Message-Id: <408d7ef0@news.greennet.net>


"Uri Guttman" <uri@stemsystems.com> wrote in message
news:x7vfjncu49.fsf@mail.sysarch.com...
> >>>>> "p" == pfancy  <pfancy@bscn.com> writes:
>
>   p> Are the any other perl groups who will actually help out people who
>   p> are NEW to perl.
>
> why don't you ask those groups if there are any?
>
> kind of odd to ask this group for help while you insult them.
>
> and there are plenty of resources to help you learn perl. hmm, perl
> comes with plenty of docs and many of them are actually tutorials. there
> are at least 2 or more books published about perl. maybe that number is
> a trifle low.
>
> what about all those great free scripts you can steal^Wborrow^Wlearn
> from? millions of script kiddies who claim to know perl learned that
> way!
>
> ever heard of something called school or training?
>
> i just heard of this neat thing called the interweb. maybe it could help
> you?
>
> is that helpful enough?
>
> uri
>
> -- 
> Uri Guttman  ------  uri@stemsystems.com  -------- 
http://www.stemsystems.com
> --Perl Consulting, Stem Development, Systems Architecture, Design and
Coding-
> Search or Offer Perl Jobs  ---------------------------- 
http://jobs.perl.org

Forgive me for insulting but some of you in this group insulted me.  (it was
one of the perl groups.) I asked for help and I got insulted.  So I don't
know what more to say.  I am absolutely new beginner of perl and I need help
if anyone is willing to help me out if not.  OH well.




------------------------------

Date: Mon, 26 Apr 2004 14:37:16 -0500
From: "pfancy" <pfancy@bscn.com>
Subject: Re: other perl groups
Message-Id: <408d8007@news.greennet.net>


"Charlton Wilbur" <cwilbur@mithril.chromatico.net> wrote in message
news:87ekqbni3f.fsf@mithril.chromatico.net...
> >>>>> "pfancy" == pfancy  <pfancy@bscn.com> writes:
>
>     pfancy> Are the any other perl groups who will actually help out
>     pfancy> people who are NEW to perl.
>
> This one will.  Of course, the help you get will most likely be the
> help you *need* rather than the help you *want*.  No group is going to
> be as helpful to a beginner as sitting down for six to eight weeks and
> working your way through a good book.  No group is going to be as
> helpful to a beginner as sitting down for an hour or two a week with a
> good teacher.  And no group *at all* is going to help you with "write
> a program that does this for me, for free."
>
> If you want this group to be helpful, here's what you do.
>
> * Spend at least twenty minutes looking for the answer to your
>   question in _Learning Perl_, _Elements of Programming with Perl_,
>   _Programming Perl_, and _The Perl Cookbook_ -- or preferably all
>   four.  If there's an answer there and you ask the question here, all
>   that will happen here is that you'll be told to RTFM, possibly with
>   a pointer to the appropriate FM to read.  This happens because if
>   there's already a good explanation of the problem and its solution
>   somewhere, then it's better to point the querent at that than to
>   answer it all over again, which takes substantially more time and
>   effort -- and the help you're getting here is FREE, donated by
>   VOLUNTEERS.
>
> * Read at least the questions in the Perl FAQ.  If your question or
>   something very similar is there, read the answer.  If there's an
>   answer there and you ask the question here, all that will happen
>   here is that you'll be told to RTFF, possibly with a pointer to the
>   appropriate entry to read.  This happens for much the same reason:
>   the FAQ entries are there because many people asked the same
>   question, and so instead of investing their effort in writing a
>   hundred different responses, the FAQ authors and maintainers
>   invested their effort into writing one very good response and
>   checking it extensively for accuracy.
>
> * If you find the answer somewhere else and don't understand it, by
>   all means say so, and try to ask specifically about what you don't
>   understand.  This lets people know that (a) you're willing to invest
>   your own effort and do research on your own, which means you're not
>   one of the "write my program for me for free!" sorts of posters; and
>   (b) you'll get responses that aren't just 'RTFM!' because it's clear
>   that you already have and are asking about something you don't
>   understand.
>
> * If you've asked a question before and gotten advice, make sure you
>   are following that advice when you ask your next question.  You can
>   see this trend with Robin:  when he first started asking his
>   questions, people were horrified at the bugs in his code, and
>   offered advice.  Now, several weeks later, he's posting code with
>   the same bad habits and the same bugs, and the reaction has changed
>   from horrified but helpful to "shut up and go away, troll who is
>   unwilling to learn."
>
> * Remember that the people here are volunteers.  Many of us are quite
>   willing to tutor people in Perl, just not for free and not over
>   Usenet.  If you need extensive help and prefer to be walked through
>   things by a tutor instead of teaching yourself based on a good book,
>   then you're not going to be very satisfied with the experience
>   here.  Find a local Perl teacher, and pay him or her $30 an hour to
>   teach you; or take a programming class at your local community
>   college.  Everyone will be happier that way.
>
> Charlton
Believe it or not.  The first thing I did was read books look for beginning
perl online and I did not find what is recommended to be download and what
to use to run perl.  So I ask for it here.  Maybe I just get upset when I
see people asking for help and they get pushed around.  I know they are some
people who ask for help before research and they are some that do research
first and get the cold shoulder for asking for help.  Some of us are slow
learners. but that doesn't mean we are dumb.  because some of us are very
bright once it clicks in our brains.  Just thought I would express myself.

You know I am looking into taking a course.




------------------------------

Date: Mon, 26 Apr 2004 14:38:38 -0500
From: "pfancy" <pfancy@bscn.com>
Subject: Re: other perl groups
Message-Id: <408d8058@news.greennet.net>


"Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote in message
news:c6iu33$ceq7c$1@ID-231055.news.uni-berlin.de...
> Also sprach Charlton Wilbur:
>
> > If you want this group to be helpful, here's what you do.
> >
> > * Spend at least twenty minutes looking for the answer to your
> >   question in _Learning Perl_, _Elements of Programming with Perl_,
> >   _Programming Perl_, and _The Perl Cookbook_ -- or preferably all
> >   four.  If there's an answer there and you ask the question here, all
> >   that will happen here is that you'll be told to RTFM, possibly with
> >   a pointer to the appropriate FM to read.
>
> What you list are four books. None of them is a manual and hence RTFM
> can't apply to any of them.
>
> People need to have a preliminary scan through the perldocs and the
> FAQs. That's all there is to do before posting.
>
> Tassilo


I read through that and I did not understand.  It doesn't tell me how to or
where to find the program to write perl in. that what gets me. I downloaded
active perl active perl dev. etc. but I am still lost.




------------------------------

Date: Mon, 26 Apr 2004 19:41:49 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: other perl groups
Message-Id: <870b27f997553523f4d7f1334ea14538@news.teranews.com>

>>>>> "pfancy" == pfancy  <pfancy@bscn.com> writes:

pfancy> Forgive me for insulting but some of you in this group
pfancy> insulted me.  (it was one of the perl groups.) I asked for
pfancy> help and I got insulted.

I know of nobody here that intentionally insults *people* (except Uri;
he gets close sometimes :).  What precisely are you calling an insult?
Give us a URL from "groups.google.com" for best verification.

print "Just another Perl hacker,";

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------

Date: Mon, 26 Apr 2004 15:56:32 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: other perl groups
Message-Id: <20040426155233.K1107@dishwasher.cs.rpi.edu>

On Mon, 26 Apr 2004, pfancy wrote:

> "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote in message
> news:c6iu33$ceq7c$1@ID-231055.news.uni-berlin.de...
> > Also sprach Charlton Wilbur:
> >
> > > If you want this group to be helpful, here's what you do.
> > >
> > > * Spend at least twenty minutes looking for the answer to your
> > >   question in _Learning Perl_, _Elements of Programming with Perl_,
> > >   _Programming Perl_, and _The Perl Cookbook_ -- or preferably all
> > >   four.  If there's an answer there and you ask the question here, all
> > >   that will happen here is that you'll be told to RTFM, possibly with
> > >   a pointer to the appropriate FM to read.
> >
> > What you list are four books. None of them is a manual and hence RTFM
> > can't apply to any of them.
> >
> > People need to have a preliminary scan through the perldocs and the
> > FAQs. That's all there is to do before posting.
> >
> > Tassilo
>
>
> I read through that and I did not understand.  It doesn't tell me how to or
> where to find the program to write perl in. that what gets me. I downloaded
> active perl active perl dev. etc. but I am still lost.
>

"the program to write perl in".  This implies you don't know how to write
*any* computer language.  Is that correct?  If so, that is likely the
cause of your inability to get the exact help you're looking for.  This
discussion is about the Perl language specifically.  It seems what you
need is a tutorial on "how to write computer programs".

The answer to this question, btw, is that you can use *any* text editor to
write programs.  Many people will reccommend one above all others (such as
emacs, vi, or textpad).  Others will tell you to just write in anything
that makes you comfortable, perhaps even Notepad.  One thing we will all
tell you is to NEVER use a word processor like MS Word, unless you're
fully prepared to constantly undo all its 'helpful' corrections and always
remember to save your document in plain text.

Paul Lalli

P.S.  I did a groups.google search to find what thread you were referring
to - your email exists only in this thread.  Did you use a different
address when you claim to have been 'insulted'?  Can you point us to the
insulting message(s)?


------------------------------

Date: Mon, 26 Apr 2004 14:47:27 -0800
From: "Robin" <robin @ infusedlight.net>
Subject: Re: other perl groups
Message-Id: <c6jsgt$pjc$2@news.f.de.plusline.net>

> Forgive me for insulting but some of you in this group insulted me.  (it
was
> one of the perl groups.) I asked for help and I got insulted.  So I don't
> know what more to say.  I am absolutely new beginner of perl and I need
help
> if anyone is willing to help me out if not.  OH well.


I wouldn't really call it an insult, at least the "insults" that I've gotten
aren't really insults per say, but hardcore examples of critism, though I
wish I'd get a little bit more friendly responses. Post your code, even if
it's really simple so the group can see.
Overall, this is the best perl group I've discovered, at least in my
opinion.

--
Regards,
-Robin
--
[ webmaster @ infusedlight.net ]
www.infusedlight.net




------------------------------

Date: 26 Apr 2004 16:14:01 -0400
From: Uri Guttman <uri.guttman@fmr.com>
Subject: Re: other perl groups
Message-Id: <siscvfjm5wfq.fsf@configsvr.fmr.com>

>>>>> "RLS" == Randal L Schwartz <merlyn@stonehenge.com> writes:

>>>>> "pfancy" == pfancy  <pfancy@bscn.com> writes:
  pfancy> Forgive me for insulting but some of you in this group
  pfancy> insulted me.  (it was one of the perl groups.) I asked for
  pfancy> help and I got insulted.

  RLS> I know of nobody here that intentionally insults *people* (except
  RLS> Uri; he gets close sometimes :).  What precisely are you calling
  RLS> an insult?  Give us a URL from "groups.google.com" for best
  RLS> verification.

randal, you are a frumious bandersnatch!

uri


------------------------------

Date: 26 Apr 2004 13:29:48 -0700
From: jshaboo@hotmail.com (joe shaboo)
Subject: output to STDOUT to a file
Message-Id: <f6d34657.0404261229.3b673517@posting.google.com>

I'm trying to output the STDOUT to a file which is the same as the
file I'm reading.

The way I'm handling it now is sloppy, and I'd like to do it all
inside the perl script.

Here's an example.

$file = filename

while (<$file>) {
    print $_;
}

Then from the command line, I do $./script file > file1;mv file1 file

This is terrible, and I know it is easy, but I can't get it to work
with open(), and I'm sure you can, I just can't get it to work.

Can anyone help me out?


------------------------------

Date: Mon, 26 Apr 2004 16:46:40 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: output to STDOUT to a file
Message-Id: <20040426164353.J1107@dishwasher.cs.rpi.edu>

On Mon, 26 Apr 2004, joe shaboo wrote:

> I'm trying to output the STDOUT to a file which is the same as the
> file I'm reading.
>
> The way I'm handling it now is sloppy, and I'd like to do it all
> inside the perl script.
>
> Here's an example.
>
> $file = filename
>
> while (<$file>) {
>     print $_;
> }
>
> Then from the command line, I do $./script file > file1;mv file1 file
>
> This is terrible, and I know it is easy, but I can't get it to work
> with open(), and I'm sure you can, I just can't get it to work.
>
> Can anyone help me out?


First, what do you mean by "can't get it to work".  What happens that
shouldn't?  What doesn't happen that should?  What errors and warnings to
you receive?  What does your code actually look like?

Second, read
perldoc perlrun
and look for the -i and -p switches.  If what you're doing is relatively
simple, there's a good chance those two switches can combine to reduce
your program to one line.
(and even if they can't, you can still use those switches in your shebang
to reduce the amount of code you actually have to write)

Paul Lalli


------------------------------

Date: Mon, 26 Apr 2004 14:42:41 -0800
From: "Robin" <robin @ infusedlight.net>
Subject: Re: output to STDOUT to a file
Message-Id: <c6jsgs$pjc$1@news.f.de.plusline.net>


"joe shaboo" <jshaboo@hotmail.com> wrote in message
news:f6d34657.0404261229.3b673517@posting.google.com...
> I'm trying to output the STDOUT to a file which is the same as the
> file I'm reading.
>
> The way I'm handling it now is sloppy, and I'd like to do it all
> inside the perl script.
>
> Here's an example.
>
> $file = filename
>
> while (<$file>) {
>     print $_;
> }
>
> Then from the command line, I do $./script file > file1;mv file1 file
>
> This is terrible, and I know it is easy, but I can't get it to work
> with open(), and I'm sure you can, I just can't get it to work.
>
> Can anyone help me out?

can I see some more of your code? -Thanks, Robin




------------------------------

Date: Mon, 26 Apr 2004 16:53:55 -0400
From: Richard Morse <remorse@partners.org>
Subject: Re: output to STDOUT to a file
Message-Id: <remorse-421E6A.16535526042004@plato.harvard.edu>

In article <f6d34657.0404261229.3b673517@posting.google.com>,
 jshaboo@hotmail.com (joe shaboo) wrote:

> I'm trying to output the STDOUT to a file which is the same as the
> file I'm reading.
> 
> The way I'm handling it now is sloppy, and I'd like to do it all
> inside the perl script.
> 
> Here's an example.
> 
> $file = filename
> 
> while (<$file>) {
>     print $_;
> }
> 
> Then from the command line, I do $./script file > file1;mv file1 file
> 
> This is terrible, and I know it is easy, but I can't get it to work
> with open(), and I'm sure you can, I just can't get it to work.

I think, if I understand you correctly, that you are trying to do 
in-place file editing.  That is, you wish to open a file, read through 
it, and save any changes.  The best way to do this is something like:

#!/usr/bin/perl
use strict;
use warnings;

my $filename = 'some_file_name';
my $backup = $filename . ".backup";
rename($filename, $backup) or die("Can't backup original file: $!");
open(my $in, "<", $backup) or die("Can't open backup: $!");
open(my $out, ">", $filename)
    or die("Can't open original for writing: $!");

while(<$in>) {
   print $out $_;
}

close($in);
close($out);

__END__

Perl can actually do most of this, if you use the various command line 
options (I think -i, -n, or -p are the appropriate ones to look to).  In 
fact, if your task fits into the paradigm provided by the command line 
options, it is probably much faster.

HTH,
Ricky

-- 
Pukku


------------------------------

Date: Mon, 26 Apr 2004 21:01:14 -0000
From: "David K. Wall" <dwall@fastmail.fm>
Subject: Re: output to STDOUT to a file
Message-Id: <Xns94D7AD24B3347dkwwashere@216.168.3.30>

Paul Lalli <ittyspam@yahoo.com> wrote:

> On Mon, 26 Apr 2004, joe shaboo wrote:
> 
>> I'm trying to output the STDOUT to a file which is the same as
>> the file I'm reading.
>>
>> The way I'm handling it now is sloppy, and I'd like to do it all
>> inside the perl script.

[snip]

> Second, read
> perldoc perlrun
> and look for the -i and -p switches.  If what you're doing is
> relatively simple, there's a good chance those two switches can
> combine to reduce your program to one line.

Additionally, see perlfaq5, in particular the entry titled "How can I 
use Perl's -i option from within a program?"

A quick search of the FAQ by the OP could have easily missed this 
entry, which is a good reason why reading the entire FAQ (or at least 
skimming it) is a good idea. I need to reread it myself, as I suspect 
there's been stuff added since I last read it.



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 6470
***************************************


home help back first fref pref prev next nref lref last post