[13874] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1284 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 4 21:05:44 1999

Date: Thu, 4 Nov 1999 18:05:26 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <941767525-v9-i1284@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 4 Nov 1999     Volume: 9 Number: 1284

Today's topics:
        Best way to clear the symboltable of a module ? jomagam@yahoo.com
    Re: Best way to clear the symboltable of a module ? <rootbeer@redcat.com>
    Re: Broken Arrow <cassell@mail.cor.epa.gov>
        cgi tutorial brondsem@my-deja.com
    Re: cgi tutorial <makkulka@cisco.com>
    Re: child I/O pitfalls? (Martien Verbruggen)
    Re: duplicates in an array <cassell@mail.cor.epa.gov>
    Re: evaluating a string <sdries3@home.com>
    Re: FAQ 3.9: Is there an IDE or Windows Perl Editor? <cassell@mail.cor.epa.gov>
    Re: File handle tests with pattern matching to promote  (Abigail)
    Re: Flock functionality (Martien Verbruggen)
    Re: Help! Simple Perl problem - newbie!! <cassell@mail.cor.epa.gov>
    Re: Help! Simple Perl problem - newbie!! (Tad McClellan)
    Re: HELP:Elements in an array have a space in front of  <cassell@mail.cor.epa.gov>
    Re: HELP:Elements in an array have a space in front of  (Craig Berry)
    Re: Help? What are Black Squares? <m.bridgwater@cinergi.com>
    Re: Help? What are Black Squares? (Kragen Sitaker)
    Re: Help? What are Black Squares? <cassell@mail.cor.epa.gov>
    Re: Help? What are Black Squares? <marcel.grunauer@lovely.net>
    Re: Help? What are Black Squares? <rootbeer@redcat.com>
    Re: Help? What are Black Squares? <stampes@xilinx.com>
    Re: Help? What are Black Squares? (Abigail)
    Re: Help? What are Black Squares? <cassell@mail.cor.epa.gov>
        how can I display command results as they occur?? <noSpam@noSpam.com>
        How do you know when a server is done sending data? <mssakhrani@ucdavis.edu>
    Re: How do you know when a server is done sending data? (Martien Verbruggen)
    Re: How do you know when a server is done sending data? (Kragen Sitaker)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 04 Nov 1999 23:18:39 GMT
From: jomagam@yahoo.com
Subject: Best way to clear the symboltable of a module ?
Message-Id: <7vt48b$i90$1@nnrp1.deja.com>



Hi.

I'm trying to come up with the fastest/safest way to empty the symbol
table of a package.

Try 1:
package foo;

$a = 45;

for (keys %{foo::} ){
  undef ${$_};
  undef @{$_};
  undef %{$_};
}

print "a=$a";

Works fine, but might not be optimal.
I try:

undef  %{foo::} or %{foo::} = ();x, but they don't seem to do the trick;
a=45 is still printed, though %{foo::} is empty . Why is this and which
is the fastest way to empty the symboltable ?

Thanks,

Balazs




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 4 Nov 1999 16:58:02 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Best way to clear the symboltable of a module ?
Message-Id: <Pine.GSO.4.10.9911041639470.29670-100000@user2.teleport.com>

On Thu, 4 Nov 1999 jomagam@yahoo.com wrote:

> I'm trying to come up with the fastest/safest way to empty the symbol
> table of a package.

Mu. Unask the question. If that's what you think you want to do, you
should probably keep thinking.

> I try: undef %{foo::} or %{foo::} = ();x, but they don't seem to do
> the trick; a=45 is still printed, though %{foo::} is empty .

I'm not sure what's happening, since you aren't showing us your real code.
But I suspect that Perl is binding to the variable at compile time, so
there's no symbol-table lookup at runtime. See:

    #!/usr/bin/perl -wl

    $fred::flintstone = "I'm still here";

    undef %{fred::};	# Delete the fred:: symbol table

    # This gets bound at compile time
    print $fred::flintstone;

    # But this won't be seen until runtime
    eval 'print $fred::flintstone';

So, deleting a symbol table may not do you any good. 

I suspect that you can do whatever you want to do by using a hash of
references instead. That should be faster, cleaner, and more reliable.

