[16003] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3415 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 19 00:09:13 2000

Date: Sun, 18 Jun 2000 21:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <961387512-v9-i3415@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 18 Jun 2000     Volume: 9 Number: 3415

Today's topics:
    Re: Accessing XSUB global variables from Perl <dan@tuatha.sidhe.org>
    Re: Checking for open socket before writing to it? <rvadlapa@cisco.com>
    Re: Checking for open socket before writing to it? <godzilla@stomp.stomp.tokyo>
    Re: Crazy enough that it might just work... (Tad McClellan)
    Re: Crazy enough that it might just work... <henry@penninkilampi.net>
    Re: Crazy enough that it might just work... <godzilla@stomp.stomp.tokyo>
    Re: Crazy enough that it might just work... <altavistaNOalSPAM@agentkhaki.com.invalid>
    Re: Crazy enough that it might just work... <henry@penninkilampi.net>
    Re: Crazy enough that it might just work... (Tad McClellan)
        Doing the scanf %d thing (Norman Gaywood)
        flock on dbmopen <johnlin@chttl.com.tw>
    Re: How to determine a fake email address (Tad McClellan)
    Re: How to determine a fake email address <r.meEEEtcalfNOSPAM@exXXX.acCCC.ukKKK>
    Re: How to determine a fake email address <aneely@softouch.on.ca>
    Re: I can't figure this one out...  (Newbie question) <tina@streetmail.com>
        install and use POP3Client <dleung@ouhk.edu.hk>
        link to a module when perl program starts <dleung@ouhk.edu.hk>
    Re: Monitor a process like Unix top But should be Perl/ <rootbeer@redcat.com>
    Re: Monitor a process like Unix top But should be Perl/ (Gwyn Judd)
    Re: Monitor a process like Unix top But should be Perl/ <kingwang98@yahoo.com>
    Re: Monitor a process like Unix top But should be Perl/ <kingwang98@yahoo.com>
    Re: Monitor a process like Unix top But should be Perl/ <tony_curtis32@yahoo.com>
    Re: Monitor a process like Unix top But should be Perl/ <kingwang98@yahoo.com>
    Re: Monitor a process like Unix top But should be Perl/ <tony_curtis32@yahoo.com>
        Need Help ! Please Read ! <psychoNOpsSPAM@pcpatches.com.invalid>
        Net::NNTP question. <post_replys_please@invalid-address.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 18 Jun 2000 20:56:33 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Accessing XSUB global variables from Perl
Message-Id: <5Ia35.2898$Zg4.15146@news1.rdc1.ct.home.com>

In comp.lang.perl.misc Vikas Aggarwal <vikas@navya.com> wrote:
> Is there any way to access C global variables in an XS file from perl
> (without writing a function?).

Not particularly, though you could hide the functions by tie()ing a perl
scalar. The easiest thing to do is use a perl global instead and
fetch its value inside the C code, rather than try and use C globals.

					Dan


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

Date: Sun, 18 Jun 2000 15:48:14 -0700
From: Ramesh Vadlapatla <rvadlapa@cisco.com>
Subject: Re: Checking for open socket before writing to it?
Message-Id: <394D51AE.2547FD39@cisco.com>

Hello! Again,

Ben Kennedy's solution of  including:
$SIG{PIPE} = "IGNORE";
in the code fixed the problem and am also using the opened() to make
sure that the socket is open before I write to it.

So, everything is working well now.

Thanks for all your help!

