[8799] in Perl-Users-Digest
Perl-Users Digest, Issue: 2416 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 25 01:07:19 1998
Date: Fri, 24 Apr 98 22:00:31 -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 Fri, 24 Apr 1998 Volume: 8 Number: 2416
Today's topics:
Berkeley DB support (Jim Levie)
Re: Best way to prompt for input? (Craig Berry)
Re: Best way to prompt for input? (Xuming Wang)
Check this CGI Chatter <wt98@dds.nl>
Re: Defending Perl <tchrist@mox.perl.com>
Re: Defending Perl (Ilya Zakharevich)
Re: foreach question (Gilly (kEQNql))
Having trouble feeding an array into the keys of a hash npolonsk@hotmail.com
Re: Having trouble feeding an array into the keys of a <ebohlman@netcom.com>
HELP!! Very Strange - Sprite.pm problem accessing datab <abrinson@indiana.edu>
Re: help <perlguy@technologist.com>
Re: How to read command line literally? <tchrist@mox.perl.com>
Re: Just a thought... <tchrist@mox.perl.com>
Re: Just a thought... <tchrist@mox.perl.com>
Re: Just a thought... <uri@sysarch.com>
Re: matching man page lines <rjk@coos.dartmouth.edu>
Re: module usage (Andrew M. Langmead)
Multiple forms data collation <phil_shankland@credo.shef.ac.uk>
Perl script as NT service? <jtlawson+bulk@emba.uvm.edu>
Re: Perl V4.00 (Joe Myers)
Please stop and help. <jasonh@eicp.com>
Problems building 5.004_04 GDBM_File - help? <dvk@lonewolf.com>
Re: Remote Process Monitoring reboot@tir.com
Re: RMS should be invited to O'Reilly's "Free Software heller@nacs.net
skipping ahead in a foreach loop empires@ivillage.com
Re: skipping ahead in a foreach loop (Charles DeRykus)
Re: skipping ahead in a foreach loop <rick.delaney@shaw.wave.ca>
use IPC::Open2; works on command line, but not CGI (Craig Simpson)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 25 Apr 1998 03:43:55 GMT
From: Jim.Levie@dynetics.com (Jim Levie)
Subject: Berkeley DB support
Message-Id: <3541576e.464170@newstoo.hiwaay.net>
Where do I find support for Berkely DB 2.x.
There isn't a module listed on CPAN for it, and the only references to
it that I've located so far (www.sleepycat.com) claims that "DB_File
and Berkeley_DB" are only distributed with the standard Perl source
distribution.
I've got perl 5.004_04 and I don't see Berkeley_DB in it anywhere, and
as I would expect DB_File is less than thrilled with the header files
from db-2.3.16.
------------------------------
Date: 24 Apr 1998 23:50:23 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Best way to prompt for input?
Message-Id: <6hr8fv$f0d$1@marina.cinenet.net>
David Lee Lambert (lamber45@EGR.msu.edu) wrote:
: What's the best way to prompt a user for input, then check it? I wrote
: this little test program that doesn't do what I expect:
:
: #!/usr/bin/perl
When you don't understand what's going on, *always* use the -w
switch. The several 'use of unitialized value' errors this
script causes under -w might have given you the clue needed to
solve this.
: print "Enter a word: ";
: <STDIN>; chomp;
<> only magically assigns to $_ in 'while (<>)'; here, the value
is just being thrown away, and $_ is left undefined.
: if (m/^[a-z]+$/) {
: print "Word was $_\n";
: } else {
: print "\'$_\' was not a word, matched \'$1\' instead\n";
No need to escape those single-quotes. Also, there's no capturing
parens in your pattern, and it's also guaranteed to have failed to
match on this branch; that makes two reasons why $1 won't contain
anything relevant here.
: };
HTH!
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Sat, 25 Apr 1998 00:22:36 GMT
From: xuming@NO__SPAM.email.unc.edu (Xuming Wang)
Subject: Re: Best way to prompt for input?
Message-Id: <35412ad0.181152852@152.2.25.74>
David Lee Lambert <lamber45@EGR.msu.edu> wrote:
><STDIN>; chomp;
must be `$_ = <STDIN>;' to assign keyboard input to $_ here.
only when file handle is in loop condition expression, perl assign
scalar value to $_ by default. i.e., `print while <STDIN>;' works.
perldoc perlvar
xuming -- just another Perl beginner
------------------------------
Date: Fri, 24 Apr 1998 23:59:26 +0200
From: "Leroy Kussy" <wt98@dds.nl>
Subject: Check this CGI Chatter
Message-Id: <6hr21c$efi$1@eubuf21.eu.concert.net>
http://wt98.hypermart.net/cgi-bin/chat/login.pl
It's the Best!
Best Regards,
The Sentinel
------------------------------
Date: 24 Apr 1998 21:50:58 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Defending Perl
Message-Id: <6hr1g2$brt$3@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
:Copying files does not create an added value.
:Inverting lines in the file does not create an added value.
:This may be 1% useful for some real computer-related job indeed.
Those would be ad hominem attacks if Perl were a hominid.
I believe you have just conceded defeat. Now please stop
spreading viscious lies about Perl's performance. Or code
up my three tasks and prove me wrong. I dare you.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"The young think they are immortal, and are determined to prove otherwise."
--Larry Wall
------------------------------
Date: 25 Apr 1998 01:02:24 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Defending Perl
Message-Id: <6hrcn0$7q0$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Tom Christiansen
<tchrist@mox.perl.com>],
who wrote in article <6hr1g2$brt$3@csnews.cs.colorado.edu>:
> :Copying files does not create an added value.
> :Inverting lines in the file does not create an added value.
> :This may be 1% useful for some real computer-related job indeed.
>
> Those would be ad hominem attacks if Perl were a hominid.
> I believe you have just conceded defeat.
We all know that you are *quite* capable for better arguments.
> Now please stop
> spreading viscious lies about Perl's performance. Or code
> up my three tasks and prove me wrong. I dare you.
Thanks, I graduated my kindergarden several months ago already.
Ilya
------------------------------
Date: Fri, 24 Apr 1998 22:55:03 GMT
From: mingtian@hanmail.net (Gilly (kEQNql))
Subject: Re: foreach question
Message-Id: <354217df.344324@usenet.kornet.nm.kr>
>you want, but it can be a problem if the resulting list takes
>up an unexpectedly large amount of memory. An alternative is
Thank you, so if @filelist contains 10,000 files(about 10,000 size
of array) then will it be beter to sort before?
">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">
!F 1W4k 3*?!0T4B >pA&3* GQ<[@L 2I@L?4@84O 0q8q1f 59>F3*?@4B !F
"> 594c ?6?!<- H/Hw 9L<RA~0m @V4B 5i2I GQ<[@L?M55 00>F ">
!F H%@Z@V>n >5>5GQ 3*@G 0!=??! Hq8A@; @|GXAV4x 2I !F
">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">!%">
------------------------------
Date: Fri, 24 Apr 1998 18:40:04 -0600
From: npolonsk@hotmail.com
To: npolonsk@hotmail.com
Subject: Having trouble feeding an array into the keys of a hash
Message-Id: <6hr7sm$m60$1@nnrp1.dejanews.com>
Let's say I have an array "@array" with an unspecified number of values. I
want to feed those values into the keys of a hash "%hash" and then set the
values of the hash keys to zero.
The big picture is that I'm reading in a list from a text file. The words get
put into the array and need to be the keys for a hash. However, the amount of
values in the array and hash have to vary with the number of words in the
text file.
Is this enough info? Can anyone help?
---Nathan
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sat, 25 Apr 1998 00:40:08 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Having trouble feeding an array into the keys of a hash
Message-Id: <ebohlmanEry1uw.6rz@netcom.com>
npolonsk@hotmail.com wrote:
: Let's say I have an array "@array" with an unspecified number of values. I
: want to feed those values into the keys of a hash "%hash" and then set the
: values of the hash keys to zero.
Sounds like you want to use a hash slice, whose description is buried
somewhere in the perldata man page:
@hash{@array} = (0) x @array;
------------------------------
Date: Fri, 24 Apr 1998 20:12:33 -0500
From: Anthony Owen Brinson <abrinson@indiana.edu>
Subject: HELP!! Very Strange - Sprite.pm problem accessing database
Message-Id: <35413881.15E2@indiana.edu>
I have a unique situation, where I have a program that will perform a
select on a database, but when I try to issue an update command, it
states that the file doesn't exist.
This uses the same variable name as the select, and the syntax for the
update is copied from the all.pl file from the example that comes with
Sprite 3.2.
Any suggestions would be greatly appreciated.
Here is the select statement that works:
#----------------------------------------------------
sub ViewSelect {
if ($where) {
$where = "where ($where)";
}
$companies = $rdb->sql (<<EOS);
select * from $CompanyDB
$where
EOS
}
#----------------------------------------------------
And here is the update that does not work
#----------------------------------------------------
sub UpdateCompany {
foreach $i (0..$#headers) {
$update = $cgi->param($headers[$i]);
$update =~ s/,/\\,/g;
$update =~ s/@/\\@/g;
$UpdateData = $UpdateData."$headers[$i]=(\"$update\")";
if ($i != $#headers) {
$UpdateData = $UpdateData.",\n";
}
}
print "<B>Update = $UpdateData</B><BR><BR>\n";
my $Email = $update;
print "<B>E-mail = $Email</B><BR><BR>\n";
$rdb->sql (<<EOU) || print"<B>Update failed</B><BR><BR>\n";
update $CompanyDB
set $UpdateData
where (Rep_E-Mail =~ /$Email/)
EOU
}
#----------------------------------------------------
Also here is a select statement that gives the same error as the update
above
#----------------------------------------------------
sub SelectAffNames {
print "DB = $AffDB<BR>\n";
$affnames = $rdb->sql (<<EOS);
select E-mail,Last_Name,First_Name from $AffDB
where (Company_Name =~ /$searchcompany/)
EOS
}
#----------------------------------------------------
The full script and the datafiles used in it are available from
http://bandicoot.cs.indiana.edu:34803/scripts/ima.pl
http://bandicoot.cs.indiana.edu:34803/scripts/affiliates.db
http://bandicoot.cs.indiana.edu:34803/scripts/companies.db
And the script is installed at
http://bandicoot.cs.indiana.edu:34803/im-cgi/ima.pl
Any and all help is greatly appreciated
Please respond to E-mail as well as newsgroup
Thanks,
-Tony
abrinson@indiana.edu
------------------------------
Date: Fri, 24 Apr 1998 21:11:50 -0500
From: Brent Michalski <perlguy@technologist.com>
To: lr@hpl.hp.com
Subject: Re: help
Message-Id: <35414666.586AA33D@technologist.com>
I was thinking that I was probably in error on that one but I didn't
have any of my books handy.
I hope I don't get flamed too bad. :-)
Thanks for setting me straight.
Brent
------------------------------
Date: 24 Apr 1998 21:52:40 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to read command line literally?
Message-Id: <6hr1j8$brt$4@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
tendus@rpi.edu (Saurabh S. Tendulkar) writes:
:I am new to Perl. I want to read the command line literally. For example,
:if I say
:
:perlprog *.txt
:
:ARGV expands into all the .txt files. I want $ARGV[0] = "*.txt". How can
:I do that ?
You call it as
$ perlprog '*.txt'
of course. Any real shell preglobs for you so you don't
have idiotic applications with varying behaviours.
:I preferably dont want to change the command line in any way.
Then you lose. May I interest you in a CP/M system instead?
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Installing unix fixes the [VMS] bug.
-Barry Shein
------------------------------
Date: 24 Apr 1998 21:46:47 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Just a thought...
Message-Id: <6hr187$brt$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"Larry Rosler" <lr@hpl.hp.com> writes:
Thanks for the stealth CC. I really despise those. You made me waste
time on a private reply to something I thought was private, but wasn't.
That sucks. You work for HP -- use real tools, not fleeceware toys.
Now, to the subject: Political correctness is loathesome.
Changing the name of something just because somebody
bitches is so, is so, I dunno, Californian? American?
Whatever it is, it's stoooopid. I won't play that game.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Perl is to sed as C is to assembly language." -me
------------------------------
Date: 24 Apr 1998 21:48:25 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Just a thought...
Message-Id: <6hr1b9$brt$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
Uri Guttman <uri@sysarch.com> writes:
:as a non follower of JC (i'm jewish) i was taught to use BCE and CE,
:Before Common Era and Common Era.
If you're going to change the name, then change the numbers.
Make a new system. Get people to follow it. Until then,
You're just changing the name because it suits someone's notion
of Political Correctness. And PCism sucks, in any form.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
At MIT the server is the unit of invention. --Rob Pike
------------------------------
Date: 24 Apr 1998 18:08:12 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Just a thought...
Message-Id: <x71zumeuur.fsf@sysarch.com>
>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
>> In comp.lang.perl.misc, "Larry Rosler" <lr@hpl.hp.com> writes:
>> :Nowadays, many scholars and others try to divorce the notation
>> from :religious significance by referring to "BCE" (Before the
>> Common Era)
LR> and
>> :"CE" (Common Era).
>>
>> I disbelieve. And considering that the majority of Americans are
>> at least nominally Christian, I don't see this changing.
tom c. sent a similar note to me and posted it but it hasn't gotten to
my server yet.
LR> How does one "disbelieve" a statement which is fact? I chose not
LR> to define "many" but now I'll try. An AltaVista search for "+bce
LR> +ce" returns 3848 documents. The first few results should give
LR> you an idea:
thanx for the search. many others who are not just jewish/atheist/others
don't like to use BC/AD. it is not PC to do so and the terms BCE/CE have
been around far longer than the PC craze. it is more academically and
culturally correct. there are many other calendar systems with different
starting years. the most popular uses JC nominal birth year as 1. we
can agree on the year but not on the notation for that calendar. i
understand and use BC/AD but don't appreciate them. i wish more would
understand and use BCE/CE.
LR> I didn't imply that "this" (BC/AD) would change, whether it should
LR> or not. Americans still refuse to convert to the metric system,
LR> though the rest of the world has.
LR> If by this you mean that only Jews or atheists (I guess -- there
LR> is no Soviet Union) might be sensitive enough to use this
LR> terminology, you are dead wrong, as you can see from the above
LR> citations.
agreed.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---- 8 Years of Perl Experience, Available Immediately
uri@sysarch.com --------- Resume and Perl Example at http://www.sysarch.com
Use the Best Search Engine on the Net -------- http://www.northernlight.com
------------------------------
Date: Sat, 25 Apr 1998 00:25:23 -0400
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
Subject: Re: matching man page lines
Message-Id: <354165B4.F6095C98@coos.dartmouth.edu>
John Erjavec V wrote:
>
> Ronald J Kimball (rjk@coos.dartmouth.edu) wrote:
> :
> : /^\s+(\S.*).+(\1)\s*$/
> :
> : Anyway, that regex will match lines like
> :
> : " foo does weird things if\n"
> :
> : Are you sure that's what you want?
>
> No, not really. What I am trying to do is match lines like:
>
> SYBPERL(1) 26/Mar/98 SYBPERL(1)
>
> and like:
>
> User Contributed Perl Documentation User Contributed Perl Documentation
>
How much variation is there in the strings permissible between the paired
strings? What is the shortest allowable length of one of the paired text strings?
/^\s+(\S.{3,})\s+\S*\s*\1\s*$/
Another thought - there's no need to put the '\1' in parentheses, since it
would just make $2 the same as $1.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J. Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Sat, 25 Apr 1998 04:27:47 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: module usage
Message-Id: <EryCEC.89s@world.std.com>
ehood@medusa.acs.uci.edu (Earl Hood) writes:
> I have never used the directory handle
>module. The *dir() operators are sufficient for me.
One advantage of the DirHandle module is that return value from
DirHandle is a scalar, not some weird _unable_to_access_directly_
thing. I find something that can be put in a lexically local varaible
preferable to dealing with dynamic scoping and typeglobs.
--
Andrew Langmead
------------------------------
Date: Fri, 24 Apr 1998 23:16:02 +0100
From: Phil Shankland <phil_shankland@credo.shef.ac.uk>
Subject: Multiple forms data collation
Message-Id: <35410F22.F391A5F3@credo.shef.ac.uk>
No-one likes filling in long HTML response forms. :-(
Idea: why not split it into multiple POST forms e.g. form1 - name &
address etc; form2 - professional associations etc. Then collate the
output into a single mailto: response.
I know how to do this using perl and cookies to collect the 'NAME' value
of radio buttons but I can't hack it for text and SELECT type data
fields. Similar in concept to a shopping cart where you pick up and
store data from a variety of pages? Ideas welcome. Phil
------------------------------
Date: Fri, 24 Apr 1998 19:37:37 -0400
From: Jim Lawson <jtlawson+bulk@emba.uvm.edu>
Subject: Perl script as NT service?
Message-Id: <35412241.F02A865D@emba.uvm.edu>
Hi,
I've written a small script which opens a socket, listens, and takes SQL
commands - after which it uses ODBC
to talk to the MS SQL server.
It works OK, so I am now trying to get it to run as a service, so that
no one has to be logged in while it is running. Ah,
for the days when I could just put a script in /etc/rc.d/init.d.
I've tried two different tools - srvany, and runexesrv. I didn't have
much success with srvany. Runexesrv works - more or less - but it pops
up a window for the perl script, regardless of who is logged in. Worse,
the service will sometimes die when people log in or out.
Is anyone successful in running a Perl script as an NT service?
When responding, please write me email as well as a followup. I do read
this newsgroup, but I don't entirely trust my
newsfeed at the moment.
If you do respond, remove the +spam from my email. (I love procmail)
--
Jim Lawson 237 Votey Building
EM Computer Facility The University of Vermont
jtlawson+spam@emba.uvm.edu Burlington, VT 05405
------------------------------
Date: Sat, 25 Apr 1998 01:03:50 GMT
From: joe31416@voicenet.com (Joe Myers)
Subject: Re: Perl V4.00
Message-Id: <WDa01.1068$Td1.7555086@news2.voicenet.com>
droby@copyright.com wrote:
>In article <6ho5nm$sme$1@news4.isdnet.net>,
> "philippe l'hostis" <plhostis@hol.fr> wrote:
>>
>> Do someone know where i can find an old version of Perl (4.0036) ??
>>
>> Thank you.
>>
link to 'big' perl4036:
ftp://ftp.cdrom.com/pub/simtelnet/msdos/perl/bperl4x.zip
------------------------------
Date: Fri, 24 Apr 1998 20:50:56 -0500
From: "Jason Hall" <jasonh@eicp.com>
Subject: Please stop and help.
Message-Id: <6hrfas$grf$1@nntp.smartdna.com>
I just had my website hosting company add a cgi-bin directory
to my site and said it is working. The server is unix and I am
running win 95. I do not have telnet access.
My question: How do I compile a perl script on my win95
machine in order to ftp it to the unix server so it will work?
Thanks in advance!
Jason Hall
***** Earn Free Stuff Everyday at *****
**** http://www.earnfreestuff.com *****
------------------------------
Date: Fri, 24 Apr 1998 22:33:29 -0400
From: Dan Klein <dvk@lonewolf.com>
Subject: Problems building 5.004_04 GDBM_File - help?
Message-Id: <35414B23.5A74@lonewolf.com>
I am having some difficulty building 5.004_04 on BSDI 3.1
When I specify that GDBM_File be linked dynamically, it builds fine,
but the lib/gdbm test fails as follows:
lib/gdbm............Bad free() ignored at ../lib/DynaLoader.pm line 166.
Can't load '../lib/auto/GDBM_File/GDBM_File.o' for module GDBM_File:
can't resolve undefined symbols: Inappropriate file type or format at
../lib/DynaLoader.pm line 166.
at lib/gdbm.t line 14
BEGIN failed--compilation aborted at lib/gdbm.t line 14.
dubious
Test returned status 79 (wstat 20224, 0x4f00)
So, when I try building it with GDBM_File being linked statically, the
compilation fails with this error:
Writing Makefile for GDBM_File
Skip ../../lib/GDBM_File.pm (unchanged)
../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp
-noprototypes -typemap ../../lib/ExtUtils/typemap -typemap typemap
GDBM_File.xs >GDBM_File.tc && mv GDBM_File.tc GDBM_File.c
shlicc2 -c -DTWO_POT_OPTIMIZE -DPACK_MALLOC -O2 -DVERSION=\"1.00\"
-DXS_VERSION=\"1.00\" -I../.. GDBM_File.c
rm -rf ../../lib/auto/GDBM_File/GDBM_File.a
ar cr ../../lib/auto/GDBM_File/GDBM_File.a GDBM_File.o &&
/usr/bin/ranlib ../../lib/auto/GDBM_File/GDBM_File.a
chmod 755 ../../lib/auto/GDBM_File/GDBM_File.a
shlicc2 -L/usr/X11/lib -L/usr/local/lib -o perl perlmain.o
lib/auto/DynaLoader/DynaLoader.a lib/auto/GDBM_File/GDBM_File.a
libperl.a `cat ext.libs` -lrpc -lcurses -ltermcap -lXpm -lXaw -lXmu -lXt
-lSM -lICE -lXext -lX11 -lgdbm -ldl -lm -lc
update.o: Undefined symbol ___sF referenced from text segment
*** Error code 1
Stop.
I am stymied. Any suggestions? Further clues are that I build GDBM
from version 1.7.3, and just built libgdbm.a (I didn't know how or even
if I should build a shared library). Any help will be appreciated.
-Dan
------------------------------
Date: Fri, 24 Apr 1998 23:20:34 -0400
From: reboot@tir.com
To: Leslie Mikesell <les@MCS.COM>
Subject: Re: Remote Process Monitoring
Message-Id: <35415682.96912339@tir.com>
Appreciate the help. I'll give it a try.
Leslie Mikesell wrote:
>
> In article <353D2E0C.8FFB940F@sccs.com>, Mike Schlienz <mike@sccs.com> wrote:
> >Does anyone know of a way to monitor processes running on a remote/network
> >server? Thanx in advance for any info.
>
> If you don't mind fairly coarse granularity
> http://strobe.weeg.uiowa.edu/~edhill/public/spong/
> is pretty nice. It maintains a grid of colored dots on
> a web page corresponding to the health of remote services
> and tracks the history of transitions for you.
>
> Les Mikesell
> les@mcs.com
------------------------------
Date: 25 Apr 1998 02:06:35 GMT
From: heller@nacs.net
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <6hrgfb$nlb$1@tracy.nacs.net>
In comp.os.linux.misc Stephen Mubita <smubit1@gl.umbc.edu> wrote:
> I don't understand the GPL very well, but could someone explain these two
> to me:
> Why should all software necessarily be free ?
> If software, then why not over services: note taking, gardening ? Why
> shouldn't everything be free ?
The GPL doesn't say "don't charge money". Rather it says, "don't
keep information hidden".
Essentially, it's against the concept that software is necessarily
"secret intellectual property". And, if we look at it, most of it
isn't. Almost anything that anyone has created, has been "recreated"
in some form or another, even if not exactly the same. . .So, rather
than hide out achievements from one another, share them so that the
world of software development grows faster rather than tries to beat
itself to death.
BTW, go to www.gnu.org to see a definition of their concept. They no
longer use "free", rather it's now "open source".
** Martin
--
http://www.nacs.net/~heller/
http://www.nacs.net/cgi-bin/heller/jokes
Can you imagine having an implant so the government can track you anywhere
you go? It's coming and we're bringing it to you, AT&T.
------------------------------
Date: Fri, 24 Apr 1998 17:36:07 -0600
From: empires@ivillage.com
Subject: skipping ahead in a foreach loop
Message-Id: <6hr44n$isf$1@nnrp1.dejanews.com>
Is there a way, in the context of a foreach loop, to skip ahead an arbitrary
number of elements? For example, if I hit one element of a list, and from
its content decide that I want to skip the next two, is there a way to do
this? It's easy enough to do when using file input as the list, like:
foreach (<FILE>)
because you can just put <FILE> into the loop twice. But I can't figure out
how to do it if there is a list there instead.
Daniel
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 24 Apr 1998 23:55:30 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: skipping ahead in a foreach loop
Message-Id: <ErxzsI.HJv@news.boeing.com>
In article <6hr44n$isf$1@nnrp1.dejanews.com>, <empires@ivillage.com> wrote:
> Is there a way, in the context of a foreach loop, to skip ahead an arbitrary
> number of elements? For example, if I hit one element of a list, and from
> its content decide that I want to skip the next two, is there a way to do
> this? It's easy enough to do when using file input as the list, like:
>
> foreach (<FILE>)
>
> because you can just put <FILE> into the loop twice. But I can't figure out
> how to do it if there is a list there instead.
>
Here's a possibility:
my $skip;
foreach (qw/a b c d e f g/) {
$skip ? ($skip--,next) : (/^c/ and $skip=3);
...
}
HTH,
--
Charles DeRykus
------------------------------
Date: Sat, 25 Apr 1998 01:23:19 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
To: empires@ivillage.com
Subject: Re: skipping ahead in a foreach loop
Message-Id: <35412E5A.F18AEF1@shaw.wave.ca>
empires@ivillage.com wrote:
>
> Is there a way, in the context of a foreach loop, to skip ahead an
> arbitrary number of elements? For example, if I hit one element of a
> list, and from its content decide that I want to skip the next two,
> is there a way to do this?
This'll work:
$skip_ahead = 0;
for (1..9) {
$skip_ahead and $skip_ahead--, next;
$skip_ahead = 2 if /2/;# skip 2 if 2;
print "$_\n";
}
HTH
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Fri, 24 Apr 1998 22:39:16 GMT
From: craigs@3rdstone.net (Craig Simpson)
Subject: use IPC::Open2; works on command line, but not CGI
Message-Id: <35411358.21965745@209.76.252.8>
use IPC::Open2; works on command line, but not CGI
This is part of the script that I have that pgp's my e-mail before
sending it to me via e-mail form my web site.
If I use it on the command line it will work, but it sends an empty
message through cgi. Any ideas? Am I trying to grab the data wrong?
$pid = open2( \*Reader, \*Writer, "pgpe -at -r
craigs\@.3rdstone.net");
Writer->autoflush(); # default here, actually
open(FILE, "crypto2") || die "Error: $!\n";
print Writer <FILE>;
print Writer "\n\nSay Hi to Craig for me !!\n";
close Writer || die "bad spool: $! $?";
open (MAIL, "|$sendmail") || die "couldn't open pipe to $sendmail";
print MAIL "To: craigs\@3rdstone.net\n";
print MAIL "From: craigs\@3rdston.net.com\n";
print MAIL "Subject: PGP Secure Order\n\n";
print MAIL <Reader>;
close(Reader) || die "bad spool: $! $?";
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.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 2416
**************************************