> Why is this and which is the fastest way to empty the symboltable ?

If, when running any real-world program, you can detect an improvement in
speed when you replace an undef (as above) with any other method of
emptying a symbol table, I will loudly proclaim my amazement from the top
of the tallest chair in my house.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 04 Nov 1999 15:14:19 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Broken Arrow
Message-Id: <3822134B.5C99C87F@mail.cor.epa.gov>

Frank wrote:
> 
> perl neophyte: "What does an arrow operator do?"
> perl insider <chuckle> "It dereferences a reference"
[rest of almost amusing piece snipped]

If you want some info on this, try typing at a command line:

perldoc perlref

or read Andrew Johnson's intro book "Elements of Programming
with Perl".

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 04 Nov 1999 23:33:55 GMT
From: brondsem@my-deja.com
Subject: cgi tutorial
Message-Id: <7vt554$iqs$1@nnrp1.deja.com>

Could anyone point me to a good CGI/perl tutorial
on the net?  I have no experience with either,
but am a fast learner, so a beginner to
intermediate tutorial would be good.

Thanks!


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Thu, 04 Nov 1999 16:12:53 -0800
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: cgi tutorial
Message-Id: <38222104.4E76AD3C@cisco.com>

brondsem@my-deja.com wrote:

> Could anyone point me to a good CGI/perl tutorial
> on the net?  I have no experience with either,
> but am a fast learner, so a beginner to
> intermediate tutorial would be good.
>

read the FAQ
http://www.htmlhelp.org/faq/cgifaq.html
read the metaFAQ
http://www.smithrenaud.com/public/CGI_MetaFAQ.html
here is a tutorial
http://www.hotwired.com/webmonkey/98/47/index2a.html?tw=programming
--



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

Date: Fri, 05 Nov 1999 01:32:20 GMT
From: mgjv@verbruggen.comdyn.com.au (Martien Verbruggen)
Subject: Re: child I/O pitfalls?
Message-Id: <slrn824ct5.apq.mgjv@verbruggen.comdyn.com.au>

On Wed, 03 Nov 1999 20:24:37 -0500,
	Jim Thomason <jim3@psynet.net> wrote:
> In a nutshell, I want to run 2 different programs, and log stuff about
> them to a single file.  Here's a simplified version of the code I'm using:

[snip example of fork, with both parent and child writing to same file
descriptor]

Well... I think this may be a bit system dependent. You've got your
stdio buffering somewhere, presumably, and perl may do some buffering,
and then you've got the system call that does the actual write. Now,
some standards out there guarantee a write of a size less than a
certain value to be atomic. If all your writes at that level are
smaller than that, you won't see a problem. Using syswrite, with a
smaller size than that size might actually be a good idea (less
confusing buffering between you and the fs).

Of course, you could consider using locks to make absolutely certain
that they can't trample on each others output..

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | I took an IQ test and the results
Commercial Dynamics Pty. Ltd.   | were negative.
NSW, Australia                  | 


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

Date: Thu, 04 Nov 1999 16:07:50 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: duplicates in an array
Message-Id: <38221FD6.276E4B63@mail.cor.epa.gov>

Baris Sumengen wrote:
> 
> Thanks,
> I only used to use books to learn perl until now. But The perl FAQ's are
> nice. I will be spending couple of days on them.
> baris.

Let me just interject this one tidbit:

In Andrew Johnson's book "Elements of Programming with Perl",
the author not only tells people how to post in this newsgroup
so as not to rile the Dark Perl Daemons, but also tells them 
how to access and read the docs including the FAQ.  He even
tells people not to assume their question is too unusual to
be in the FAQ.

Thank you, Andrew.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 04 Nov 1999 23:48:50 GMT
From: "Steve Dries" <sdries3@home.com>
Subject: Re: evaluating a string
Message-Id: <CXoU3.8915$OS2.700271@news.rdc1.il.home.com>

I was close to the solution. I actually mis-stated my problem. The real
format is:

The number you're trying to get is #347373 so good luck.

So when I tried \d it didn't work for obvious reasons. BUT since you sent me
this I got to thinking and realized I was missing something pretty obvious.
Everything's working great now.

thanks again.

steve