Ramesh
(http://www.ecst.csuchico.edu/~vadlapat/)

"Godzilla!" wrote:

> Ramesh Vadlapatla wrote:
>
> > Yes, I am trying to write large amounts of data.
>
> > The server which again is something that I wrote(in perl)
> > shuts down "occassionally" before accepting all the data
> > that the client is sending it. What I mean by occassionally
> > is that sometimes it accepts the same exact data but some
> > times it exits prematurely.
>
> > Rather than figuring out why the server is exiting, I decided
> > to handle this exception on the client side.
>
> > I will try out your suggestion and see if that works.
>
> Ramesh, do all of us here a favor and post your
> code once you have successfully implemented
> Mr. Kennedy's idea, if you don't mind. Posting
> your code would be of great benefit to our
> Perl Programming Community.
>
> Godzilla!



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

Date: Sun, 18 Jun 2000 16:08:55 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Checking for open socket before writing to it?
Message-Id: <394D5687.89C304F6@stomp.stomp.tokyo>

Ramesh Vadlapatla wrote:
 
> Ben Kennedy's solution of  including:
> $SIG{PIPE} = "IGNORE";
> in the code fixed the problem and am also using the opened() to make
> sure that the socket is open before I write to it.
 
> So, everything is working well now.
 
> Thanks for all your help!




Please post your Perl code for this task,
if you don't mind. Many would be interested
in reading your style of accomplishing this.


Godzilla!


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

Date: Sun, 18 Jun 2000 17:44:15 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Crazy enough that it might just work...
Message-Id: <slrn8kqglf.cfh.tadmc@magna.metronet.com>

On Mon, 19 Jun 2000 04:52:18 +0930, Henry <henry@penninkilampi.net> wrote:
>In article <slrn8kq7a3.4ba.dha@panix6.panix.com>, dha@panix.com (David 
>H. Adler) wrote:
>
>> For what it's worth, I do not believe the problem you're trying to
>> address is fixable at this level.
>
>At _any_ level?


It is fixable at the "access" level, i.e. the ISP or sysadmin
who tells their user about Usenet.

(modulo all the WWW interfaces to NNTP)


>> The difficulties arise from the
>> fact that there are many people who don't know the recognized
>> standards/methods for certain things.  Specifically, the methods used
>> to read documentation and the standards of usenet.
>
>True, but...
>
>If an infant doesn't know how to talk, do parents give up trying to 
>teach them?


I know the below is not the "parent" you refer to (Usenauts),
but I'm going to use it for my own purposes  :-)

If "infant" is "new Usenet user", and "parent" is the ISP
providing the Usenet access, then:


   The "parents" don't think of their users as "children".

   They think of them as "customers".

   You don't _force_ "customers" to do stuff, they'll just go
   somewhere else.

   It is PC to promote them beyond kindergarten, straight to
   first grade (without telling them that they missed anything). 

   Because the lusers don't realize that the ISP has 
   "thrown them to the wolves" in a *foreign* society.
   They think instead "what a bunch of mean people".
   
   They don't know if they should avoid burping at the dinner
   table, or if they are _expected_ to burp at the dinner
   table, or if they should not show the soles of their
   feet, or if the line forms to the rear...


The ISPs take the path of least resistance.

Maybe we should include instructions to raise hell with
the offender's provider when netiquette flames break out?



---------------------------------------------
In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
Wall) wrote: ...

<Larry>  [snip]  I view a programming language as a place to be
<Larry>  explored, like Disneyland. You don't need to have a lot of preparation
<Larry>  to explore a theme park.  You do have to go along with the crowd
<Larry>  control measures, though.  In a sense, each ride has its own
<Larry>  prerequisites--if you cut in line, you risk getting tossed out of the
<Larry>  park.
<Larry> 
<Larry>  What we have here in this newsgroup is a failure in crowd control.
<Larry>  Reading the FAQ is like staying in line--it's something you should
<Larry>  learn in kindergarten.  Usenet needs a better kindergarten.
---------------------------------------------



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


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

Date: Mon, 19 Jun 2000 08:36:50 +0930
From: Henry <henry@penninkilampi.net>
Subject: Re: Crazy enough that it might just work...
Message-Id: <henry-B1C5ED.08365019062000@news.metropolis.net.au>

In article <slrn8kqglf.cfh.tadmc@magna.metronet.com>, 
tadmc@metronet.com (Tad McClellan) wrote:

>>> For what it's worth, I do not believe the problem you're trying to
>>> address is fixable at this level.
>>
>> At _any_ level?
> 
> It is fixable at the "access" level, i.e. the ISP or sysadmin
> who tells their user about Usenet.
> 
> (modulo all the WWW interfaces to NNTP)
 ...
> The ISPs take the path of least resistance.

<sigh>

ISPs take the path of least resistance...
Newbies take the path of least resistance...
Parasites take the path of least resistance...

Where's the work ethic gone?

