[12500] in Perl-Users-Digest
Perl-Users Digest, Issue: 6100 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 22 20:07:15 1999
Date: Tue, 22 Jun 99 17:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 22 Jun 1999 Volume: 8 Number: 6100
Today's topics:
Re: accessing a character in a string <tchrist@mox.perl.com>
accessing registry from CGI <deighan@vt.edu>
aut et vel <tchrist@mox.perl.com>
Re: blank row in array <tchrist@mox.perl.com>
Re: deleting whitespace (Larry Rosler)
Re: deleting whitespace <tchrist@mox.perl.com>
Re: Displaying Adds (Matthew Bafford)
Re: Displaying Adds (Tad McClellan)
Re: Exporting variables from a module <jeffp@crusoe.net>
Re: floundering with fork.... (Charles DeRykus)
Re: how to test pl scripts.? <webmaster@chatbase.com>
Re: Looking for very small, basic bulletin board system <cassell@mail.cor.epa.gov>
perl equivalent of #INCLUDE? <ginger@ma.ultranet.com>
Re: perl equivalent of #INCLUDE? <tchrist@mox.perl.com>
Re: Perl Program <rootbeer@redcat.com>
Re: Perl Program <tchrist@mox.perl.com>
Re: Perl Program <tchrist@mox.perl.com>
perlcc code compiles but won't run: WHY???? <firespring@nfx.net>
Re: Sybperl bcp initialization <mpeppler@peppler.org>
Re: time question (Larry Rosler)
Re: What is First line in Perl5 in Sun Micro... <fishers@lister.acm.wwu.edu>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 22 Jun 1999 17:32:09 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: accessing a character in a string
Message-Id: <37701cf9@cs.colorado.edu>
In comp.lang.perl.misc, "Ariel" <fake@nospam.edu> writes:
:hi. you know how in C you can say
:
:char mystring[ ] = "hello";
:char myletter = mystring[1]; #myletter is the character 'e'
:
:is there a way to do a similar thing in Perl? how do you access certain
:characters in strings?
Yes. And when you stop screwing up your address, I'll
tell you how.
--tom
--
"You can't have filenames longer than 14 chars.
You can't even think about them!"
--Larry Wall in Configure from the perl distribution
------------------------------
Date: Tue, 22 Jun 1999 19:21:56 -0400
From: John Deighan <deighan@vt.edu>
Subject: accessing registry from CGI
Message-Id: <37701A94.1CF0199B@vt.edu>
using Win32::TieRegistry, I can access registry keys just fine when I'm
running a stand alone Perl script. However, from within a CGI script, I
cannot access registry keys. I've tried setting permissions on the key
to allow access to the IUSR_<computer name> account, or even setting the
IIS anonymous account to "Administrator" (temporarily), but that doesn't
help. Does anyone know why I can't access the NT 4.0 registry under IIS
4.0?
------------------------------
Date: 22 Jun 1999 17:30:06 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: aut et vel
Message-Id: <37701c7e@cs.colorado.edu>
I wonder whether C and Perl hackers from the Vatican have the same
problems with distinguishing | vs ^ as English speakers do. Since "or"
is usually exclusive or, but Latin had both. Consider how | is "either A
or B or both A and B" (inclusive or; not usually the English meaning),
whereas ^ is "either A or B but not both A and B" (exclusive or)?
They have both an inclusive and an exclusive "or" in their language,
after all. :-)
--tom
--
It's there as a sop to former Ada programmers. :-)
--Larry Wall regarding 10_000_000 in <11556@jpl-devvax.JPL.NASA.GOV>
------------------------------
Date: 22 Jun 1999 17:22:18 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: blank row in array
Message-Id: <37701aaa@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Ala Qumsieh <aqumsieh@matrox.com> writes:
:would you please explain what a "row" of an array is? As far as I
:know, arrays in Perl are one dimensional.
That's really a matter of persective. Do you consider C's
argv to be one dimensional? I can write:
int loginshell = argv[0][0] == '-';
in C, and the right thing will happen. I can also
write this in Perl:
for $i ( 1 .. 10 ) {
for $j ( 1 .. 10 ) {
$a[$i][$j] = $i**2 + $j**2;
}
}
And the right thing will happen as well.
Yes, I'm quite aware how int matrix[100][100] in C doesn't actually use
pointers (it only appears to), and dimly recall "real" two-dimensional
arrays in Fortran as well. But saying argv[0][0] or $a[$i][$j] aren't
2D-array accesses seems to be splitting hairs unnecessarily finely.
Official Word from Larry is that "Yes, Perl has multi-dimensional arrays.
They just happen to be implemented using as arrays of references to
arrays."
--tom
--
"Most Non-Unix managers conclude that VI is either extraterrestrial
in origin or was devised by the original Unix developers as part of a
secret communication s code to reach another dimension."
--Communications Week - July 26, 1993.
------------------------------
Date: Tue, 22 Jun 1999 16:15:18 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: deleting whitespace
Message-Id: <MPG.11d9b8e2bc924443989c29@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <P9Ub3.3018$I72.384814@nnrp1.ptd.net> on Tue, 22 Jun 1999
22:32:15 GMT, ted fiedler <tfiedler@ptd.net> says...
> how do i delete whitespace or for what its worth any junk on a line?
Use a regular expression. Read all about it first, in perlre. You can
probably find a softer introduction to regular expressions in a Perl
tutorial. One on the Web was recommended here today.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 22 Jun 1999 17:35:07 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: deleting whitespace
Message-Id: <37701dab@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
"ted fiedler" <tfiedler@ptd.net> writes:
:how do i delete whitespace or for what its worth any junk on a line?
As a first approximation, I'd do it the way the standard perlop manpage
on your very own system and the way the standard perlfaq4 manpage on
your very own system explain it.
--tom
--
PL/1, "the fatal disease", belongs more to the problem set than to the
solution set.
--E. W. Dijkstra
------------------------------
Date: Tue, 22 Jun 1999 23:07:46 GMT
From: dragons@dragons.duesouth.net (Matthew Bafford)
Subject: Re: Displaying Adds
Message-Id: <slrn7n04r1.5p3.dragons@dragons.duesouth.net>
::Tue, 22 Jun 1999 21:30:04 GMT::j_a_p@my-deja.com::j_a_p@my-deja.com::Displaying Adds::<7kov8d$kn1$1@nnrp1.deja.com>::comp.lang.perl.misc::
: I want to write a simple function that displays adds and changes the
: picture every so often.
[snipza!]
Here's one that displays a new add every time it's called:
#!/usr/bin/perl -w
# GD code kinda sorta ripped from Randal Schwartz:
# http://www.stonehenge.com/merlyn/
use GD;
my $one = int rand 256;
my $two = int rand 256;
my $total = $one + $two;
my $string = sprintf "%d + %d = %d", $one, $two, $total;
print "Content-type: image/gif\n\n";
my $font = gdLargeFont;
my $char_x = $font->width;
my $char_y = $font->height;
my $picture_x = (1 + $char_x) * length($string) + 1;
my $picture_y = (1 + $char_y);
my $image = new GD::Image($picture_x, $picture_y);
my $background = $image->colorAllocate(127,127,127);
$image->transparent($background);
$image->interlaced('true');
my $red = $image->colorAllocate(255,0,0);
$image->string($font, 1, 1, $string, $red);
print $image->gif;
__END__
I haven't tested it much, so there may be some major bugs.
Hope This Helps!
--Matthew
------------------------------
Date: Tue, 22 Jun 1999 14:22:31 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Displaying Adds
Message-Id: <79kok7.qg.ln@magna.metronet.com>
j_a_p@my-deja.com wrote:
: I want to write a simple function that displays adds and changes the
: picture every so often.
: An add apears and after a while an knew
: add appears.
-----------------
#!/usr/bin/perl -w
# script to display some adds (sic)
use strict;
my @adds = ('1+1', '2+1', '1+2', '2+2');
my $i =0;
while (1) {
print "$adds[$i]\n";
sleep 5;
$i++;
$i = 0 if $i == 3;
}
-----------------
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 22 Jun 1999 19:44:55 -0400
From: evil Japh <jeffp@crusoe.net>
Subject: Re: Exporting variables from a module
Message-Id: <Pine.GSO.3.96.990622194418.12242A-100000@crusoe.crusoe.net>
On Tue, 22 Jun 1999, Tom Phoenix wrote:
> On Tue, 22 Jun 1999, evil Japh wrote:
>
> > $::variable = 10; # assumes current package
>
> package, as though you had written $main::var.
Indeed, I am in error; I was thinking correctly, but wrote otherwise.
Hell, I had myself confused. :)
--
Jeff Pinyan (jeffp@crusoe.net)
www.crusoe.net/~jeffp
Crusoe Communications, Inc.
732-728-9800
www.crusoe.net
------------------------------
Date: Tue, 22 Jun 1999 22:47:34 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: floundering with fork....
Message-Id: <FDr3BA.9IJ@news.boeing.com>
In article <376F6E93.2CB603FF@pilot.infi.net>,
Dave <wavey@pilot.infi.net> wrote:
>disclaimer: I'm new to perl :-)
>
> I am grepping from a large text file for use later in my script. Is
>it possile to have a forked child take care of the grep while the parent
>goes on to sub menu which has a few options any of which need the
>@grepped_text from the child? How do I get the array from child to sub
>whatever?
>
> In other words I want this time consuming grep to run while a user is
>reading and selecting options. After a few options the sub that they
>end up in will need to do some work on that grepped array.....
>
>Am I thinking about this fork in the wrong way?
>
No, you took the right fork in the road...
Take a look at safe pipe opens in the perlipc docs
(perldoc perlipc). You could probably whip up
something from the code samples, e.g.:
$pid = open(KID_GREP, "-|");
die "pipe failed: $!" unless defined $pid;
if ($pid) { # parent
# do something interesting until grep needed
...
# need grep output now
@output = <KID_GREP>;
close(KID_GREP) || warn "kid exited $?";
} else { # child
exec '/usr/bin/grep', @opts, $pat, @files
or die "can't exec: $!";
}
...
hth,
--
Charles DeRykus
------------------------------
Date: Tue, 22 Jun 1999 17:01:02 -0700
From: TRG Software : Tim Greer <webmaster@chatbase.com>
Subject: Re: how to test pl scripts.?
Message-Id: <377023BE.D379D366@chatbase.com>
ivanwalsh@my-deja.com wrote:
>
> Forgive this question (we all begin somewhere)
>
> but if I want to install Linux or Apache, do I
> have to uninstall Windows 98. Somehow I was under
> the impression that you could not have Win98 and
> Linux on the same workstation.
>
> My aim being also to test Perl files.
>
<SNIP>
Well, you don't need Linux. You can get a Win32 version of Apache, a
Win32 version of Perl and run them fine. Of course there's the problem
where Windows can't perform some Unix system calls (but just don't use
them), and you are able to test pretty much all scripts on your own PC.
However, since you said that you were trying to get a mail program
running, you might have to install "blat".
If you do install Linux, you'd have to use a program such as Partition
Magic and split the drive into two partitions, 3 would actually be
better as you'd want to have a swap drive usually (but that's used
usually for lack of RAM). That's sort of a lot of trouble to go through,
and it's a good way to wipe out your current drive with Win98 on it. I
don't suggest you do it until you know what it is and understand it. You
should be able to run most things on your Win98 with ActivePerl
(www.activestate.com) and Apache (www.apache.org).
--
Regards,
Tim Greer : webmaster@chatbase.com | software@linkworm.com
The ChatBase: http://www.chatbase.com | 250,000+ hits daily Worldwide!
TRG Software: http://www.linkworm.com | CGI scripts in Perl/C, & more.
Unix/NT/Novell Administration, Security, Web Design, ASP, SQL, & more.
Freelance Programming & Consulting, Musician, Martial Arts, +Sciences.
------------------------------
Date: Tue, 22 Jun 1999 16:53:31 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Looking for very small, basic bulletin board system
Message-Id: <377021FB.FA726BB4@mail.cor.epa.gov>
ivanhead@my-deja.com wrote:
>
> Oh, I'm ecstatic.
Good. Can you next time reply *after* the text to which you're
responding? It's easier for others to read, and it is the
official Usenet standard. Thank you.
> Could you perhaps give me a some more useful information?
I thought that *was* useful. You can start at Yahoo and look
under Programming Languages, then down to Perl. Or you can
do something similar at just about any of the major search
engines. You can also check places like cgi.resourceindex.com
for big wads of URLs to look through.
> In article <376FD6EE.C7E6486F@mail.cor.epa.gov>,
> David Cassell <cassell@mail.cor.epa.gov> wrote:
> > You'll be happy to know that there's a thousand of these on the
> > web. Just don't go to Matt's Script Archive. Happy searching!
My advice about Matt's Scripts still holds. Some of them
don't even manage to be Y2K-compliant, which isn't a good
thing on June 22 1999...
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 22 Jun 1999 19:06:33 -0400
From: Ron Ginger <ginger@ma.ultranet.com>
Subject: perl equivalent of #INCLUDE?
Message-Id: <377016F9.EE2@ma.ultranet.com>
Im doing several perl programs. I have a set of common subroutines I
want to use in them so I want to put the common stuff into a separate
file for easy maintenance. But, I want the subs to be able to use the
global vars Ive defined in my main routines. If I 'use' or 'require' the
subroutine file the subs do not see my global vars.
Ive read lots of the stuff on building modules, but it all seems to be
involved in hiding the subs vars from the main program, or selectively
exporting them. I cant find anything that talks about a sub using the
mains globals.
I know that a sub defined in the main routine can see the vars as
global. I really want a simple #INCLUDE ability
ron
------------------------------
Date: 22 Jun 1999 17:42:42 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: perl equivalent of #INCLUDE?
Message-Id: <37701f72@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, cursed by a broken keyboard,
Ron Ginger <ginger@ma.ultranet.com> writes:
:Ive read lots of the stuff on building modules, but it all seems to be
I've
:involved in hiding the subs vars from the main program, or selectively
:exporting them. I cant find anything that talks about a sub using the
can't
:mains globals.
main's
:
:I know that a sub defined in the main routine can see the vars as
:global. I really want a simple #INCLUDE ability
I don't think you do. "do" or "require" would suffice. Just use a
regular library, not a module, and pollute your main namespace to your
heart's content. Just don't show anyone the code, or even look at
yourself in the mirror the next day.
--tom
--
No, I'm not going to explain it. If you can't figure it out, you didn't
want to know anyway... :-)
--Larry Wall in <1991Aug7.180856.2854@netlabs.com>
------------------------------
Date: Tue, 22 Jun 1999 16:01:02 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl Program
Message-Id: <Pine.GSO.4.02A.9906221558250.1698-100000@user2.teleport.com>
On 22 Jun 1999, Sai Chimakurty wrote:
> There is a process. It has sub-processes and it inturn has
> sub-processes. In my daily routine, I get the process number of
> the main process. Get all the sub-process, and then get all the
> sub-sub-processes by issuing "ps -ef |grep process", kill each
> one individually. It is taking more than half an hour for the
> entire process. For this I want to write a perl program which
> kills process and its sub-process and its sub-process and so on.
grepping the output of ps is terribly un-portable, but there's no portable
alternitive. :-( But perl can kill processes, too. Maybe you want to use
qx`` to run ps, then use perl to grep the output and send the HUP signal
to the processes to kill. Wait three seconds and try again, but this time
use INT. Keep pausing and trying tougher signals as you go, until you get
to using KILL on the most stubborn ones. Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 22 Jun 1999 17:37:50 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Program
Message-Id: <37701e4e@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Tom Phoenix <rootbeer@redcat.com> writes:
:grepping the output of ps is terribly un-portable, but there's no portable
:alternitive. :-(
I don't know how to fix your stem problem, but here's osmething
I once wrote, long long ago.
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
# pt.pl
# pt.1
# README
# Makefile
# Configure
# Test
# Install
# This archive created: Thu Jul 2 12:44:40 1992
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'pt.pl'
then
echo shar: "will not over-write existing file 'pt.pl'"
else
cat << \SHAR_EOF > 'pt.pl'
#
# pt -- print process tree
# Tom Christiansen <tchrist@convex.com>
# version 1.0, Tuesday Jun 30 18:29:49 CDT 1992
#
# Modification History
# version 1.1, Wed Jul 1 14:58:54 CDT 1992
# Chop long lines to winsize unless -w supplied
# Add -a for all procs irrespective of platform
# Changed parse bailout to warning
# Added Configure script
# Numerous hacks to deal with various braindead
# vendors garbled ps output
#
#
# run ps and display process hierarchy indented
# under parents.
#
# Options:
# [-l level] limits level of children printed
# [-i indent] change indent level from default
# [-w] allow lines to be as long as you want.
#
#
# don't use require so that it runs on ancient versions of perl
# require 'getopts.pl';
$file = 'getopts.pl';
$return = do $file;
die "couldn't parse $file: $@" if $@;
die "couldn't do $file: $!" unless defined $return;
die "couldn't run $file" unless $return;
$VERSION = '1.1';
$AUTHOR = 'tchrist@convex.com';
$| = 1;
#$$# $PS = "ps"; # a path to ps, usually /bin
#$$# $TIOCGWINSZ = 0x40087468; # should be require sys/ioctl.ph
#$$# $DEATH_STAR = 0; # ARGS: ps -el, not ps wwaxl
#$$# $FLAG_WIDTH = 7;
#$$# $FIRST_SPLIT = '^(\s*[\da-fA-F]+)\s*([\-\d]+)\s+(\d+)\s+(\d+)';
die "Didn't you run Configure?"
unless 4 == grep(defined,$PS,$TIOCGWINSZ,$DEATH_STAR,$FLAG_WIDTH);
$indent = 2; # reset via -i switch
$debug = 0;
########################################################
if ($DEATH_STAR) {
$PS_ARGS = "-l";
$EVERYBODY = "e";
} else {
$PS_ARGS = "xlww";
$EVERYBODY = "a";
}
########################################################
$maxlevel = 10_000_000; # reset via -l switch
sub usage {
local($msg) = shift;
print STDERR "$0: $msg\n" if $msg;
die <<EOF;
usage: $0 [-a] [-d] [-w] [ps args] [pid list]
(version: $VERSION author: $AUTHOR)
-w wide output (don't trunc at winsize)
-a all processes, not just mine
-d print out debugging information
EOF
}
&Getopts('dl:i:wa') || &usage();
$maxlevel = $opt_l if $opt_l;
$indent = $opt_i if $opt_i;
$wide = $opt_w;
$debug = $opt_d;
while (defined($_ = shift)) { # curse pid 0
if (/^(\d+)$/) {
$pids{$1}++;
$pids++; # needed for ancient perl, who can't do if %pids
} else {
$PS_ARGS .= "$_ ";
}
}
$wide || &getwin;
$PS_ARGS =~ s/^(-?)/${1}${EVERYBODY}/ if $pids || $opt_a;
$ps = "$PS $PS_ARGS";
print "opening pipe to $ps\n" if $debug;
open(PS, "$ps |") || die "can't fork: $!";
<PS>; # header
printf("%-8s %5s %8s %7s %s\n", 'USER', "PID", "TTY", "TIME","COMMAND");
while (<PS>) {
($flags, $uid, $pid, $ppid) = /$FIRST_SPLIT/o;
($tty, $time, $secs, $command) = /(\S+)\s*(\d+:\d+(\.\d\d)?)\s+(.*)/;
unless (grep(defined,$uid,$pid,$ppid,$tty,$time,$command) == 6) {
warn "skipping unparsable line from ps:\n$_";
$oops++;
next;
}
if ($debug) {
print <<EOF;
flags are <$flags>, uid is <$uid>, pid is <$pid>, ppid is <$ppid>
tty is <$tty>, time is <$time>, command is <$command>
EOF
}
# incredibly disgusting hack should FLAGS and UID collide
# why oh why must vendors be so damn sysadmin-hostile?
# don't they understand we have to parse this stuff??
# maybe should try $flags =~ /^\s/ here as well?
# i give no guarantees that this works.
if (!$DEATH_STAR && length($flags) > $FLAG_WIDTH &&
(($ppid == 0 && $pid > 10 && $uid)
||
length($flags) > 2+$FLAG_WIDTH))
{
print "hack 1\n" if $debug;
$ppid = $pid;
$pid = $uid;
$uid = substr($flags,
$FLAG_WIDTH + 1 - (substr($flags,0,1) eq ' ' ||
length($flags > $FLAG_WIDTH + 2)),
10);
substr($flags, -length($uid), 10) = '';
# hold on to your lunch, folks...
if (!defined $id{$uid}) {
$extra = substr($flags,-1,1);
$uid = $extra . $uid if defined $id{$extra.$uid};
}
}
# stupid hack should PPID and CP collide
if ($ppid > 32_000 && $pid < 32_000) {
print "hack 2\n" if $debug;
$ppid = substr($ppid,0,length($pid));
}
# stupid hack should TT and TIME collide
if (length($tty) > 2 && $tty =~ /:/) {
print "hack 3\n" if $debug;
$time = substr($tty, 2, 10) . $time;
$tty = substr($tty,0,2);
}
$lines{$pid} = sprintf("%-8s %5d %8s %7s#%s\n",
&id($uid), $pid, $tty, $time, $command);
unless ($pid == $ppid) {
$parent{$pid} = $ppid;
$children{$ppid} .= "$pid ";
}
}
if (!close(PS)) {
warn "\"$ps\" exited badly!\n";
$oops++;
}
@pids = keys %pids;
if (@pids) {
foreach $pid (@pids) {
&save_the_children($pid);
&save_our_parent($pid);
}
%lines = %nlines;
}
sub bynum { $a - $b; }
# find the heads of the chains...
@pids = grep(!defined $lines{$parent{$_}},keys %lines);
for $pid (sort bynum @pids) {
&children($pid);
}
exit($oops != 0);
sub children {
local($pid) = $_[0];
local($_) = $lines{$pid};
substr($_, index($_, '#'), 1) = ' ' x (1+ $indent * $level);
if (!$wide && length() > $cols) {
substr($_, $cols, 10_000) = "\n";
}
print;
if ($level++ < $maxlevel) {
local(@kids) = split(' ',$children{$pid});
for $pid (@kids) {
&children($pid);
}
}
$level--;
}
sub id {
local($id) = shift;
$id{$id} = (getpwuid($id))[0] || "($id)" unless defined $id{$id};
$id{$id};
}
sub save_the_children {
local($parent) = shift;
foreach $kid (split(' ',$children{$parent})) {
&save_the_children($kid);
}
&keepline($parent);
}
sub save_our_parent {
local($kid) = shift;
local($dad) = $parent{$kid};
&keepline($kid);
if ($dad || $dad eq '0') { # beware $dad == 0
&save_our_parent($dad);
}
}
sub keepline {
$nlines{$_[0]} = $lines{$_[0]}
unless defined $nlines{$_[0]};
}
sub getwin {
local($winsize);
# is someone can get SS_DC_TIOCSWINSZ on MIPS working, tell me
if ($TIOCGWINSZ && ioctl(STDERR, $TIOCGWINSZ, $winsize)) {
($rows, $cols) = unpack('S4', $winsize);
} else {
$cols = $ENV{'COLUMNS'} || ($ENV{'TERMCAP'} =~ /:co#(\d+):/)[0];
}
$cols = 80 unless $cols;
print "cols are $cols\n" if $debug;
}
SHAR_EOF
fi
if test -f 'pt.1'
then
echo shar: "will not over-write existing file 'pt.1'"
else
cat << \SHAR_EOF > 'pt.1'
.TH PT 1L local
.de M \" man page reference
\\fI\\$1\\fR\\|(\\$2\)\\$3
..
.de T \" switch to typewriter font
.ft TA \" probably want CW if you don't have TA font
..
.\"
.de TY \" put $1 in typewriter font
.if t .T
.if n ``\c
\\$1\c
.if t .ft P
.if n \&''\c
\\$2
..
.SH NAME
pt \- postprocess ps output into hierarchical form
.SH SYNOPSIS
.B pt
[
.B \-a
]
[
.B \-w
]
[
.I "ps args"
]
[
.I "pid list"
]
.SH "DESCRIPTION"
The
.I pt
program is a
.I perl
front end to
.I ps
that
displays a
.I ps
listing with processes arranged in a tree format. That is,
processes are listed under their parents, indented to the right.
.PP
For example:
.sp
.nf
.na
USER PID TTY TIME COMMAND
tchrist 9341 p3 1:02 -tcsh
tchrist 10423 p3 0:11 vi pt.pl
tchrist 27045 p3 0:00 vi pt
tchrist 28371 p3 0:04 trn
tchrist 29366 p3 0:00 /bin/sh -c Pnews -h /mnt/tchris
tchrist 29367 p3 0:00 sh /usr/local/bin/Pnews -h /m
tchrist 29394 p3 0:00 perl sigspell
tchrist 29395 p3 0:00 vi /mnt/tchrist/.article
tchrist 29080 p3 0:01 vi pt.1
tchrist 29831 p3 0:00 sh -c ./pt
tchrist 29833 p3 0:00 perl ./pt
tchrist 29834 p3 0:00 /bin/ps xlww
tchrist 9361 p3 0:08 monthd -i5
tchrist 9500 pb 0:30 -tcsh
tchrist 23345 pb 0:18 perl plum
tchrist 29726 pb 0:00 perl now-what
tchrist 29729 pb 0:00 perl sigspell
tchrist 29734 pb 0:00 vi /mnt/tchrist/Mail/drafts
tchrist 9522 p3 23:59 perl newsclip 07/02/92 09:15
tchrist 9527 p3 0:07 perl pmeter
tchrist 19660 q9 0:47 perl sigrand
.fi
.ad
.PP
The first listed process is the shell, and all those
indented under it are its direct children.
Thus
.I
Pnews is a child of
.IR trn ,
which itself has several children of its own.
.PP
Normally,
.I pt
will truncate at the width of your screen. The
.B \-w
option will allow output as wide as
.I ps
returns.
.PP
To list all processes, use the
.B \-a
option, even if your system expects to pass
.I ps
something other than an
.B a
flag;
.I pt
should know to pass the appropriate flag to ps.
.PP
You can also pass
.I pt
a list of pids to restrict output to those process
trees contains those pids. Any processes below the named
pids will be listed in full. Those above will be listed
only if they are direct ancestors. For example (reading
this output in from the editor):
.sp
.nf
.na
:r!pt $$
USER PID TTY TIME COMMAND
root 0 ? 0:00 swapout
root 1 ? 1:53 init
root 9339 ? 8:26 xterm -display 130.168.190.14:0
tchrist 9341 p3 1:02 -tcsh
tchrist 29080 p3 0:05 vi pt.1
tchrist 731 p3 0:00 sh -c ./pt $$
tchrist 732 p3 0:00 perl ./pt 731
tchrist 733 p3 0:02 /bin/ps axlww
.fi
.ad
.sp
This allows you to trace both parents and children of a given process.
.SH "RETURN VALUE"
.I pt
will exit with a value of 1
if it encounteres difficulty parsing the output of
.I ps
or if
.I ps
should itself exit non-zero.
.SH ENVIRONMENT
In order to truncate at your current window size,
.I pt
will use the
.B TIOCGWINSZ
.I ioctl(2)
if supported on your system. Otherwise, it consults
your environment for either a
.B COLUMNS
variable, or else checks your current
.B TERMCAP
variable for a
.B ":co:"
entry.
.SH "FILES"
getopts.pl\h'|2i'perl getopts library
.SH "SEE ALSO"
.M ps 1 ,
.M pstat 1 ,
.M perl 1 .
.SH NOTES
The
.I pt
distribution
comes with a
.I Makefile
and a
.I Configure
script that should be used to properly select what
form of
.I ps
you're using, paths, etc.
.SH DIAGNOSTICS
.TY "skipping unparsable line from ps:\en%s"
.in +5n
.br
This means that
.I ps
output a line which
.I pt
couldn't make heads or tails of (probably tails).
.in -5n
.sp
.TY "ps exited badly!"
.in +5n
.I ps
returned a non-zero exit status.
.in -5n
.sp
.TY "couldn't parse getopts.pl: %s"
.br
.TY "couldn't do getopts.pl: %s"
.br
.TY "couldn't run getopts.pl: %s"
.br
.in +5n
All these mean the getopts library couldn't be loaded.
An appropriate message should be printed.
.sp
.in -5n
.TY "Didn't you run Configure?"
.in +5n
You are running a raw version of
.I pt
that hasn't been configured yet.
.sp
.in -5n
.TY "can't fork: %s at line %d of pt"
.in +5n
.I pt
was unable to fork a child of itself
to run
.I ps
with.
.br
.in -5n
.SH BUGS
.I pt
is at the mercy of your
.I ps
command, and it would appear that very few vendors
make any effort to produce output that can be parsed
by humans or computers.
.I pt
therefore undergoes numerous convolutions to try to
demangle braindead
.I ps
output.
It is not always successful. File a bug report with
your vendor is your
.I ps
fields ever run together \(em it's a real pain.
.PP
The
.B \-d
option prints out debugging information which may
help you diagnose difficulties you may be encountering.
.SH AUTHOR
Tom Christiansen <tchrist@convex.com>,
July 2nd, 1992.
SHAR_EOF
fi
if test -f 'README'
then
echo shar: "will not over-write existing file 'README'"
else
cat << \SHAR_EOF > 'README'
This really ought to work right out of the box now.
Unshar, type 'make test' and watch. If that works,
go for 'make install'.
The Configure script should be smarter now, but I've
introduced a lot of gratuitous hacks because most
vendors, especially the ones with the workstations on
our desks.
If this DOESN'T work for you, please tell me the
following things:
type of hardware
operating system version
perl version
ps axlww or ps -aefl output
--tom
SHAR_EOF
fi
if test -f 'Makefile'
then
echo shar: "will not over-write existing file 'Makefile'"
else
cat << \SHAR_EOF > 'Makefile'
BIN=/usr/local/bin
MAN=/usr/local/man/man1
PROG=pt
# it's really rude, but if i don't say this, it
# assumes your current shell on some systems.
# how brain dead can you get?
SHELL=/bin/sh
${PROG}: ${PROG}.pl Configure
@perl Configure < ${PROG}.pl > test${PROG}
@mv test${PROG} ${PROG}
@chmod +x ${PROG}
test: ${PROG}
@perl Test
install: test
perl Install ${MAN} ${BIN}
clean:
rm -f ${PROG} core test getwin.c a.out
shar:
shar pt.pl pt.1 README Makefile Configure Test Install > pt.shar
SHAR_EOF
fi
if test -f 'Configure'
then
echo shar: "will not over-write existing file 'Configure'"
else
cat << \SHAR_EOF > 'Configure'
$STD_PERL = '/usr/bin/perl';
select(STDERR);
print "Configuring pt...\n\n";
sub findpath {
local($path);
local($arg) = shift;
for $dir (split(/:/,$ENV{'PATH'})) {
if (-x "$dir/$arg" && -f _) {
$path = "$dir/$arg";
last;
}
}
$path;
}
&getperl();
if ($path = &findpath('ps')) {
$PS = $path;
print "Your ps lives in $path.\n";
} else {
die "You don't have a ps on this system, bailing out";
}
$DEATH_STAR = 0;
$FLAG_WIDTH = 0;
$_ = `$PS l1 2>/dev/null`;
if ($?) {
# maybe system V
$_ = `$PS -ef -p 1 2>/dev/null`;
if ($? == 0) {
$DEATH_STAR = 1;
print "You have a SysV-style ps; this may be boring.\n";
} else {
print "Your ps doesn't like either BSD or SysV syntax!\n";
}
} else {
print "Congratulations, your ps groks BSD syntax.\n";
if (/^\s*F/) {
if (!/\n(\s*[a-f\d]+)/) {
print "No flag width -- assuming 7\n";
$FLAG_WIDTH = 7;
} else {
$FLAG_WIDTH = length($1);
print "Your ps flags width appears to be $FLAG_WIDTH.\n";
if (/F\s+S\s+UID/) {
print "Your ps interposes STAT between FLAGS and UID\n";
$early_stat++;
}
}
} else {
# bsd 4.4?
print <<EOF;
But you have no ps flags; don't worry, you're
proabably better off that way.
EOF
}
}
$FIRST_SPLIT = $DEATH_STAR # cursed be
? '^\s*([\da-fA-F]+)\s+\S+\s+([\-\d]+)\s+(\d+)\s+(\d+)'
: $FLAG_WIDTH
? $early_stat
? '^(\s*[\da-fA-F]+)\s*\w+\s*([\-\d]+)\s+(\d+)\s+(\d+)'
: '^(\s*[\da-fA-F]+)\s*([\-\d]+)\s+(\d+)\s+(\d+)'
: '^(\s*)([\da-fA-F]+)\s*([\-\d]+)\s+(\d+)\s+(\d+)';
print "\n";
$PROG = 'getwin.c';
open(PROG, ">$PROG") || die "can't creat $PROG: $!";
print PROG <<'EOF';
#include <sys/ioctl.h>
main() { printf("0x%08x\n", TIOCGWINSZ); }
EOF
close(PROG) || die "can't close $PROG: $!";
unless ($CC_PATH = &findpath('cc')) {
print "No C compiler found, trying gcc\n";
if ($CC_PATH = &getpath('gcc')) {
print "What luck -- you have a gcc\n";
} else {
print "SNAFU: No C compiler -- guessing TIOCGWINSZ is 0x40087468\n";
$TIOCGWINSZ = 0x40087468;
if (ioctl(STDERR, $TIOCGWINSZ, $winsize)) {
($rows, $cols) = unpack('S4', $winsize);
if ($cols > 20 && $cols < 200) {
print "Ok, TIOCGWINSZ seems ok as 0x40087468\n";
$TIOCGWINSZ = '0x40087468';
} else {
print "TIOCGWINSZ doesn't seem to work, will grope environment\n";
}
}
}
} else {
print "Your C compiler lives in $CC_PATH.\n";
print "Testing for window-size awareness...";
if (system("$CC_PATH getwin.c >/dev/null 2>&1") == 0) {
print "done.\n";
chop($TIOCGWINSZ = `./a.out`);
print "Great -- your TIOCGWINSZ is $TIOCGWINSZ.\n";;
} else {
print "oops!\n";
print "Bummer -- you have no TIOCGWINSZ!\n";
$TIOCGWINSZ = 0;
}
unlink('a.out', $PROG);
}
select(STDOUT);
while (<>) {
if (s/#\$\$#\s*//) {
s/TIOCGWINSZ\s*=[^;]*/TIOCGWINSZ = $TIOCGWINSZ/o
||
s/PS\s*=\s*\"[^"]*"/PS = "$PS"/o
||
s/DEATH_STAR\s*=[^;]*/DEATH_STAR = $DEATH_STAR/o
||
s/FLAG_WIDTH\s*=[^;]*/FLAG_WIDTH = $FLAG_WIDTH/o
||
s/FIRST_SPLIT\s*=[^;]*/FIRST_SPLIT = '$FIRST_SPLIT'/o
;
}
print;
}
close(STDOUT) || die "can't close STDOUT: $!";
print STDERR "\nDone with Configure.\n\n";
exit;
sub getperl {
if (-e $STD_PERL && -f _ && -x _) { # stat, !lstat
print <<EOF;
Good, I see that perl lives in the standard place ($STD_PERL)
EOF
print "How 'bout I use that one, ok? [y] ";
open(TTY, "</dev/tty") || die "can't open /dev/tty: $!";
if (<TTY> !~ /^\s*n/i) {
print STDOUT "#!$STD_PERL\n";
print "\n";
return;
}
print "Ok, fine, let's grope about your system then...\n";
} else {
$whine++;
}
if ($path = &findpath('perl')) {
print "Your perl lives in $path.\n";
print STDOUT "#!$path\n";
$whine && print <<EOF;
You know, life would be easier if you just made $STD_PERL
a symlink to where it where it really lives.
EOF
} else {
print <<EOF;
What, no perl on your system? Then just who is running this script?
Ok, we'll configure up your script so it tries to find whatever perl is
in the user's path, something you don't seem to have.
EOF
print STDOUT <<'EOF';
#!/bin/sh -- # wish we had a perl
eval "exec perl -S $0 $*"
if $running_under_some_shell;
EOF
}
print "\n";
}
SHAR_EOF
fi
if test -f 'Test'
then
echo shar: "will not over-write existing file 'Test'"
else
cat << \SHAR_EOF > 'Test'
$user = (getpwuid($>))[0];
$PT = './pt';
$| = 1;
print <<EOF;
Running tests for pt..
Should anything fail, this make will abort.
if it doesn't look right, just hit ^C.
EOF
&cr;
print "First, I'll run pt on just your processes:\n\n";
&run($PT);
while(<PT>) {
print;
&test1;
}
&ran;
&result1;
&cr;
print <<EOF;
Ok, next test: run pt on just this process, tracing back to the root:
EOF
&run ("$PT $$");
while (<PT>) {
print;
&test2;
}
&ran;
&result2;
&cr;
print "\nNow for all processes:\n\n";
&run("$PT -a");
$init = $sawme = $warned = $sawpt = 0;
while (<PT>) {
print;
&test3;
}
&ran;
&result3;
system("touch ./test") && die "can't touch \"test\" semaphore file: $!";
print "\nLooks good, now go for the install!\n";
sub run {
$Args = shift;
print "$ $Args\n";
open(PT, "$Args |") || die "couldn't fork: $!";
}
sub ran {
die "\"$Args\" exited badly: $!" unless close(PT);
}
sub cr {
print "\nHit <CR> to continue, ^C to abort: ";
<STDIN>;
print "\n";
}
sub more {
print "$_[0]; continue? [n] ";
exit 1 unless <STDIN> =~ /^\s*y/i;
}
sub test1 {
$sawpt += /pt/;
$sawme += /\b$user\b/i;
if (/^\(\d+\)/ && !$warned++) {
@pw = getpwuid($1);
if ($pw[0]) {
&more("Hmmm, uid $1 didn't convert to $pw[0]");
} else {
print "Oops, you don't have a uid $1 here\n";
&more("Maybe the ps line is mangled;");
}
}
}
sub test2 {
$init += /^\w+\s+1\b.+\binit\b/;
}
sub result1 {
&more("Your uid should have appeared here") unless $sawme;
&more("The pt program should have appeared here") unless $sawpt;
}
sub result2 {
&more("Didn't see init (process 1)") unless $init;
&more("Saw init $init times") if $init > 1;
}
sub test3 {
&test1;
&test2;
}
sub result3 {
&result1;
&result2;
}
SHAR_EOF
fi
if test -f 'Install'
then
echo shar: "will not over-write existing file 'Install'"
else
cat << \SHAR_EOF > 'Install'
($defman, $defbin) = @ARGV;
$mdir = &finddir($defman,
'/usr/local/man/man1', '/usr/man/local/man1',
'/usr/man/man.L', '/usr/man/manl',
'/usr/man/mann', '/usr/man/u_man/man1', '/usr/man/man1'
);
print "\nWhat directory would you like your man page in?\n\t[$mdir] ";
chop($dir = <STDIN>);
$dir = $mdir if $dir =~ /^\s*$/;
if (-d $dir) {
($suffix) = ($dir =~ m#man([^/]+$)#);
$mpage = "$dir/pt.$suffix";
} else {
die "$dir: not a directory";
}
&run("cp pt.1 $mpage");
$bin = &finddir($defbin, '/usr/local/scripts', '/usr/local/bin',
split(':', $ENV{'PATH'}));
print "\nWhat directory would you like your script in?\n\t[$bin] ";
chop($hisbin = <STDIN>);
$bin = $hisbin unless $hisbin eq '';
chmod (0755, 'pt');
&run("cp pt $bin");
sub finddir {
for $dir (@_) {
next if $dir eq '';
return $dir if -d $dir;
}
'';
}
sub run {
local($cmd) = shift;
print "\n$ $cmd\n";
system($cmd) && die;
}
SHAR_EOF
fi
exit 0
# End of shell archive
--
The default arguments to sendmail (which you can change) are:
-oi Do NOT treat a single "." on a line as a message terminator.
As in, "-oi vey, it truncated my message... why?!"
-- from the MIME::Lite Perl Module documentation
------------------------------
Date: 22 Jun 1999 17:39:43 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Program
Message-Id: <37701ebf@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
This one was somewhat fun as well. I don't pretend that it's portable.
--tom
#!/usr/bin/perl -w
# ps tree printer for linux
# tchrist@perl.com
# 9 October 1997
use strict;
my $PROCDIR = "/proc";
my %Pidinfo;
fetch_proc_info();
visit(1);
exit;
###############
sub fetch_proc_info {
chdir $PROCDIR || die "can't cd to $PROCDIR: $!";
opendir(PROC, ".") || die "can't opendir . ($PROCDIR): $!";
my $pid;
while ( defined($pid = readdir(PROC))) {
next unless $pid =~ /^\d+$/;
my $statfile = "$PROCDIR/$pid/status";
unless (open(STATUS, $statfile)) {
warn "can't open $statfile: $!";
next;
}
while (<STATUS>) {
next unless /^([^:]+):\s*(.*)$/;
$Pidinfo{$pid}{$1} = first($2);
push @{$Pidinfo{$2}{child_procs}}, $pid if $1 eq 'PPid';
}
}
}
BEGIN {
# static vars for &visit
my $Depth = 0;
sub visit {
my $pid = shift;
printf "%-8s %5d %6s %1s %s%s\n",
&uid($Pidinfo{$pid}{Uid}),
$pid, $Pidinfo{$pid}{VmRSS} || 0,
$Pidinfo{$pid}{State},
" " x $Depth,
&cmdline($pid);
return unless $Pidinfo{$pid}{child_procs};
$Depth++;
for my $kid ( @{$Pidinfo{$pid}{child_procs}} ) { visit($kid) }
--$Depth;
}
}
BEGIN {
# static vars for &uid
my %uidcache;
sub uid {
my $uid = shift;
unless (defined $uidcache{$uid}) {
$uidcache{$uid} = getpwuid($uid) || "#$uid";
}
return $uidcache{$uid};
}
}
sub cmdline {
my $pid = shift;
my $cmdfile = "$PROCDIR/$pid/cmdline";
my $line;
unless ( open(CMD, $cmdfile) ) {
warn "can't read $cmdfile: $!";
} else {
if (defined($line = <CMD>)) {
$line =~ s/[\s\0]+$//;
$line =~ s/\0/ /g;
}
close CMD;
}
if (!defined $line) {
$line = $Pidinfo{$pid}{Name} || "[NONE]";
$line = "($line)";
}
return $line;
}
sub first {
return '' unless defined $_[0];
my $word = '';
$word = (split ' ', $_[0])[0] ;
return $word;
}
--
I use `batshit' in an idiosyncratic fashion. --Andrew Hume
------------------------------
Date: Tue, 22 Jun 1999 23:09:05 GMT
From: Rick Johnson <firespring@nfx.net>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: perlcc code compiles but won't run: WHY????
Message-Id: <37701854.B1504585@nfx.net>
Hello PERL experts,
I've spent three days looking through online documents and I can't
find anything that even gives me a clue as to how to solve my Perl
problem. Can someone PLEASE help, or at least tell me the best place
to look (yes, I've been all through CPAN).
Specifically, my problem is this:
I just started attempting to use perlcc with Redhat Linux 5.2 on an
Intel platform (Pentium 133). My perl code seems to compile okay using
perlcc, but it won't run. What is SEEMS to be choking on is
subroutine calls, even though it tells me the syntax of my code
was okay during the compile phase. What I get when I run my code
is a "segmentation fault" and a core dump. Note: I am NOT using any
modules and I have tested the problem by using a simple program which
does nothing except call a subroutine which prints "hello world".
If I had written this in fortran, I would think this is some kind of
link error, but Perl doesn't link, does it?
HELP PLEASE!
Rick Johnson
firespring@nfx.net
------------------------------
Date: Tue, 22 Jun 1999 16:41:28 -0700
From: Michael Peppler <mpeppler@peppler.org>
Subject: Re: Sybperl bcp initialization
Message-Id: <37701F28.456AE8CD@peppler.org>
jerbyr@my-deja.com wrote:
>
> I am having a problem using the bulk copy procedures in sybperl. When I
> attempt to initialize the bcp, I get an error stating that 'the front
> end you are using does not support bulk insert from host...'.
You need to call
BCP_SETL(TRUE);
*before* opening the connection on which you're going to do the bcp operation.
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
------------------------------
Date: Tue, 22 Jun 1999 16:09:58 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: time question
Message-Id: <MPG.11d9b7a4b52d3877989c28@nntp.hpl.hp.com>
In article <7kp27v$99k$1@coranto.ucs.mun.ca> on 22 Jun 1999 22:20:47
GMT, Paul David Fardy <pdf@morgan.ucs.mun.ca> says...
...
> srishti <srishti@vsnl.com> writes:
> > You do not need to extract it from localtime, use time instead. It will
> > give you number of seconds since 01-01-1970.
>
> Ack! What sort of notation is that? Do you ever sort by time?
> Is it painful? :-)
>
> Actually, time() gives me the number of seconds since 1969-12-31.
Wrong. It is the number of seconds since 1970-01-01 00:00:00 UTC,
taking no account of leap seconds (which means it is actually the number
of seconds since about 1970-01-01 00:00:29 TIA, but let's not get too
far into that now :-).
Note also that the times() function gives information about CPU time
used, rather than elapsed (wallclock) time.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 22 Jun 1999 16:19:11 -0700
From: Shane Fisher <fishers@lister.acm.wwu.edu>
To: Dave Cross <dave@dave.org.uk>
Subject: Re: What is First line in Perl5 in Sun Micro...
Message-Id: <Pine.BSF.4.05.9906221618120.7290-100000@lister.acm.wwu.edu>
On Mon, 21 Jun 1999, Dave Cross wrote:
> On 21 Jun 1999 18:05:59 GMT, saic@shirdi.corp.sun.com (Sai Chimakurty)
> wrote:
>
> > I have a Perl5 script. I have in the first line
> > #!/usr/dist/exe/perl5 -w. But it doesn't seem to work. Can any
> > one help me in telling me the right path of putting in the
> > first line for perl5 program.
>
> It really depends where Perl has been installed on your system. It's
> impossible for anyone here to know. Best you ask your system
> administrator.
>
Try typing "which perl5" or "which perl"
I apologize if this has already been answered.
Regards,
Shane
=========================================================================
Shane M. Fisher
CS Major, Western Washington University
E-Mail: fishers@acm.wwu.edu, smfisher@gte.net
Web: http://www.acm.wwu.edu/fishers
=========================================================================
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 6100
**************************************