Vincent Murphy <vincent.murphy@cybertrust.gte.com> wrote in message
news:xjgyacdan9k.fsf@gamora.ndhm.gtegsc.com...
> >>>>> "Steve" == Steve Dries <sdries3@home.com> writes:
>
> <-snip->
>     Steve> I have a string that is a known format but will have a
different number in
>     Steve> it..here's an example:
>
>     Steve> The number you're trying to get is 347373 so good luck.
>
>
>     Steve> All I'm trying to do is get that number out of the string into
it's own
>     Steve> variable. Again, please forgive this seemingly easy question
and I apologize
>     Steve> if it's in a FAQ somewhere that I haven't found. Thanks.
>
> perl -e '$str="The number youre trying to get is 347373 so good luck.";
> $num = $1 if ($str =~ /The number youre trying to get is (\d+) so good
luck./);
> print qq(NUM: $num\n); print qq(STRING: $str\n)'
>
>
> "perldoc perlre" for more information
>
> --vjm
>




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

Date: Thu, 04 Nov 1999 15:21:19 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: FAQ 3.9: Is there an IDE or Windows Perl Editor?
Message-Id: <382214EF.393C6093@mail.cor.epa.gov>

Tim Westlake wrote:
> 
> In article <7vd0dj$3ea$1@gellyfish.btinternet.com>, Jonathan Stowe
> <gellyfish@gellyfish.com> wrote:
> 
> > No I dont think that we will -
> 
> You might not, however the rest of the world doesnt just program in C,
> C++, PERL and Java. Being able to tailor an editor to support a
> different and not widely used language as well as the more popular ones
> is something that I spent a while trying to find.

Tim, surely you've noticed that Perl attracts people who have
written code in lots of weird little languages.  People like
Jonathan know about this.  And lots of editors on the page
Jonathan cited will let you do this.  Some of them [like emacs]
already have support for tons of obscure languages and 4GLs.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 4 Nov 1999 18:08:41 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: File handle tests with pattern matching to promote early termination of a file read
Message-Id: <slrn82487a.dk.abigail@alexandra.delanet.com>

michael moorhouse (mic_news@bip.bham.ac.uk) wrote on MMCCLVI September
MCMXCIII in <URL:news:7vsljr$fhr$1@usenet.bham.ac.uk>:
## Hello.
## I am having problems terminating a file scan I am writting.
## I have a filehandle opened and pointed at a file which contains:
## "
## first
## second
## third
## X
## last
## "
## I'm aiming at a proof of concept that the 'X' line is reached, the loop
## terminates.
## The construct :
## 
## while (<FILEH> && /^[^X]/) {print $_}
## 
## doesn't work.
## yet the construct:
## 
## while (defined ($_=<FILEH>) && (/^[^X]/)) {print $_}
## 
## does print out all lines of the file until the 'X' section I am looking for
## and then terminates, like I would expect it to.
## Apparently, the 'while (<FILEH>) {}' construct is a special case and does
## fancy things like load in the next line from the file into $_ and performs a
## undef. test which will terminate the loop at the (natural) end of a file.

Indeed.

## Is there a simpler way to do this or have I been pampered too much by the
## very convenient 'while (<FILEH>) {}' construct and therefore shouldn't
## expect it to be as simple?  *gives dummy an experimental suck* Yup - it's
## still there.


while (<FILEH>) {
    last if /^[^X]/;
    print
}




Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Fri, 05 Nov 1999 01:24:42 GMT
From: mgjv@verbruggen.comdyn.com.au (Martien Verbruggen)
Subject: Re: Flock functionality
Message-Id: <slrn824ceq.apq.mgjv@verbruggen.comdyn.com.au>

On Wed, 3 Nov 1999 23:57:51 -0500,
	E. Preble <preble@ipass.net> wrote:
> I have a general question about the flock command. When one
> script opens a file, and flocks it, what actually happens
> when another script tries to get at the file?  Does it wait
> for the file to be unflocked, or does it simply fail?

The perlopentut documentation has a very good explanation of this:

# man perlopentut

or

C:\DOS> perldoc perlopentut

Look for the section with the title 'File Locking'

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | In the fight between you and the
Commercial Dynamics Pty. Ltd.   | world, back the world - Franz Kafka
NSW, Australia                  | 


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