Henry.


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

Date: Sun, 18 Jun 2000 17:00:43 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Crazy enough that it might just work...
Message-Id: <394D62AB.12410B77@stomp.stomp.tokyo>

Henry wrote:
> tadmc@metronet.com (Tad McClellan) wrote:

> Where's the work ethic gone?

Henry, do you ever sleep at night? Per your
local time, I show you here, as an average,
from midnight till ten in the morning, daily.
Maybe sleep will help you to find answers to
questions of ethics?


Godzilla!


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

Date: Sun, 18 Jun 2000 17:49:48 -0700
From: Agentkhaki <altavistaNOalSPAM@agentkhaki.com.invalid>
Subject: Re: Crazy enough that it might just work...
Message-Id: <08b69228.865fc3c0@usw-ex0109-070.remarq.com>

I must confess that I am one of these parasites. I've been
doing HTML programming (not exactly a hard language to pick
up) for several years now, and Javascript for just about as
long (nothing too complex). Now I'm moving into Perl
scripts to fill my CGI-BIN with things that I think are "a
pretty neat idea" (Douglass Adams, 'The Hitchhikers Guide
to the Galaxy, on how humans view digital watches). Anyway,
I got a book, started reading (I've got some C experience,
which made it easier) and started writing. I ran into a
problem. I checked it over, re wrote the script. I checked
it again. Different problem. Problem repeats. Had Linux
installed to fool around with. Tried the script there. Lost
all file permissions through Apache. Not sure why. Can't
fix that... Now the time to raise my hand and say 'I don't
understand what the heck I just blundered into... Please
help me...' comes along. I wait impatiently for an answer,
not really lurking on the message boards (I've got better
things to do, they're not very well organized, and I don't
know enough to answer any question that isn't "So, what do
I need to start writing Perl"). I'm impatient not because I
want to get back to my pet project, but because I want to
know what's going on so I can continue to learn. Without
the guru's to teach me, to help me understand, I would
quickly become frustrated with the project entirely, and,
all modesty aside, the world may have just lost another
protential programmer. Not going to happen, but the point
is made. We newbies who fire away the questions want to
learn, but we're not so good at teaching, or we don't yet
know enough to teach. In the end, when we're older, more
experienced, I think we'll find outselves in pretty much
the same shoes as yourself, trying to find a solution that
will keep us from answering the questions we just answered
hours before. It's a common cycle in life, when young man
grows old and wonders at those who are younger than him,
and their 'odd' behavior, forgetting that he seemed 'odd'
to those who were older than him when he was their age.

The only real solution I have, after all that, is copy and
paste, or refer. I think that the system used to disply
these boards (perhaps because I'm accessing them through
Altavista) sucks, and it's too hard to scroll through page
after page after page of questions that aren't organized,
looking for the one that pertains to me. Perhaps grouping
them would be a good idea. Anyway, if you're a guru, and
you've answered a question already, simply say "I've
answered this already, please see XXX for the answer, have
a nice day and 'Pull up your pants!'" (a la Dennis Leary's
rant on the state of coffee and those who serve it in
today's society). Thanks.


* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful


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

Date: Mon, 19 Jun 2000 12:55:16 +0930
From: Henry <henry@penninkilampi.net>
Subject: Re: Crazy enough that it might just work...
Message-Id: <henry-F392A9.12551619062000@news.metropolis.net.au>

In article <394D62AB.12410B77@stomp.stomp.tokyo>, "Godzilla!" 
<godzilla@stomp.stomp.tokyo> wrote:

>> Where's the work ethic gone?
> 
> Henry, do you ever sleep at night? Per your
> local time, I show you here, as an average,
> from midnight till ten in the morning, daily.

:)

If you actually monitor that over a long enough period of time, you'll 
notice that the ranges center on an extended sine wave, with an 
irregular phase inversion (drop-spike-drop), which happens to _not_ be 
tied with the 24-hour clock.


> Maybe sleep will help you to find answers to
> questions of ethics?

Nope, the other way round.  I start hallucinating after 65-odd hours 
without sleep (which happens suprisingly often).  But in-between the 
weird stuff, there are extended periods of _extreme_ clarity - that's 
when the really good stuff gels (ethics, philosophy, and so-on).

