[8166] in Perl-Users-Digest
Perl-Users Digest, Issue: 1784 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 1 21:07:24 1998
Date: Sun, 1 Feb 98 18:00:26 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 1 Feb 1998 Volume: 8 Number: 1784
Today's topics:
Re: A problem using CGI.pm to upload files from unix <bowlin@sirius.com>
Re: can variables be generated on the fly <tchrist@mox.perl.com>
Converting ISO-8859-1 to IBM DOS-ASCII (PC8) <Kari.Marttila.@tietogroup.com>
Re: data format (Tad McClellan)
Deleting directories <davew@ici.net>
Re: Deleting directories (Chip Salzenberg)
difficulty running perl programs over the web (Asia-Net)
Re: difficulty running perl programs over the web <vegardha@ifi.uio.no>
Error with analysis of system () return value on Perl b (Michael Wang)
For the longer term (Was Re: Some possible bugs) Long shaker@netusa1.net
Re: For the longer term (Was Re: Some possible bugs) Lo <ajohnson@gpu.srv.ualberta.ca>
Generating the partitions of a string <dfetter@shell4.ba.best.com>
How do I get IP address of script user? (Martin Oakley)
Re: How do we use a decimal point? <adavid@netinfo.com.au>
Re: How to get at stuff piped into Perl? (Repost) (Devin L. Ganger)
Re: Internet Community needs cgi scripts like it needs (Devin L. Ganger)
Looking for a search script for NT <roseala@erols.com>
LWP problem: Error: 500 Offset outside string <scott_hates_spam@saskatoon.com>
perl and dde in windows NT alison@cs.jcu.edu.au
Re: Public Response to Private Flame (albeit machine-ge (Devin L. Ganger)
Re: ssh plambert$1@plambert.org
Re: Weird error for beginner (Devin L. Ganger)
Re: Win32: Any scripts to shut down all services? (Steve Linberg)
Re: Win32: Any scripts to shut down all services? (Marc Haber)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 01 Feb 1998 16:35:27 -0800
From: Jim Bowlin <bowlin@sirius.com>
To: webmaster@actcom.co.il
Subject: Re: A problem using CGI.pm to upload files from unix
Message-Id: <34D514CF.C7760E6B@sirius.com>
There is a new version of CGI.pm in beta now. It contains many bug fixes.
There should be a link to the site in your CGI.pm source.
I had to fix a few things in CGI.pm to get upload working on an NT.
Did you try the upload demo program? Did that work properly?
-- Jim Bowlin
flafy@actcom.co.il wrote:
>
> I wrote an upload program. The program works fine wehn someone tries to
> upload file from a windows enviroment.The file uploads fine and the
> $filename variable from the CGI.pm module gets the proper value , lets
> say c:\upload\test\test.html But when i try to do the same from linux ,
> $filename gets the value of test.html instead of /upload/test/test.html
> and the upload fails naturally. I tested it and discovered the $filename
> will get the value of the string after the last '/' but if i write
> /upload/test/ it gets the value '(J'. Maybe this can give a clue to
> someone. I suspect that this happens as a result of a CGI.pm bug or maybe
> a netscape bug. If someone has any idea as to the source of the problem
> or a fix for the problem , i will be gratefull
>
> TIA
> R.A
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 2 Feb 1998 00:18:14 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: can variables be generated on the fly
Message-Id: <6b33c6$6v6$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, aml@world.std.com (Andrew M. Langmead) writes:
:Now let me explain why I made the comment. Very often when someone
:here in comp.lang.perl.misc asks about how to create a variable based
:on the contents of another variable, they do so with an example of
:what they are trying to do. (Which really can be helpful when someone
:does. Oh well.) When they give an explanation of what they want done,
:it often seems like an alternate construct will solve their problem
:better.
Very nice. And quite to the point. This should make its
way into the FAQ.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
double value; /* or your money back! */
short changed; /* so triple your money back! */
--Larry Wall in cons.c from the 4.0 perl source code
------------------------------
Date: Thu, 29 Jan 1998 10:02:55 +0200
From: Kari Marttila <Kari.Marttila.@tietogroup.com>
Subject: Converting ISO-8859-1 to IBM DOS-ASCII (PC8)
Message-Id: <34D037AF.5280@tietogroup.com>
Does anybody know if there is a script or a module that knows how to
convert ISO-8859-1 text (I believe this is the character set used in
Windows) to IBM DOS-ASCII (PC8)?
Thanks!
Kari.Marttila@tietogroup.com
------------------------------
Date: Sun, 1 Feb 1998 15:20:51 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: data format
Message-Id: <jvo2b6.563.ln@localhost>
Jahnel Klaus (jahnel@xarch.tu-graz.ac.at) wrote:
: how can i make an output of a simple calcuation like this:
: this is the calculation:
: 100/3=
: the result is 33.33333333333
: i want to have the result like this
: 33.333
: so 3 numbers after the "."
Perl FAQ, part 4:
"Why am I getting long decimals (eg, 19.9499999999999) instead of
the numbers I should be getting (eg, 19.95)?"
: (sorrx for the english to state this problem)
Don't mind the English.
Do mind repeating Frequently Asked Questions though...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 01 Feb 1998 19:06:31 -0500
From: David Wagner <davew@ici.net>
Subject: Deleting directories
Message-Id: <34D50E06.D8A1E43D@ici.net>
I'm trying to delete a directory that has files in it. I have
"Programming Perl", "Learning Perl", "CGI Programming with Perl", and
"Perl for Dummies". Each one has a short statement that simply says Perl
will only delete directories without any files in them. Is there a way?
Or, how can I delete files within a known directory without knowing the
file names. The names will be generated later by users.
I hope I'm not just simply missing something. I'm trying.
Thanks.
--
David Wagner
webmaster@davew.com
------------------------------
Date: Mon, 02 Feb 1998 01:32:50 GMT
From: chip@mail.atlantic.net (Chip Salzenberg)
Subject: Re: Deleting directories
Message-Id: <6b37rb$mrt$1@cyprus.atlantic.net>
According to davew@ici.net:
>I'm trying to delete a directory that has files in it. I have
>"Programming Perl", "Learning Perl", "CGI Programming with Perl", and
>"Perl for Dummies". Each one has a short statement that simply says Perl
>will only delete directories without any files in them. Is there a way?
Perl isn't stopping you, your operating system is.
>Or, how can I delete files within a known directory without knowing the
>file names. The names will be generated later by users.
opendir DIR, $dirname or die "Can't opendir $dirname: $!";
@d = map { "$dirname/$_" } grep { !/^\.\.?$/ } readdir DIR;
closedir DIR;
my $x = unlink @d;
warn (@d-$x)." file(s) in $dirname weren't deleted" unless $x == @d;
Or, more simply and somewhat more dangerously:
@d = <$dirname/*>;
my $x = unlink @d;
warn (@d-$x)." file(s) in $dirname weren't deleted" unless $x == @d;
Or even more simply and more dangerously:
system "rm -f $dirname/*";
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
Like Perl? Want to help out? The Perl Institute: www.perl.org
-> Ask me about Perl training and consulting <-
"It's the lemon zester of death!!" // MST3K
------------------------------
Date: 30 Jan 1998 17:18:40 -0500
From: asia@jhu0048.res.jhu.edu (Asia-Net)
Subject: difficulty running perl programs over the web
Message-Id: <6atjk0$4a8$1@jhu0048.res.jhu.edu>
Hi there...
We can't get perl5 to work the way we think it ought to... probably our lack
of knowledge about the package, but...
We have a perl script called "dev-add.cgi" which runs correctly from the
command line, complete with the extra perl HTML encoding of the output.
The perms & ownership are just like the other (working) CGIs, which are
all either shellscripts or binary executables.However, when we run it over
the web, we get a "server error".
Does anyone have any ideas that might lead to a solution?
Thanks.
Aaron Brick.
------------------------------
Date: 02 Feb 1998 01:27:13 +0100
From: Vegard Hanssen <vegardha@ifi.uio.no>
Subject: Re: difficulty running perl programs over the web
Message-Id: <y9xra5mu9zy.fsf@hindarfjell.ifi.uio.no>
asia@jhu0048.res.jhu.edu (Asia-Net) writes:
> We have a perl script called "dev-add.cgi" which runs correctly from the
> command line, complete with the extra perl HTML encoding of the output.
* First of all, you should check the errorlog.
* Do you open files in the script? In that case permissions could be
wrong.
* Do you have a PERLLIB variable set in the shell which wouldn't be
set on the webserver?
Vegard
------------------------------
Date: 2 Feb 1998 00:25:24 GMT
From: mwang@alhena.ibk.ml.com (Michael Wang)
Subject: Error with analysis of system () return value on Perl book page 230
Message-Id: <6b33pk$6fd$1@news.ml.com>
Hello Perl experts:
I believe the example analyzing the return value of system()
on Perl book page 230 is wrong.
I can use the following example to prove it is wrong:
1. compile the following C program to build a.out
main()
{
int i;
i = 1 / 0;
}
2. perl -e 'system(/path/a.out); print $?;'
And the exit code is 136 = 0x88
3. if you use the perl script on the Perl book page 230 to
analyze the code, then it would print:
ran with non-zero exit status 0
which does not make any sense.
I have return a subroutine to analyze the return by exactly
following wait.h, which attached at the end. For above example,
it will print:
terminated abnormally, signal: 8
and coredumped
which is correct.
BTW, why WEXITSTATUS 255 (return value from the system() call: 0xFF00)
means "the command failed"? It is a C tradition or a specification?
Can you cite me the reference? And I do not really know what the
"process stopped" and "process continued" mean. Does not mean
kill -STOP and kill -CONT? At what conditions it happens?
Thank you very much.
system(/path/a.out);
&EXIT_STATUS($?);
sub EXIT_STATUS {
my $stat = shift;
my $WIFEXITED = ( ($stat&0xFF) == 0 );
my $WEXITSTATUS = ($stat>>8)&0xFF;
my $WIFSIGNALED = ( ($stat&0xFF) > 0 && ($stat&0xFF00) == 0 );
my $WTERMSIG = $stat&0x7F;
my $WCOREDUMP = $stat&0x80;
my $WIFSTOPPED = ( ($stat&0xFF) == 0x7F && ($stat&0xFF00) != 0 );
my $WSTOPSIG = ($stat>>8)&0xFF;
my $WIFCONTINUED = ( ($stat&0xFFFF) == 0xFFFF );
if ($WIFEXITED) {
if ($WEXITSTATUS) {
&writelog ("run with non-zero exit: $WEXITSTATUS");
} else {
&writelog ("run with normal exit: $WEXITSTATUS");
}
} elsif ($WIFSIGNALED) {
&writelog ("terminated abnormally, signal: $WTERMSIG");
if ($WCOREDUMP) {
&writelog ("and coredumped");
}
} elsif ($WIFSTOPPED) {
&writelog ("process stopped, signal: $WSTOPSIG");
} elsif ($WIFCONTINUED) {
&writelog ("process continued");
}
}
------------------------------
Date: Sun, 01 Feb 1998 18:21:16 -0600
From: shaker@netusa1.net
Subject: For the longer term (Was Re: Some possible bugs) Long
Message-Id: <886378808.727646216@dejanews.com>
I would like to raise some 'long-term issues' in this thread, now
that its original intentions have been achieved - ( I have access
to a recent version of perl and a good idea of what good resources
are).
Currently, I program in perl for unix. The long-term direction (not
set by me) is clearly: PC/Windows NT/Visual C++/Microsoft
Foundation Classes.
I chose perl for my current project for the following reasons:
(a) I think that one of the most important 'needs' in programming
is to quickly take a user requirement into working/testable/demons-
tratable code. Everybody wins if this can be achieved. The
programmer gets a tremendous sense of accomplishment. The
user can look at a working program segment and suggest
improvements and changes. [This does not always happen,
considering programming projects, in general. I
have been in programming projects where during the first few
months all that happens is writing of detailed requirements
documents; all that happens next is the writing of detailed
design documents; coding comes next. Usually, requirements
and designs change tremendously during this phase. Also,
people find it difficult to write requirements specifications
and design specifications in a vacuum, being kept away
from coding.] With perl, I can convert mini-requirements into
code quickly, without even hampered by the need to compile.
In other words, it serves well as a prototyping language.
(b) I also would like to write each program as though it is a 'journal
article', with a lot of information in English, with code being only a
part of it. About fifteen years ago, I read somewhere that the most
important purpose of a computer program is the effect it has on the
human reading it - in other words, the effect while running on a machine
is secondary to this. Obviously, this is an extreme statement meant to
make a point. I believe in something like this though. Once a program is
working, I repackage the code, making it more comprehendable. While
still debugging (and figuring out how to get floats to round,
interpreter warnings to go away, the language to do what I want it to
do), making it easy for the person reading the code several months from
now, is the last thing on my mind; I do it after I get the program
working. I find perl very good to write comprehendable programs. My
programs are written in the 'driver' style - main merley performs tests
and calls subroutines; the first few levels of subroutines do likewise;
real language code - the pattern matchings, the splits, etc. are done
in the lowest level subroutines.
(c) Anyday, I prefer a higher level language to a lower level language.
I am wondering how well my above goals can be accomplished in the
Windows NT/ Visual C++/ Microsoft Foundation Classes environment.
(I know something about and love Smalltalk. I know nothing about C++.)
I would think that the people who are the backbone of this newsgroup
would recommend a linux/perl environment. (PC hardware is a given.)
If so, what kind of arguments would be used (to argue for this over the
Windows NT etc.) ?
Regards.
V.Chandrasekhar
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Sun, 01 Feb 1998 19:23:04 -0600
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: For the longer term (Was Re: Some possible bugs) Long
Message-Id: <34D51FF8.6DFBFBE0@gpu.srv.ualberta.ca>
shaker@netusa1.net wrote:
!
[snip]
! (b) I also would like to write each program as though it is a
! 'journal article', with a lot of information in English, with
! code being only a part of it. About fifteen years ago, I read
! somewhere that the most important purpose of a computer program
! is the effect it has on the human reading it - in other words,
! the effect while running on a machine is secondary to this.
! Obviously, this is an extreme statement meant to make a point. I
while perhaps not addressing your main question, I suspect that
what you are referring to here is 'Literate Programming' as
conceived by Donald Knuth:
"Let us change our traditional attitude to the construction
of programs: Instead of imagining that our main task is to
instruct a 'computer' what to do, let us concentrate rather
on explaining to 'humans' what we want the computer to do"
~Donald E Knuth(1984) "Literate Programming"
The Computer Journal(27)2:97-111
Most modern LP tools are based on his WEB system, and in
particular, noweb is a flexible, language independent LP
tool that gives you flexible order of elaboration,
cross-referencing, indexing, and all the power of (La)TeX
for typesetting your source documentation.
If you are interested you can visit the noweb homepage:
http://www.cs.virginia.edu/~nr/noweb/
see the html version of the Literate Programming FAQ:
http://www.ce.ttu.edu/daves/faq.html
or even see the article 'Literate Programming Using Noweb'
in the October 1997 issue of the Linux Journal (co-authored
by yours truly :-)
I use noweb with Perl or C for anything beyond quick-hack
one-off little things---and sometimes those get larger or
more used than anticipated and would have benefitted from
an LP approach as well ;-)
! (c) Anyday, I prefer a higher level language to a lower level
! language.
!
! I am wondering how well my above goals can be accomplished in the
! Windows NT/ Visual C++/ Microsoft Foundation Classes environment.
! (I know something about and love Smalltalk. I know nothing about
! C++.) I would think that the people who are the backbone of this
! newsgroup would recommend a linux/perl environment. (PC hardware
! is a given.) If so, what kind of arguments would be used (to
! argue for this over the Windows NT etc.) ?
Perl is a great language, not only for rapid prototyping; and
Linux is a rock solid development platform, and they're free!---
unfortunately, such points often don't sway management...but keep
trying and perhaps they'll see the light.
regards
andrew
------------------------------
Date: 1 Feb 1998 21:18:04 GMT
From: David Fetter <dfetter@shell4.ba.best.com>
Subject: Generating the partitions of a string
Message-Id: <6b2oqc$spl$1@nntp1.ba.best.com>
Kind people,
I'm banging my head against the wall trying to do the following
doohicky efficiently.
Slup in a string, and generate all of its partitions, so 'word'
generates the array:
['word'],
['wor','d'],
['wo','rd'],
['wo','r','d'],
['w','ord'],
['w','or','d'],
['w','o','rd'],
['w','o','r','d']
The crude hack thus far does a hairy, double-eval'ed thing
that may do something awful if left unattended.
My motivation here is a mnemonic system which can be used to
remember numbers long term. I have a dictionary lookupizer
that gives back a list of words from a number, and want to
extend the thing to bigger numbers, but still be quick.
--
David Fetter 888 O'Farrell Street Apt E1205
shackle@ren.glaci.com San Francisco, CA 94109-7089 USA
http://www.best.com/~dfetter +1 415 567 2690 (voice)
print unpack ("u*",q+92G5S="!!;F]T:&5R(%!E<FP@2&%C:V5R"@``+)
"...the championing of the powerful against the powerless is the morality
of a thug."
Mark Rosenfelder
------------------------------
Date: Mon, 02 Feb 1998 01:07:37 GMT
From: meo@qld.mim.com.au.SPAMMERGOHOME (Martin Oakley)
Subject: How do I get IP address of script user?
Message-Id: <6b36f3$6ke$1@news.mel.aone.net.au>
I'm not sure if this is really a Perl problem (maybe this is a UNIX
system call)
running Perl5 on Solaris 2.5
I've got a perl script which logs it's actions etc, but many of the
users will be using 'generic' accounts so I want to log the IP address
as well as the user name.
I can get the usename with $uid = getlogin;
How can I get the ip address of the user, logged in via telnet,
running the perl script?
Solaris and other UNIXes seem to do this because they report "last
login from xxx.xxx.xxx.xxx"
How can I do it?
------------------------------
Date: Mon, 2 Feb 1998 19:38:06 +1100
From: Anthony David <adavid@netinfo.com.au>
Subject: Re: How do we use a decimal point?
Message-Id: <Pine.LNX.3.95.980202192919.1708B-100000@localhost>
On 1 Feb 1998, Abigail wrote:
> Tim Murphy (info@cinox.demon.co.uk) wrote on 1615 September 1993 in
> <URL: news:886291924.15354.0.nnrp-01.9e981405@news.demon.co.uk>:
> ++ Hello.
> ++
> ++ Is there an easy way in Perl of expressing a number to two decimal points.
>
>
> *TWO* decimal points? What kind of numbering system is that?
However, for two decimal PLACES, use sprintf/printf (check out perldoc -f
for details.
eg: perl -e '$a=sin(1); printf "%.2f\n", $a'
Anthony David | Gambling - A discretionary tax on
Anthony David & Associates | those asleep during High School Maths
------------------------------
Date: 2 Feb 98 00:44:43 GMT
From: devin@premier1.net (Devin L. Ganger)
Subject: Re: How to get at stuff piped into Perl? (Repost)
Message-Id: <slrn6da5mj.bd8.devin@blacktower.premier1.net>
<flashy-thing!> Remember only that on Fri, 30 Jan 1998 09:16:51 -0500,
in comp.lang.perl.misc Michael Kairys wrote:
> I can't figure out how to get at the output of the grep once I'm in
> myscript.pl. I've read all the references I can find about pipes but they
> all seem to be talking about using open and creating a process to read/write
> from/to.
You're overthinking the plumbing.
Take a step back, take a deep breath, and look at what is going on here.
On the command line you gave, you're running...
> > grep foo * | myscript.pl
which is simply a grep command and a Perl script, piped together *at the
shell*. In a shell, a pipe is achieved by taking the standard output of
the current and redirecting it to the standard input of the
next process to the right.
If you're familiar with ksh, this same line does the exact same thing
that you're doing with the above line:
myscript.pl < $(grep foo *)
Rewriting it this way, although not recommended for everyday use, helps
emphasize the direction of information flow.
So, your Perl script doesn't need anything fancy to get this
information; all you need to do is start reading from STDIN.
Hope this helps.
--
Devin L. Ganger <devin@premier1.net>
Chief Systems Administrator
Premier1 Internet Services
------------------------------
Date: 2 Feb 98 00:45:45 GMT
From: devin@premier1.net (Devin L. Ganger)
Subject: Re: Internet Community needs cgi scripts like it needs ...
Message-Id: <slrn6da5oi.bd8.devin@blacktower.premier1.net>
<flashy-thing!> Remember only that on Sun, 01 Feb 1998 00:09:41 GMT,
in comp.lang.perl.misc Michael Peck wrote:
> On 30 Jan 1998 21:07:54 -0500, clay@panix.com (Clay Irving) wrote:
>
> >In <6at7b5$b9r$1@cyprus.atlantic.net> chip@mail.atlantic.net (Chip Salzenberg) writes:
> >
> >>According to pudge@pobox.com (Chris Nandor):
> >>>... a hole in the head ...
> >>>... AlterNIC ...
> >>>... spammers ...
> >
> >>... IRC bots ... (except purl!)
> >>... broadcast ICMP replies ...
> >>... old sendmails ...
> >
> >... Perl 4 questions ...
>
> ...NT Web Servers ...
... *any* NT servers[1] ...
[1] Why, yes, I *am* a former NT admin. How did you guess?
--
Devin L. Ganger <devin@premier1.net>
Chief Systems Administrator
Premier1 Internet Services
------------------------------
Date: Sun, 01 Feb 1998 16:21:07 -0500
From: "Abigael L. Anthony" <roseala@erols.com>
Subject: Looking for a search script for NT
Message-Id: <34D4E743.6EC82CAD@erols.com>
Hi,
I'm looking for a good search script for windows NT? Something to put on
my web page so visitors can search the site.
Warmest Regards & Best Wishes,
Abigael Anthony
roseala@erols.com
------------------------------
Date: Sun, 01 Feb 1998 23:11:56 +0000
From: Scott Walde <scott_hates_spam@saskatoon.com>
Subject: LWP problem: Error: 500 Offset outside string
Message-Id: <34D5013C.BA5B0C0@saskatoon.com>
I'm getting this error message:
Error: 500 Offset outside string
When trying to execute this line:
my $res = $ua->request($req);
($ua is a LWP::UserAgent, $req is a HTTP::Request)
The funny thing is, this code runs on another machine just fine.
Old machine (where it works) is a Pentium 75, RH Linux 4.2 with Perl
5.003, LWP 5.08. The new machine is a Pentium 75 with RH5.0, Perl
5.004, LWP 5.19. Is this a glibc issue?
I'm using perl -w, use strict, use diagnostics, but I get nothing other
than the above error. (not even a linefeed after the error.)
Has anyone seen this before? I couldn't find this error in dejanews.
Thanks.
srw
------------------------------
Date: Sun, 01 Feb 1998 17:51:35 -0600
From: alison@cs.jcu.edu.au
To: alison@cs.jcu.edu.au
Subject: perl and dde in windows NT
Message-Id: <886376541.650182666@dejanews.com>
Hi
I would like to know if Perl for Win32 can communicate with other
applications within Windows NT using DDE control stuff.
Thanks,
Alison
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 2 Feb 98 01:15:29 GMT
From: devin@premier1.net (Devin L. Ganger)
Subject: Re: Public Response to Private Flame (albeit machine-generated)
Message-Id: <slrn6da7g9.bd8.devin@blacktower.premier1.net>
<flashy-thing!> Remember only that on Sat, 31 Jan 1998 22:37:21 -0600,
in comp.lang.perl.misc Rich Grise wrote:
> Before I go rage on this "tchrist" guy[...]
<snip the rest>
You've already gotten a few public responses on this, but I think it's
only netiquette to inform someone when they've just earned a place in my
killfile.
Before I *plonk* you, though, I would like to point out that, although I
have just finally (after many years) started the task of learning Perl,
I knew for those same years that Tom Christiansen is a Perl wizard and
co-author of the O'Reilly Perl books _Learning Perl_ and _Programming
Perl_, along with Randal Schwartz and Larry Wall. That last name does
imply that he has some clue about all things Perl...
As a news admin, I would also like to point out that even though this is
comp.lang.perl.misc, Larry Wall may or may not have much say as to the
policies of the group (although one would certainly hope that the
readers listened to him!), since Perl and Usenet are Very Different
Things.
Now, into the killfile you go. Your parole hearing is in one month.
Please, between now and then, try to find two clues to rub together.
*plonk*
--
Devin L. Ganger <devin@premier1.net>
Chief Systems Administrator
Premier1 Internet Services
------------------------------
Date: 1 Feb 1998 21:14:48 GMT
From: plambert$1@plambert.org
Subject: Re: ssh
Message-Id: <6b2ok8$27t$1@nntp1.ba.best.com>
In comp.lang.perl.misc, Thomas Lockney <media@organizedmedia.com> spewed:
> Did I fail to mention that I also have to do all this through a socks
> firewall? I never have been able to get rsync to work around this
> problem. Using the runsocks command doesn't work. However, if I keep
> everything within perl and proceed the replication script with the
> runsocks "wrapper," it works fine -- for the none ssh systems. Now about
> those ssh systems...
Here's what I did.
I wrote a program called "serverd" which basically looked like this:
while(<>) {
next if /^\s*$/;
($cmd, $args) = split;
if ($cmd =~ /^PUT/i) {
put($args);
} elsif ($cmd =~ /^GET/i) {
get($args);
} ...
...
}
The serverd has commands to return a file listing, including file info,
and the put and get commands allow a file to be put or gotten on that
machine, including a little header with the permissions and other info
about the file that i need (an entry into an HTML index, actually. ;-)
The client just opens a single ssh connection to the server, running
serverd, and "talks" to it through this "poor man's ftp".
I even made a simple version which looked and acted like ncftp in many
ways, but did all the transfers via scp, so the files were secure.
Interesting, and a lot of work. I never took the time to completely
finish any of it.
Good luck!
--Paul L.
------------------------------
Date: 2 Feb 98 01:35:34 GMT
From: devin@premier1.net (Devin L. Ganger)
Subject: Re: Weird error for beginner
Message-Id: <slrn6da8m0.bd8.devin@blacktower.premier1.net>
<flashy-thing!> Remember only that on Fri, 30 Jan 1998 19:07:07 GMT,
in comp.lang.perl.misc Chip Salzenberg wrote:
<me saying that gethostbyname() wasn't working>
> Nothing in Perl. Perl's gethostby*() functions are very thing
> wrappers around the corresponding C functions.
Mmf.
I'll have to do some further digging on that, then, in my Copious Amount
of Spare Time (No Sarcasm Here, Folks, Please Move Along!)[tm]. ;)
> Perhaps you forgot that some IP addresses are textually substrings
> of other IP addresses? If you search for /$ip/ you'll get false
> positives. Searching for /\b\Q$ip\E\b/ is probably good enough.
This could be, but it shouldn't have happened with the particular data I
was using. Mind you, I definitely take the thought to heart that I need
to consider *all* possible cases, and will strive to program that way in
the future.
In this case, though, it turned out that I made a simple logic error and
was incrementing $& every time through the loop, regardless of whether
or not the regex actually matched in the current line. <sigh> I feel
pretty stupid, now.
Thanks to you and Tom for your prompt, helpful, and most important,
thought-provking and instructive answers to my question. It is people
like yourselves who provide added value to Perl.
--
Devin L. Ganger <devin@premier1.net>
Chief Systems Administrator
Premier1 Internet Services
------------------------------
Date: Sun, 01 Feb 1998 16:01:55 -0500
From: see-below@crocker.com (Steve Linberg)
Subject: Re: Win32: Any scripts to shut down all services?
Message-Id: <see-below-0102981601550001@pri03-028.oldcity.dca.net>
In article <6b2fc3$45b$1@nz12.rz.uni-karlsruhe.de>,
Marc.Haber-usenet@gmx.de (Marc Haber) wrote:
> Followup-To: set to alt.dev.null ignored. I am not that easy to fool.
Well done.
> see-below@crocker.com (Steve Linberg) wrote:
> >Sometimes that happens. How much did you pay for access to the group?
> >Oh, nothing. OK, surely you understand that the newsgroups are a
> >give-and-take free exchange of information.
>
> I understand that perfectly. You might take a look into some
> newsgroups about topics I have expert knowledge about. If you speak
> German, you might want to take a look into de.comm.isdn.ALL, a
> hierarchy about ISDN telephone and communication networks or into
> de.newusers.questions. I spend about an hour daily there answering
> questions.
Das habe ich gesehen. Auch sehr gut.
> Yes, I am guilty of being a novice to perl. I did my homework, read
> the FAQ and the docs (which the average newbie does not do on this
> group, I know). Now, I am guilty of having questions.
No, there's nothing wrong with questions. I (and others) were annoyed by
your expressed anger over the lack of answers. I have cast a few
unanswered Win32 Perl questions into the ether too, but the lack of
responses, although frustrating, just shows how much work there is to be
done. If you find the answer yourself, please share it.
> Please don't take me as the raging ignorant newbie I appear
> to be in this argument. I am not.
I believe you.
> >Be frustrated if you want, but please keep the complaining to a minimum.
>
> I am complaining about people who don't respect the decision I made in
> good conscience: Not using a flavor of UNIX. perl may be a Unix tool,
> but as I stated yesterday: If you don't want Windows related questions
> in here, start comp.lang.perl.windows (I will be one of the first to
> subscribe) or convince ActiveState and Gurusamy Sarathy to pull their
> Windows ports. As long as a piece of software is out on the "market",
> there _will_ be questions.
I would agree that comp.lang.perl.windows is a fine idea -- although from
the point of view that it is a necessary evil. I use Perl for Win32
myself (though not through choice; I came in to build a large national
site where the NT decision had already been made), and I would be there a
lot. In a perfect world, it wouldn't be necessary... it drives me crazy
every time I have to hack a perfectly functional Perl script to work under
NT.
> It is too bad that a single "wrong" reaction maybe earned me a cosy
> warm place in a lot of expert's kill files. I should have ignored Chip
> in the first place.
I always find the "when angry, count to 10" rule exceptionally useful on
Usenet. There are enough boneheads out there, as we all know. Deja news,
although tremendously useful, also keeps a record of anytime we lose our
cool. Not fair, perhaps, but there it is.
Auf Wiederschreiben.
Steve Linberg
--
slinberg@ com
crocker.
Try that one, spambots!
------------------------------
Date: Sun, 01 Feb 1998 23:51:05 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Win32: Any scripts to shut down all services?
Message-Id: <6b31pe$aun$2@nz12.rz.uni-karlsruhe.de>
see-below@crocker.com (Steve Linberg) wrote:
>Deja news,
>although tremendously useful, also keeps a record of anytime we lose our
>cool. Not fair, perhaps, but there it is.
While I am not proud of all my articles that I post to usenet, I
appreciate DejaNews even archiving the articles one would rather not
have posted. At least, it makes people get a honest impression of a
Netizen.
Since "our" current problem was based on a misunderstanding, let's
take that thread to its grave.
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
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 1784
**************************************