Date: Thu, 04 Nov 1999 15:44:17 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Help! Simple Perl problem - newbie!!
Message-Id: <38221A51.A4EA4E4D@mail.cor.epa.gov>

Daza wrote:
> 
> Oh dear, I've lost the plot!
> 
> I'm learning Perl from a book and using a 'simple' example with forms. I'm

Not another web programming book with bad Perl code, I hope.

> on NT4 workstation with IE4. The HTML file looks like this:
> 
> <html>
> <body>
> <form action="H:\html.cgi" method="POST">
> Name: <input type="text" name="Name" size=15>
> <center>
> <input type="submit" name="OK">
> <input type="reset" name="Clear">
> </form>
> </body>
> </html>
> 
> The H:\html.cgi file looks like this:
> 
> print "Content-type: text/html\n\n";
> print "<HTML><BODY>HI</body></html>";

Wait.  There's no Perl code here!  You must have a CGI problem.
 
> When I call up the form it looks fine. When I click the OK button I don't
> see the ?Name=xxxx at the end of the URL, and a new HTML page appears with
> the actual text (verbatim) from the cgi file. I expected to see  just "HI"

Yep, a CGI problem.  A couple, in fact.  You'll want to ask in
comp.infosystems.www.authoring.cgi to get really good CGI help.
They'll be able to straighten you out about URLs and 
POST vs. GET.  Good luck.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 4 Nov 1999 14:48:57 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Help! Simple Perl problem - newbie!!
Message-Id: <9vnsv7.0bf.ln@magna.metronet.com>

Daza (darren-edwards@esc-ltd.freeserve.co.uk) wrote:

: When I call up the form it looks fine. When I click the OK button I don't
: see the ?Name=xxxx at the end of the URL, and a new HTML page appears with
: the actual text (verbatim) from the cgi file. I expected to see  just "HI"

: What's going on?


   Your web server is not configured correctly.

   Web server configuration is off-topic in a Perl newsgroup,
   but you can probably get help in a server newsgroup, such as:


      comp.infosystems.www.servers.ms-windows


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Thu, 04 Nov 1999 15:14:39 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: HELP:Elements in an array have a space in front of them
Message-Id: <3822135F.F81819F1@mail.cor.epa.gov>

lt lindley wrote:
> 
> Ed Berry <ehberry@uswest.com> wrote:
> :>The double quotes around the array was the problem!!  I removed them and
> :>it works great!  Thanks!
> 
> Damn.  All those other guys have better PSI::ESP modules than I do.

We knew that.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 05 Nov 1999 00:55:49 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: HELP:Elements in an array have a space in front of them
Message-Id: <s24aolr2hpc42@corp.supernews.com>

Ala Qumsieh (aqumsieh@matrox.com) wrote:
: lt lindley <ltl@rgsun40.viasystems.com> writes:
: > Damn.  All those other guys have better PSI::ESP modules than I do.
: 
: Which version do you have? If less than 3.21, upgrade.

If *yours* were 3.52 or higher, you wouldn't have had to ask.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Thu, 4 Nov 1999 18:02:58 -0500
From: "Mark Bridgwater" <m.bridgwater@cinergi.com>
Subject: Re: Help? What are Black Squares?
Message-Id: <7vt37k$10ni$1@news.gate.net>

Reba,

Why bother with Notepad or Wordpad? I've been using Ultraedit
(www.ultraedit.com) for a number of reasons:
* It color-codes your Perl script, so you can tell when you've forgotten a
bracket or quote
* You can program it so that you can run your Perl scripts by clicking a
button. Any results of the scripts will show up in an Output window.
Similarly, I use it to run the Perl debugger and perldoc (highlight a term
and click a button, and the perldoc info shows up in  the output window)
* It'll do away with those annoying black squares
* It's $30. Try it for free for 45 days and see if you don't feel the urge
to delete Notepad.exe