But sleep is good too:  I can seed my subconscious with a problem just 
before I go to sleep, and have an answer waiting for me when I wake up.  
I can't even _begin_ to tell you how handy _that's_ been over the last 
decade or so.

Henry.


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

Date: Sun, 18 Jun 2000 20:12:56 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Crazy enough that it might just work...
Message-Id: <slrn8kqpc8.cr8.tadmc@magna.metronet.com>

On Mon, 19 Jun 2000 08:36:50 +0930, Henry <henry@penninkilampi.net> wrote:
>In article <slrn8kqglf.cfh.tadmc@magna.metronet.com>, 
>tadmc@metronet.com (Tad McClellan) wrote:

>> The ISPs take the path of least resistance.
>
>ISPs take the path of least resistance...
>Newbies take the path of least resistance...
>Parasites take the path of least resistance...
>
>Where's the work ethic gone?


It's gone to... uh... "stuff"   :-)


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


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

Date: 19 Jun 2000 12:51:36 +1000
From: norm@turing.une.edu.au (Norman Gaywood)
Subject: Doing the scanf %d thing
Message-Id: <8ik1ro$9no$1@turing.une.edu.au>
Keywords: perl scanf

I need something that does the same thing as C's scanf family of functions
when reading numbers from a file. That is, it skips spaces and newlines
until you get how many numbers you asked for. (It also skips non-number
strings but I don't need that). This sort of thing comes up with data
files generated by Fortran-turned-C-found-perl programmers all the time.

Here is my sample program and solution. It seems a bit complex for such
a simple thing. What obvious thing am I missing? I know the list copy
from getlist() could get nasty for big lists.


#!/usr/bin/perl -w
use strict;
my ($s, $n, @l);

$s = ScanWord->new(*STDIN);
$n = $s->getnext();
@l = $s->getlist($n);

print $#l, " of $n (", join(':',@l),")\n";


package ScanWord;

sub new {
  my $class = shift;
  my $self = {};
  $self->{FH} = shift;
  $self->{Buff} = [];
  bless $self, $class;
}

sub getnext {
  my $self = shift;
  unless (@{ $self->{Buff} } || eof($self->{FH})){
    $_ = readline($self->{FH});
    @{ $self->{Buff} } = split;
  }
  shift @{ $self->{Buff} };
}

sub getlist {
  my $self = shift;
  my $n = shift;
  my (@list, $v);
  push @list, $v while $n-- && defined($v=$self->getnext());
  @list;
}
-- 
Norman Gaywood -- School of Mathematical and Computer Sciences
University of New England, Armidale, NSW 2351, Australia
norm@turing.une.edu.au     http://turing.une.edu.au/~norm
Phone: +61 2 6773 2412     Fax: +61 2 6773 3312


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

Date: Mon, 19 Jun 2000 10:31:57 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: flock on dbmopen
Message-Id: <8ik0k9$6hr@netnews.hinet.net>

Dear all,

I use 'dbmopen' in a multi-access application (such as web-CGI).
Perl doesn't seem to provide locking for 'dbmopen'.
If I don't lock it, will there be race conditions?

Thank you.

John Lin





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

Date: Sun, 18 Jun 2000 15:21:41 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: How to determine a fake email address
Message-Id: <slrn8kq8a5.ccu.tadmc@magna.metronet.com>

On Mon, 19 Jun 2000 04:12:35 +0930, Henry <henry@penninkilampi.net> wrote:
>In article <slrn8kq1mq.ojo.abigail@alexandra.delanet.com>, 
>abigail@delanet.com wrote:
>
>> %% #!/usr/bin/perl -w
>> 
>> no use strict;
>
>No chance of variable collision in such a simple script, 


But there are lots of people reading this newsgroup.

(someone recently pointed out that there are a lot of "lurkers" here :-)

They are likely to copy code that they see here into
their larger programs.

_Then_ they will be back due to name collisions, and someone
will have to spend time responding to that.

Controlling scope is a Very Good Thing for folks to do.

So let's keep showing them examples where all the "good
programmers" have strict turned on.



>so I left it 
>out.


Please don't do that.


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


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

Date: Mon, 19 Jun 2000 02:36:07 +0100
From: "Robert Metcalf" <r.meEEEtcalfNOSPAM@exXXX.acCCC.ukKKK>
Subject: Re: How to determine a fake email address
Message-Id: <8ijta9$dn6t$1@athena.ex.ac.uk>

> > I'm using Perl to call sendmail to mail information to an address
> > supplied by a user in the form. I can check to see if the address is in
> > the correct format, but is there any way I can find out if the message
> > actually went through or bounced? I'm hoping there is a flag I can check
> > with Perl? I would like to check for both Host unknown and User unknown
> > errors. If I can do this *before* sending the message all the better.
> Basically, what it amounts to is that there is no _reliable_ way of
> finding out whether or not an email address is valid or not.  Regardless
> of how clever your program is, you're not going to get anywhere near a
> confidence level of 100%.  You'd be lucky to break 50%.
y not just send a password, or the next hyperlink to users via email
ensuring the emll address is theirs and active.
--
----------------------------------------------------------
REMOVE all capital letters to email me

FYI: If the subject of the message is:
Newbie Question
Please help me
or anything else not conatining the topic of the message, I tend to skip the
post.





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

Date: Mon, 19 Jun 2000 03:10:43 GMT
From: Amer Neely <aneely@softouch.on.ca>
Subject: Re: How to determine a fake email address
Message-Id: <394D8F17.DB33B4B6@softouch.on.ca>

Amer Neely wrote:
> 
> I'm not sure if this is a sendmail question, or a Perl question. My
> apologies if I've got it wrong. I'm not an administrator, so answers
> involving configuring sendmail will be no good to me.
> 
> I'm using Perl to call sendmail to mail information to an address
> supplied by a user in the form. I can check to see if the address is in
> the correct format, but is there any way I can find out if the message
> actually went through or bounced? I'm hoping there is a flag I can check
> with Perl? I would like to check for both Host unknown and User unknown
> errors. If I can do this *before* sending the message all the better.
> Thanks for any help.
> --
> Amer Neely aneely@softouch.on.ca
> Softouch Information Services: http://www.softouch.on.ca/
> Research Central: http://www.softouch.on.ca/rc/
> "There was a time when I thought I should be like everyone else.
> Then there was a time when I thought everyone else should be like me.
> Now I just think." - Amer Neely

Well, it seems I've loosed something here! After reading the responses I
think I get the picture now - I can't do what I'd like to do. Many, many
thanks to you all for taking up the thread on this. I've decided the
best I can do is request the user to 'reply' to the message. This is all
part of processing orders online, and I don't want to go ahead with a
manual credit card transaction until I get confirmation from the user.
If I don't get their reply, I don't process the order. This is the only
way I can think to handle the situation.

Again, many thanks (Tom, Abigail, Henry, Tad, and Robert) for the useful
and insightful responses. I hope I can be of some help to someone in a
future post.
-- 
Amer Neely aneely@softouch.on.ca
Softouch Information Services: http://www.softouch.on.ca/
Research Central: http://www.softouch.on.ca/rc/
"There was a time when I thought I should be like everyone else.
Then there was a time when I thought everyone else should be like me.
Now I just think." - Amer Neely


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

Date: 19 Jun 2000 02:09:07 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: I can't figure this one out...  (Newbie question)
Message-Id: <8ijvc3$50if4$2@fu-berlin.de>

hi,

David Bell <db7654321@aol.comspamsux> wrote:
>>what is amusing is how he seems to take one vague idea and run very far
>>in the wrong direction with it (qw and this odd use of ++).

> Well, I was mistaken about qw (I didn't know better), but seeing that ++
> increments by 1, just as $num + 1, does it matter?  If there is a real, good
> reason not to use ++, I'll use $num += 1 or $num + 1 instead.  In your
> experience, what are the disadvantages of ++?  Thankyou.

you can use what you like most, AFAIK there's no
difference in efficiency.
but as it was already said, don't write 
$num = ++$num; # that's useless

but write
++num;
or
$num++;

look at
perldoc perlop
to see whatelse ++ can do.

tina

-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \ _,_\ __/\ __/_| /__/ perception
"The Software required Win98 or better, so I installed Linux."


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

Date: Thu, 15 Jun 2000 16:08:23 +0800
From: PC Leung <dleung@ouhk.edu.hk>
Subject: install and use POP3Client
Message-Id: <39488EF7.BD192E87@ouhk.edu.hk>

Hello

I try to follow the readme of POP3Client
% perl Makefile.PL
% make
% make test
% make install

(1)When I 'make', there are messages as follows.

cp POP3Client.pm blib/lib/Mail/POP3Client.pm
AutoSplitting blib/lib/Mail/POP3Client.pm
(blib/lib/auto/Mail/POP3Client)
Manifying blib/man3/Mail::POP3Client.3
make: *** Warning:  Clock skew detected.  Your build may be incomplete.

(2)When I 'make test', there are messages as follows.

Use of uninitialized value at t/poptest.t line 32.
ok
All tests successful.
Files=1,  Tests=26,  0 wallclock secs ( 0.11 cusr +  0.04 csys =  0.15
CPU)
make: *** Warning:  Clock skew detected.  Your build may be incomplete.

(2) When I 'make install', there are messages as follows.

Installing /usr/local/lib/perl5/5.00503/man/man3/Mail::POP3Client.3
Writing
/home2/pcleung/html/POP3/lib/perl5/site_perl/5.005/i86pc-solaris/auto/Mail/POP3Client/.packlist
/bin/sh:
/home2/pcleung/html/POP3/lib/perl5/5.00503/i86pc-solaris/perllocal.pod:
cannot create
make: [doc_site_install] Error 1 (ignored)
Appending installation info to
/home2/pcleung/html/POP3/lib/perl5/5.00503/i86pc-solaris/perllocal.pod
make: *** Warning:  Clock skew detected.  Your build may be incomplete.

(4) If I run a perl program using POP3Client,

Can't locate Mail/POP3Client.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.00503/i86pc-solaris /usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/i86pc-solaris
/usr/local/lib/perl5/site_perl/5.005 .)


How can solve this ?

Thanks

pc


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

Date: Fri, 16 Jun 2000 11:18:27 +0800
From: PC Leung <dleung@ouhk.edu.hk>
Subject: link to a module when perl program starts
Message-Id: <39499C83.FD7987A2@ouhk.edu.hk>

hello

I want my perl program to link a POP3Client.pm
in a specific directory because my ISP does not
have this module.

How can I do that?

Thanks

pc


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

Date: Sun, 18 Jun 2000 16:49:21 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Monitor a process like Unix top But should be Perl/tk How?
Message-Id: <Pine.GSO.4.10.10006181643340.29843-100000@user2.teleport.com>

On Sun, 18 Jun 2000, Charles W.W. wrote:

> Newsgroups: comp.lang.perl.misc
> Subject: Monitor a process like Unix top But should be Perl/tk How?

It's generally to put at least some text into the body of your message.
Also, the experts on Perl/Tk will be more likely to see your message in
c.l.p.tk. But okay....

You should probably start with the source for GNU top, if it works on your
system, and see about having it display its output in a Perl/Tk widget. Of
course, you may get the job done sooner if you just open a new window
running the top utility you already have - unless this is a homework
assignment, in which case you shouldn't have asked here in the first
place. :-)

