[19027] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1222 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jun 30 09:05:32 2001

Date: Sat, 30 Jun 2001 06:05:07 -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: <993906307-v10-i1222@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 30 Jun 2001     Volume: 10 Number: 1222

Today's topics:
        [ANNOUNCE] Bundle::Perl6 0.01 <marcel@codewerk.com>
        ANNOUNCE: XML::Xerces PPM for windows (isterin)
    Re: anonymous subroutines - why? nobull@mail.com
    Re: cant modify $_[x] ???? nobull@mail.com
    Re: cant modify $_[x] ???? nobull@mail.com
    Re: Code Review Needed! (Dave Hoover)
    Re: Create unique file in dir? (Tony L. Svanstrom)
    Re: getting a defined value from a html page <uri@sysarch.com>
    Re: getting a defined value from a html page (TuNNe|ing)
    Re: getting a defined value from a html page <uri@sysarch.com>
    Re: how to setup exit routine using eval nobull@mail.com
    Re: Is the Perl working...or what have  I messed up now <godzilla@stomp.stomp.tokyo>
    Re: lvalue functions nobull@mail.com
        Mod perl 1.20 win32 <flare_78@yahoo.com>
    Re: releasing array memory nobull@mail.com
    Re: Search script: passing information between programs nobull@mail.com
    Re: Textarea to file nobull@mail.com
        timing can make the difference: <miriam@allfineantz.nl>
    Re: unix `ps` <magilfix@us.ibm.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 29 Jun 2001 17:09:10 GMT
From: Marcel Grunauer <marcel@codewerk.com>
Subject: [ANNOUNCE] Bundle::Perl6 0.01
Message-Id: <tjqon52c1i9ff6@corp.supernews.com>

NAME
    Bundle::Perl6 - A bundle to install Perl6-related modules

SYNOPSIS
      perl -MCPAN -e 'install Bundle::Perl6'

CONTENTS
    Attribute::Handlers - Simpler definition of attribute handlers

    Attribute::Types - Attributes that confer type on variables

    Attribute::Overload - Attribute that makes overloading easier

    Attribute::TieClasses - Attribute wrappers for CPAN Tie classes

    Attribute::Util - A selection of general-utility attributes

    Attribute::Deprecated - Mark deprecated methods

    Scalar::Properties - Run-time properties on scalar variables

    Switch - A switch statement for Perl

    Perl6::Variables - Perl 6 variable syntax for Perl 5

    NEXT - Provide a pseudo-class NEXT for method redispatch

DESCRIPTION
    This bundle defines modules that may be of interest to those discussing
    and implementing the Perl 6 language. Some of these are
    proof-of-concepts that the respective authors have implemented to show
    how things might work in Perl 6.

    There's a web page dealing with these modules and proof-of-concepts at
    http://www.codewerk.com/perl6/.

AUTHOR
    Marcel Grunauer, <marcel@codewerk.com>

COPYRIGHT
    Copyright 2001 Marcel Grunauer. All rights reserved.

    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

SEE ALSO
    All the modules in the bundle, of course.


Marcel

-- 
We are Perl. Your table will be assimilated. Your waiter will adapt to
service us. Surrender your beer. Resistance is futile.
 -- London.pm strategy aka "embrace and extend" aka "mark and sweep"




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

Date: 29 Jun 2001 12:10:02 -0700
From: isterin@hotmail.com (isterin)
Subject: ANNOUNCE: XML::Xerces PPM for windows
Message-Id: <tjqoni9pcg9bfc@corp.supernews.com>

XML::Xerces is now available as a PPM package.
You must set your repository to point to http://www.xmlproj.com/PPM
Instructions for installation, which also requires a few extra steps
can be found at http://www.xmlproj.com/xerces/windows_install.html

This is the package for XML::Xerces 1.3.0 based on Xerces-C 1.3.0.  I
will port the 1.5.0 to windows as my time permits and announce another
PPM.

Thanks to Nick Semenov for all his help in porting this and fixing a
few tests.

Ilya Sterin




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

Date: 30 Jun 2001 07:05:24 +0100
From: nobull@mail.com
Subject: Re: anonymous subroutines - why?
Message-Id: <u966dezemz.fsf@wcl-l.bham.ac.uk>

Mark Grimshaw <m.grimshaw@salford.ac.uk> writes:

> [...] I've got a simplified version just for test purposes followed by a
> 'standard' example.  Despite the fact that Ex 2 requires less typing, is
> there an advantage to using Ex 1 or am I just being perverse for such a
> simple script?