Scott Lanning <slanning@bu.edu> wrote in message
news:kushfj2ci53.fsf@strange.bu.edu...
> "Reba Davis" <queen7@gte.net> writes:
> > Can someone tell me which key on the keyboard is used to display the
> > "black" squares when one is looking at a CGI script when using Notepad.
> >
> > There have been times when I wanted to edit a script, but I don't
> > know where the black squares are coming from.  They seem to appear
> > between each piece of variable information for example.
>
> I think they are newlines. Like when I write an HTML document
> in Unix, then view the source, there are a bunch of black boxes
> appearing in Windows where the newlines are and it is all one
> big line of text. The way to fix it is never use Windows and
> start a unabomber campaign against those who do.
>
> (that, or convert the text-file format, but that's *so* boring...)
>
> --
> "I'm going to have fun telling you about this absurdity, because I
> find it delightful." --Richard Feynman




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

Date: Thu, 04 Nov 1999 23:23:47 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Help? What are Black Squares?
Message-Id: <7AoU3.28530$23.1514904@typ11.nn.bcandid.com>

In article <7vt37k$10ni$1@news.gate.net>,
Mark Bridgwater <m.bridgwater@cinergi.com> wrote:
>Why bother with Notepad or Wordpad? I've been using Ultraedit
>(www.ultraedit.com) for a number of reasons:
>* It color-codes your Perl script, so you can tell when you've forgotten a
>bracket or quote
>* You can program it so that you can run your Perl scripts by clicking a
>button. Any results of the scripts will show up in an Output window.
>Similarly, I use it to run the Perl debugger and perldoc (highlight a term
>and click a button, and the perldoc info shows up in  the output window)
>* It'll do away with those annoying black squares
>* It's $30. Try it for free for 45 days and see if you don't feel the urge
>to delete Notepad.exe

Emacs does all of this, too, and tens of thousands of other things
besides.  And it's free, and it's open-source like Perl.  It is
probably the single most important programming tool in the history of
programming.  If you're going to go to the trouble of installing extra
software on your machine and learning to use it, at least make it
high-quality free software instead of lower-quality proprietary shareware.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Thu, 04 Nov 1999 16:04:56 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Help? What are Black Squares?
Message-Id: <38221F28.32D459C@mail.cor.epa.gov>

Abigail wrote:
[snip]
> Your computer is possessed by an angry daemon from the sixth dimension,
> who has plugged his keyboard in to your computer. Black squares are a
> severe warning; it's the last step before the yellow circles. And yellow
> circles mean a painful death for you and your family.
> 
> About the only thing you can do is to ritual sacrifice your computer
> and start a devout life. Hire a steam roller, and take your computer
> to the townsquare. Now, squash the computer by driver the steam roller
> over it. On the remains, sacrifice a virgin, using a silver dagger.
> Give away everything you own, except for a lion cloth and sandals, and
> make a pelgrimage to the hidden temple. On foot. All that's known about
> the temple is that it's somewhere in dark Africa, so it may take a while.

You just copied this right off alt.fan.buffy-the-vampire-slayer
now didn't you?  It's last week's episode, right?

And also:
$str =~ s/lion/loin/;

So, who was wearing the loin cloth?  Buffy?  Willow?  If it was
Giles, I don't want to hear about it.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 05 Nov 1999 00:06:25 GMT
From: Marcel Grunauer <marcel.grunauer@lovely.net>
Subject: Re: Help? What are Black Squares?
Message-Id: <AC0iOJrDfxZa6xyCMG7gtoJh1Qs4@4ax.com>

On 4 Nov 1999 16:25:56 -0600, abigail@delanet.com (Abigail) wrote:

> Reba Davis (queen7@gte.net) wrote on MMCCLVI September MCMXCIII in
> <URL:news:ttiU3.263$_Y3.7442@dfiatx1-snr1.gtei.net>:
> `` 
> `` Can someone tell me which key on the keyboard is used to display the
> `` "black" squares when one is looking at a CGI script when using Notepad.
> 
> Well, the black square key of course. Unfortunally, that key is not
> on *your* keyboard.
[snip]
> Alternatively, once can install FreeBSD, and hope its daemon beats
> the any daemon from the sixth dimension.

That's a program which "Frees the Black Squares Daemon", right?
Finally, an explanation for that name...


-- 
Marcel, Perl Padawan
sub AUTOLOAD{$_=$AUTOLOAD;s;.*::;;;y;_; ;;print}&Just_Another_Perl_Hacker;


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

Date: Thu, 4 Nov 1999 16:15:48 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Help? What are Black Squares?
Message-Id: <Pine.GSO.4.10.9911041612580.29670-100000@user2.teleport.com>

On Thu, 4 Nov 1999, Mark Bridgwater wrote:

> Why bother with Notepad or Wordpad? I've been using Ultraedit
> (www.ultraedit.com) for a number of reasons:

> * It color-codes your Perl script, so you can tell when you've
> forgotten a bracket or quote

Well, sometimes it gets confused about brackets and quotes, since nothing
can parse Perl but perl.

> * You can program it so that you can run your Perl scripts by clicking
> a button. Any results of the scripts will show up in an Output window.
> Similarly, I use it to run the Perl debugger and perldoc (highlight a
> term and click a button, and the perldoc info shows up in the output
> window)

That could be useful.

> * It'll do away with those annoying black squares

The big button on the monitor does that already. :-)