Cheers!

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



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

Date: Mon, 19 Jun 2000 00:22:14 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Monitor a process like Unix top But should be Perl/tk How?
Message-Id: <slrn8kqptj.btt.tjla@thislove.dyndns.org>

I was shocked! How could Charles W.W. <kingwang98@yahoo.com>
say such a terrible thing:
> 

perl -e 'exec top'

hth

-- 
Gwyn Judd (tjla@guvfybir.qlaqaf.bet)
My return address is rot13'ed
ROMEO: Courage, man; the hurt cannot be much.
MERCUTIO: No, 'tis not so deep as a well, nor so wide as a church-
	door; but 'tis enough, 'twill serve.


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

Date: Mon, 19 Jun 2000 05:31:23 +0200
From: "Charles W.W." <kingwang98@yahoo.com>
Subject: Re: Monitor a process like Unix top But should be Perl/tk How?
Message-Id: <394D940B.EF9DDA17@yahoo.com>

Yes I know But you must implement it in GUI Perl/TK How?

I need a user's interface to do it perfect. Thanks


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

Date: Mon, 19 Jun 2000 05:32:11 +0200
From: "Charles W.W." <kingwang98@yahoo.com>
Subject: Re: Monitor a process like Unix top But should be Perl/tk How?
Message-Id: <394D943B.14A38AB0@yahoo.com>