I must admit I'm a bit bemused by this.  You appear to say you've taken
a bit of code that uses anonymous subroutines and simplified it to the
point where it does nothing usesful and is simply an example of how
anonymous subroutines work.  You then ask if there's any advantage in
this code in using anonymous subroutines!?  Well... if you didn't what
would be it's function?

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 30 Jun 2001 06:30:50 +0100
From: nobull@mail.com
Subject: Re: cant modify $_[x] ????
Message-Id: <u9pubmzg8l.fsf@wcl-l.bham.ac.uk>

"Aman Patel" <patelnavin@icenet.net> writes:

> &doRemovePipes( my $modifyable_copy_of_text = $text );
> 
> why can $text be modifiable to begin with, What I mean to ask is what makes
> a variable modifyable/non-modifyable...

Ok let's try.... (for the sake of simplicity I'm only going to talk
about scalar context and ignore list context).

As a general rule a variable is modifiyable.

As a general rule expressions (other than expressions that are
variables) are not modifyable.

An expression that can yield a modifyable result is known as an
"lvalue expression" because it can go on the _left_ of an assignment
operator.  lvalue expressions are usually expressions that identify a
storage location.

An expression that cannot yield a modifyable result is known as an
"rvalue expression" because it can go only on the _right_ of an
assignment operator.

Thus the following are lvalue expresions would usually be modifyable:

  $foo  $foo[1] $foo{1}

The following would not be modifiable:

  foo()  foo()+foo() 'foo' 5  length($foo)

There are some special cases:

  foo() will be modifiable if foo() has the lvalue attribute and the
  expression in the return() was nodifiable.

  Some builting functions are lvalues too.

Variables in Perl may sometimes be alaises.  If a $foo is an alias
for $bar then modifying $foo actually modifies $bar.  If $bar is
unmodifyable then so is $foo.

There are two common places one encounters aliases in Perl: loop
iterator variables and subroutine arguments.

my $bar = 0;
for my $foo ($bar) {
  # $foo is now ann alias for $bar
  $foo = 1; # Actually sets $bar=1
}

for my $foo (0) {
  # $foo is now an alias for the rvalue 0
  $foo = 1; # Throws an error
}

foo1($bar);
sub foo1 {
  # $_[0] is now ann alias for $bar
  $_[0] = 1; # Actually sets $bar=1
}

foo2(0);
sub foo2 {
  # $_[0] is now an alias for the rvalue 0
  $_[0] = 1; # Error
}

You can also creates explicit aliases (in package variables) using the
GLOB syntax:

 *foo = \$bar;
 # $foo is now ann alias for $bar
 $foo = 1; # Actually sets $bar=1

 *foo = \0;
 # $foo is now an alias for the rvalue 0
 $foo = 1; # Throws an error


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

Date: 30 Jun 2001 06:38:13 +0100
From: nobull@mail.com
Subject: Re: cant modify $_[x] ????
Message-Id: <u9n16qzfwa.fsf@wcl-l.bham.ac.uk>

Tina Mueller <tinamue@zedat.fu-berlin.de> writes:

> well, variables are always modifiable,

Not quite true.

> or if a variable is a
> reference, then it is the same as the thing it is referencing.

You are using "reference" here in the sense it which it is used in
C++.  In Perl "reference means something different (closer to
"pointer" in C++).  In Perl the term "alias" is sometimes used to
label the concept that is called "reference" in C++. 

> $text = "text"; # $text is modifiable, of course, because it
>                 #contains a copy of "text"

True.

> mysub($text); # $text is modifiable here

Er, no there's nothing here that effects the modifiablity of $text one
way or the other.

> $text = \$text2; # $text is modifiable only if $text2 is

Er no, $test is modifiable.  ${$text} is modifiable only if $text2 is

> $text = \3; # $text is *not* modifiable, because
>         3 is data and no variable, so if you
>         would try to change 3, you would try to change the
>         number 3.

Er no, $test is modifiable.  ${$text} is not modifiable.

> mysub("constant"); # here you are feeding data, no variable
>         # to the sub. if you alter $_[0] in the sub, you
>         # would try to change the data itself, which is again not
>         # possible.

True

> does that help?

I'd guess on ballence your explaination did more harm than good.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 29 Jun 2001 23:28:52 -0700
From: redsquirreldesign@yahoo.com (Dave Hoover)
Subject: Re: Code Review Needed!
Message-Id: <812589bb.0106292228.14175ca1@posting.google.com>

At the suggestion of a few people I've converted the program into text
files to make things easier for reviewers.  Here are the four files:

http://www.redsquirreldesign.com/soapbox/Soapbox.pm.txt
http://www.redsquirreldesign.com/soapbox/main.txt
http://www.redsquirreldesign.com/soapbox/soap.txt
http://www.redsquirreldesign.com/soapbox/soapbox.conf.txt

I am particularly interested in feedback about: 
  Any common newbie blunders you may find 
  Security issues 
  Specific areas where the code could be more efficient 
  A critique on my use of object-oriented Perl 

The feedback I have received thus far has been very helpful. It's been
a learning experience...particularly about taint checking!

Thanks,

--Dave


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

Date: Sat, 30 Jun 2001 04:08:07 GMT
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: Create unique file in dir?
Message-Id: <1evsx0w.12b27j01wnyy70N%tony@svanstrom.com>

Ren Maddox <ren@tivoli.com> wrote:

> On Fri, 29 Jun 2001, tony@svanstrom.com wrote:
> 
> > Craig Berry <cberry@cinenet.net> wrote:
> > 
> >> Tony L. Svanstrom (tony@svanstrom.com) wrote: : Personally i use
> >> time-pid-[4 random numbers], if that fails then the you : most
> >> likely have a lot more serious server-related problems to deal with
> >> : then non-unique files. Besides, since you lock the file nothing
> >> bad will : happen anyways...
> >> 
> >> I'd prefer something deterministic (I know, I'm obsessive).  The
> >> FAQ answer (perldoc -q temp, as suggested in another response)
> >> involving POSIX tmpnam and sysopen seems to be the right course.  I
> >> missed finding it because my intended use is not as a temporary
> >> file.
> > 
> > well, for time-pid to fail you need to have (dependin on the set up
> > on the machine, of course) more than 10'000 processes running at the
> > same time, and you have to be so unlucky that, if things work at all
> > then (anyone geekier than me that knows?), that your script has the
> > same pid as the first one... and then adding four random
> > numbers/characters... It just won't happen.
> 
> Until your code becomes multi-threaded on a high transaction-per-
> second system.  Arbitrary restrictions should be avoided if possible
> -- particularly when the avoidance mechanism is straight-forward.

Yes, it is, you simply check if the file exists before trying to create
it...


        /Tony
-- 
the truth is dead, faith is gone, reality killed... ruled by the plastic
laws of modern life we're pushed towards the hell of personal doubt,
betrayal, hate, lust and murder... the now has become an illusion, a
paradise of a dead tomorrow... (c)2000-2001 tony@svanstrom.com


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

Date: Sat, 30 Jun 2001 04:37:46 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: getting a defined value from a html page
Message-Id: <x766de8twl.fsf@home.sysarch.com>

>>>>> "T" == TuNNe|ing  <troll@gimptroll.com> writes:

it helps to quote SOME of the previous post so there is some context to
what you say.

  T> open(FILE,"newsletter.htm");
  T> 	while(<FILE>) {
  T> 		$temp .= $_;
  T> 	}

blechh! even the OP had this:

	$_ = join('',@FILE);

which is much faster. but a proper file slurp is the right way to do
this. it has been shown too many times to repeat now.

  T> close(FILE);
  T> print $temp =~ /\<Temperatuur\>(.+)\<\/Temperatuur\>/s;

no need for the \ before < or >. they are not special regex chars. and
if you have a / in the regex, use alternate delimiters.

also if there are multiple sets of that tag, then you will match all the
text from the first tag to the last one. use ? to get a non-greedy
match.

in general it is not a good idea to directly print from a regex. better
to assign the matches (in a list context) or use $1 and friends.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: Sat, 30 Jun 2001 05:11:53 GMT
From: troll@gimptroll.com (TuNNe|ing)
Subject: Re: getting a defined value from a html page
Message-Id: <3b3d786a.24867857@news>

Thanks.
Ok. So, is this better?
#!/usr/bin/perl -w

{
	local $/ = undef;
	open(FILE,"newsletter.htm");
		$_ = <FILE>;
	close(FILE);
	while(/<Temperatuur>(.+?)<\/Temperatuur>/sg) {
		print $1;
	}
}

On Sat, 30 Jun 2001 04:37:46 GMT, Uri Guttman <uri@sysarch.com> wrote:

>>>>>> "T" == TuNNe|ing  <troll@gimptroll.com> writes:
>
>it helps to quote SOME of the previous post so there is some context to
>what you say.
>
>  T> open(FILE,"newsletter.htm");
>  T> 	while(<FILE>) {
>  T> 		$temp .= $_;
>  T> 	}
>
>blechh! even the OP had this:
>
>	$_ = join('',@FILE);
>
>which is much faster. but a proper file slurp is the right way to do
>this. it has been shown too many times to repeat now.
>
>  T> close(FILE);
>  T> print $temp =~ /\<Temperatuur\>(.+)\<\/Temperatuur\>/s;
>
>no need for the \ before < or >. they are not special regex chars. and
>if you have a / in the regex, use alternate delimiters.
>
>also if there are multiple sets of that tag, then you will match all the
>text from the first tag to the last one. use ? to get a non-greedy
>match.
>
>in general it is not a good idea to directly print from a regex. better
>to assign the matches (in a list context) or use $1 and friends.
>
>uri
>
>-- 
>Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
>SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
>Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
>Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html



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

Date: Sat, 30 Jun 2001 05:24:35 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: getting a defined value from a html page
Message-Id: <x71yo28rqk.fsf@home.sysarch.com>

>>>>> "T" == TuNNe|ing  <troll@gimptroll.com> writes:

  T> Ok. So, is this better?
  T> #!/usr/bin/perl -w

  T> {
  T> 	local $/ = undef;

no need to assign undef, local does that for you.

  T> 	open(FILE,"newsletter.htm");

always check the return value of open calls.

  T> 		$_ = <FILE>;
  T> 	close(FILE);

  T> 	while(/<Temperatuur>(.+?)<\/Temperatuur>/sg) {
  T> 		print $1;
  T> 	}

that will work ok. but you still have a \/. that is known as leaning
toothpick syndrome. use another delimiter to clean it up. it is a common
problem with the close tag in html.


finally, please don't include the ENTIRE quoted post and put your
comments below the edited quotes.

<SNIP of entire quoted post>

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: 30 Jun 2001 06:52:03 +0100
From: nobull@mail.com
Subject: Re: how to setup exit routine using eval
Message-Id: <u9d77mzf98.fsf@wcl-l.bham.ac.uk>

"Joy Vazapully" <j.vazapully@worldnet.att.net> writes:

> Does anyone know how to set up an exit routine using eval.

Stick "eval {" at the start start of the script and "};
stuff_to_do_at_end();" and the end.

> It's explained on page 162 of programming perl, but I don't quite understand
> it.

Sorry, there is no page 162 in my copy of "Programming Perl".  This probably
has something to do with the fact that it's on CD.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Fri, 29 Jun 2001 21:10:19 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Is the Perl working...or what have  I messed up now? - happy dance
Message-Id: <3B3D512B.2FDEA3EA@stomp.stomp.tokyo>

gail pickens-barger wrote:

(snipped)

> So your suggestions and my permutations/combinations worked.
 
> Do I need to suggest anything to my ISP?

Yes. Suggest to your server's administrator, she or
he send me, for my consultation services, at least 
two-thousand pounds of fresh fish, delivered to my
front door porch, along with a split of chilled
brut champagne. I am a light drinker.


Godzilla!
-- 
@ø=(a .. z);@Ø=qw(6 14 3 25 8 11 11 0 17 14 2 10 18);
$§="\n";$ß="\b";undef$©;print$§x($Ø[4]/2);
for($¡=0;$¡<=$Ø[2];$¡++){foreach$¶(@Ø){
$ø[$¶]=~tr/A-Z/a-z/;if(($¡==1)||($¡==$Ø[2]))
{$ø[$¶]=~tr/a-z/A-Z/;}print$ø[$¶];if($¶==0)
{print" ";}if($¶==$Ø[12]){print" !";}&D;}
print$ßx($Ø[4]*2);}print$§x($Ø[10]*2);
sub D{select$©,$©,$©,.25;}exit;


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

Date: 30 Jun 2001 06:47:17 +0100
From: nobull@mail.com
Subject: Re: lvalue functions
Message-Id: <u9k81uzfh6.fsf@wcl-l.bham.ac.uk>

Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:

> [A complimentary Cc of this posting was sent to <nobull@mail.com>],

An un-complimentary (indeed downright critical) Cc of this posting was
sent to Ilya.

> <nobull@mail.com> wrote in article <u97kxwzfnd.fsf@wcl-l.bham.ac.uk>:

> > How about the following syntax?
> 
> >   use LvalueSubWithSeperateFetchAndStoreMethods func => {
> >     FETCH => sub { $private },
> >     STORE => sub { $private = shift },
> >   };
> 
> Why do you discuss syntax where semantic would not work?

Obviously I would not do so deliberately.  I'm not actually familar
with the sematics lvalue functions in Ruby as alluded to by the OP - I
just made an educated guess.  Can you please explain the difference
between the sematics sought by the OP and those provided by my
LvalueSubWithSeperateFetchAndStoreMethods.pm?
 
> Remember cryptocontext?

Remember it?  I've never even heard of it!

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Sat, 30 Jun 2001 05:16:32 GMT
From: Winston Khoo <flare_78@yahoo.com>
Subject: Mod perl 1.20 win32
Message-Id: <1103_993878192@winston-main>

Hi there,

	Is it possible to find mod perl 1.20 still in win32 binary format? I want to use it for activeperl/ win nt environment.


If there is, please email me. Thanks.




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

Date: 30 Jun 2001 06:57:43 +0100
From: nobull@mail.com
Subject: Re: releasing array memory
Message-Id: <u98ziazezs.fsf@wcl-l.bham.ac.uk>

Benjamin Goldberg <goldbb2@earthlink.net> writes:

> nobull@mail.com wrote:
> [snip]
> > If Perl had proper garbage collection then giving it a defragmentable
> > heap would be possible but would mean you couldn't use the pack/unpack
> > trick on a refrence to get at the internals of an object.
> 
> Which trick is that?

Pack an interger and then unpack it as a pointer to a string.  This
gets you a string that contains an image of an arbitrary location in
the current process's memory.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 30 Jun 2001 06:48:44 +0100
From: nobull@mail.com
Subject: Re: Search script: passing information between programs?
Message-Id: <u9g0cizfer.fsf@wcl-l.bham.ac.uk>

samara_biz@hotmail.com (Alex) writes:

> I am implementing a search script for a web site. I am not sure how to
> pass results returned from my search script (which is just a program
> on a Linux box) to a cgi script. I guess one way would be to write
> them in a file and then read the file from the cgi script, but in this
> case I would have to have a unique name for each file I'm writing to
> avoid a race condition on files. (Or lock the file during read/write,
> but that's more complicated). Is that the best way to do this? Can
> someone maybe advise me on a better way of doing this?

Assuming you can fit all the inputs to the called script on the
command line then simply use the pipeline form of open() or backticks.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 30 Jun 2001 07:19:54 +0100
From: nobull@mail.com
Subject: Re: Textarea to file
Message-Id: <u9y9qaxzed.fsf@wcl-l.bham.ac.uk>

troll@gimptroll.com (TuNNe|ing) writes:

> This is some EDITED sample code I got from Perl 5 by Example by David
> Medinets.

>     if ($ENV{'REQUEST_METHOD'} eq "GET") {
>         $buffer = $ENV{'QUERY_STRING'};
>     }
>     else {
>         read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>     }
> 
>     foreach (split(/&/, $buffer)) {
>         my($key, $value) = split(/=/, $_);
>         $key   = decodeURL($key);
>         $value = decodeURL($value);
>         $value =~ s!\n!<br>!g;#Convert newlines into <br>
>         %{$hashRef}->{$key} = $value;
>     }
> }

Sounds like a good reason to loose that book.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Sat, 30 Jun 2001 11:45:48 +0200
From: "Yo" <miriam@allfineantz.nl>
Subject: timing can make the difference:
Message-Id: <Wah%6.141754$qM3.17310429@news.soneraplaza.nl>

Hi,

Paradox:

I need to execute a script every 20 minutes.
can't use calendar, cron or other tool.
I'm on Pentium II 500 Mhz NT4 SP6a, Perl 5.004_02


I want the script to start sleeping at the end of execution, here's code:

while(1=1) {
    ####loadza code here####
    sleep(x)
}


x is the main problem here.... how to get that value in ms?
I know for 20 minutes x would be 20*60*1000
But the script's execution would shift the start-time a few seconds every 20
minutes.
Get it?

So.... uhm..... point is: how do I do this?

Anyone?




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

Date: Sat, 30 Jun 2001 01:13:14 -0500
From: Michael Gilfix <magilfix@us.ibm.com>
Subject: Re: unix `ps`
Message-Id: <9hjqie$q7a$1@ausnews.austin.ibm.com>


        The alternative is to read the information directly from the /proc 
directory. There's a CPAN library to do this at:

http://search.cpan.org/search?dist=Proc-ProcessTable

        -- Mike

On Friday 29 June 2001 14:22%, Todd Smith wrote:

> My server was rooted today by some script-kiddie, and ls, ps, and du were
> trojaned. Is there a way to list all the pids and process names with perl,
> similar to the unix ps but without all the options?

-- 
Michael Gilfix
Extreme Blue Group - IBM (Austin)
magilfix@us.ibm.com


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

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.  

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


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