> * It's $30. Try it for free for 45 days and see if you don't feel the
> urge to delete Notepad.exe

Wow! I have the urge to delete Notepad.exe already! Do I still have to pay
$30?

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 4 Nov 1999 23:50:31 GMT
From: Jeff Stampes <stampes@xilinx.com>
Subject: Re: Help? What are Black Squares?
Message-Id: <7vt647$9s1@courier.xilinx.com>

Abigail <abigail@delanet.com> wrote:
: Give away everything you own, except for a lion cloth and sandals, and
: make a pelgrimage 

Don't you mean a perlgrimage?



-- 
Jeff Stampes -- Xilinx, Inc. -- Boulder, CO -- jeff.stampes@xilinx.com


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

Date: 4 Nov 1999 19:03:36 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Help? What are Black Squares?
Message-Id: <slrn824be9.dk.abigail@alexandra.delanet.com>

David Cassell (cassell@mail.cor.epa.gov) wrote on MMCCLVII September
MCMXCIII in <URL:news:38221F28.32D459C@mail.cor.epa.gov>:
|| Abigail wrote:
||
|| > Your computer is possessed by an angry daemon from the sixth dimension,
|| > who has plugged his keyboard in to your computer. Black squares are a
|| > severe warning; it's the last step before the yellow circles. And yellow
|| > circles mean a painful death for you and your family.
|| > 
|| > About the only thing you can do is to ritual sacrifice your computer
|| > and start a devout life. Hire a steam roller, and take your computer
|| > to the townsquare. Now, squash the computer by driver the steam roller
|| > over it. On the remains, sacrifice a virgin, using a silver dagger.
|| > Give away everything you own, except for a lion cloth and sandals, and
|| > make a pelgrimage to the hidden temple. On foot. All that's known about
|| > the temple is that it's somewhere in dark Africa, so it may take a while.
|| 
|| You just copied this right off alt.fan.buffy-the-vampire-slayer
|| now didn't you?

Nope. Never read that group.

||                  It's last week's episode, right?

I've no idea. I've never seen the program.



Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 04 Nov 1999 17:30:54 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Help? What are Black Squares?
Message-Id: <3822334E.A86FCA56@mail.cor.epa.gov>

Abigail wrote:
> David Cassell (cassell@mail.cor.epa.gov) wrote on MMCCLVII September
> MCMXCIII in <URL:news:38221F28.32D459C@mail.cor.epa.gov>:
[my snip]
> || You just copied this right off alt.fan.buffy-the-vampire-slayer
> || now didn't you?
> 
> Nope. Never read that group.
> 
> ||                  It's last week's episode, right?
> 
> I've no idea. I've never seen the program.

Hmm, I see that your ritual also caused the smileys to melt off
the ends of my comments.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 4 Nov 1999 18:20:06 -0700
From: "Bill Darbie" <noSpam@noSpam.com>
Subject: how can I display command results as they occur??
Message-Id: <7vtbd4$4qe$1@fcnews.fc.hp.com>

I have the following line of perl code:

$out = `make 2>&1`;
print $out;

This does a build of code for me and then prints the output.
The problem is that the build can take over an hour and I
want to see the results as they are happening.  Right now
I see nothing for over an hour and then all the output comes
out at the end.  How can I execute my make and see the
results unbuffered?