I must have it in GUI perl/tk window or widget .


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

Date: 18 Jun 2000 22:37:49 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Monitor a process like Unix top But should be Perl/tk How?
Message-Id: <87d7leibn6.fsf@limey.hpcc.uh.edu>

>> On Mon, 19 Jun 2000 05:31:23 +0200,
>> "Charles W.W." <kingwang98@yahoo.com> said:

> Yes I know But you must implement it in GUI Perl/TK How?
> I need a user's interface to do it perfect. Thanks

Get the source for top:

    http://www.groupsys.com/

Read the source, understand how it gets the info on your
platform, and then rewrite it in perl.  Maybe you could
take the bits of top that generate all the info and put
them into a perl module (perldoc perlxs) and do it that
way?

<phoenix>Good luck!</phoenix>

-- 
"Trying is the first step towards failure"
                                           Homer Simpson


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

Date: Mon, 19 Jun 2000 05:40:06 +0200
From: "Charles W.W." <kingwang98@yahoo.com>
Subject: Re: Monitor a process like Unix top But should be Perl/tk How?
Message-Id: <394D9616.A0B68960@yahoo.com>

Thank you.

It is not a homework. It is a project I have to finish in 2 weeks. I
need to monitor the several user and display in a perfect GUI window(
some graphic diagram maybe necessary) to show whether the process is
running or not  and some details. I need to parse the string I got from
top and dispaly them in my GUI so that user will be able to monitor the
every process running( for example a table with time an situation of
running process).

Is there any modules available for that?

JAPH


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

Date: 18 Jun 2000 22:52:16 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Monitor a process like Unix top But should be Perl/tk How?
Message-Id: <87aegiiaz3.fsf@limey.hpcc.uh.edu>

>> On Mon, 19 Jun 2000 05:40:06 +0200,
>> "Charles W.W." <kingwang98@yahoo.com> said:

> Thank you.  It is not a homework. It is a project I have
> to finish in 2 weeks. I need to monitor the several user
> and display in a perfect GUI window( some graphic
> diagram maybe necessary) to show whether the process is

> Is there any modules available for that?

What did you find when you went to http://search.cpan.org/
and looked for "top"?

-- 
"Trying is the first step towards failure"
                                           Homer Simpson


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

Date: Sun, 18 Jun 2000 20:30:12 -0700
From: psycho <psychoNOpsSPAM@pcpatches.com.invalid>
Subject: Need Help ! Please Read !
Message-Id: <15333261.53896953@usw-ex0103-024.remarq.com>

ok, heres my probelm. im doing a dir listing thing for a friend.
and on the script i've got the thing opening and reading the dir.
and displaying whats in the dir correct. But have you seen what
server defaut dir. listing look like? is there a way to get the
size, last modified, and des if any from the server?


Thanks,
 psycho

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com



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

Date: Mon, 19 Jun 2000 03:35:14 GMT
From: "DougW" <post_replys_please@invalid-address.com>
Subject: Net::NNTP question.
Message-Id: <Sxg35.13842$a5.59693@typhoon.kc.rr.com>

Using Activestate perl and Net::NNTP

So far I have been able to post (easy)
but I need an example of how to interact.

Safe to say I just started learning perl. ^_^

The goal is a bot that searches a specific
news group for a REQ: (request) then fills that
request.

To that end I'd also appreciate it if someone could
point me to a UUEncode/UUDecode library.  I could
code it myself but I'd rather not.

Figgure by the end of this project I should be able
to code darn near anything.

Oh, the email address in my post is bogus.
Sorry, I get entirely too much spam as it is.

Thanks for whatever help you can provide.

--lxix--
http://www.sputum.com
http://www.cabal.net






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

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 3415
**************************************


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