Thanks
Bill





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

Date: Thu, 4 Nov 1999 15:32:22 -0800
From: "Mohan Sakhrani" <mssakhrani@ucdavis.edu>
Subject: How do you know when a server is done sending data?
Message-Id: <7vt4jf$mp0$1@mark.ucdavis.edu>


I'm trying to retrieve a news article and print it to a text file and then
continue retrieving more articles.  But I can't figure out when the server
is done sending the article data.  I tried a while loop that reads the first
3 lines of an article and goes to the next article, but my side (the client)
keeps thinking that the server is sending more information and won't move to
read the next line.

Please Help:
$i=0;
while( $i < 3 ){
  $i=$i+1;
  $buffer = <F>;
print TEXT "$buffer"; #prints a line of the article to a text file
}
#the while loop only continues if you send the server another command in the
loop

thanks,
Mo






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

Date: Fri, 05 Nov 1999 01:00:53 GMT
From: mgjv@verbruggen.comdyn.com.au (Martien Verbruggen)
Subject: Re: How do you know when a server is done sending data?
Message-Id: <slrn824b25.apq.mgjv@verbruggen.comdyn.com.au>

[Removed alt.perl.* newsgroups. Don't exist here, and there are too
many crossposts anyway]

On Thu, 4 Nov 1999 15:32:22 -0800,
	Mohan Sakhrani <mssakhrani@ucdavis.edu> wrote:
> 
> I'm trying to retrieve a news article and print it to a text file and then

# perl -MCPAN -e shell
cpan> i /nntp/
Distribution    RVA/NNTPClient-0.36.tar.gz
Module          LWP::Protocol::nntp (GAAS/libwww-perl-5.46.tar.gz)
Module          Mail::Folder::NNTP (KJOHNSON/MailFolder-0.07.tar.gz)
Module          NNTP::Server    (Contact Author Joe Hildebrand
<joe.hildebrand@twcable.com>)
Module          Net::NNTP       (GBARR/libnet-1.0607.tar.gz)
Module          News::NNTPClient (RVA/NNTPClient-0.36.tar.gz)
Module          News::NNTPFetchProgress (RVA/NNTPClient-0.36.tar.gz)
Module          URI::nntp       (GAAS/URI-1.04.tar.gz)

cpan> i /news/
[snip of not so interesting ones]
Distribution    AGIERTH/News-Article-1.13.tar.gz
Module          News::Article   (AGIERTH/News-Article-1.13.tar.gz)
Module          News::FormArticle (AGIERTH/News-Article-1.13.tar.gz)
Module          News::FormReply (AGIERTH/News-Article-1.13.tar.gz)
Module          News::NNTPClient (RVA/NNTPClient-0.36.tar.gz)
Module          News::NNTPFetchProgress (RVA/NNTPClient-0.36.tar.gz)
Module          News::Newsrc    (SWMCD/News-Newsrc-1.07.tar.gz)
Module          News::Scan      (GBACON/News-Scan-0.51.tar.gz)
Module          News::Scan::Article (GBACON/News-Scan-0.51.tar.gz)
Module          News::Scan::Poster (GBACON/News-Scan-0.51.tar.gz)
Module          News::Scan::Thread (GBACON/News-Scan-0.51.tar.gz)


Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Never hire a poor lawyer. Never buy
Commercial Dynamics Pty. Ltd.   | from a rich salesperson.
NSW, Australia                  | 


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

Date: Fri, 05 Nov 1999 01:44:51 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: How do you know when a server is done sending data?
Message-Id: <nEqU3.29635$23.1526211@typ11.nn.bcandid.com>

In article <7vt4jf$mp0$1@mark.ucdavis.edu>,
Mohan Sakhrani <mssakhrani@ucdavis.edu> wrote:
>I'm trying to retrieve a news article and print it to a text file and then
>continue retrieving more articles.  But I can't figure out when the server
>is done sending the article data.

May I suggest that you either use a prewritten NNTP module from CPAN,
or read the NNTP standard, which is RFC 977?  It's only 27 pages,
shorter than many short stories, though not quite as entertaining.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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

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

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


------------------------------
End of Perl-Users Digest V9 Issue 1284
**************************************


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