[8165] in Perl-Users-Digest
Perl-Users Digest, Issue: 1783 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Feb 1 16:08:15 1998
Date: Sun, 1 Feb 98 13:00:24 -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: 1783
Today's topics:
A problem using CGI.pm to upload files from unix flafy@actcom.co.il
Re: Can PERL test for a process? (Michael Wang)
Re: can variables be generated on the fly (Andrew M. Langmead)
Re: Don't forget the Perl Journal (was Re: Good place t <tchrist@mox.perl.com>
Re: don't kill me, but (Dave O.)
Re: fetching text not from STDOUT (pipe) (David Efflandt)
Re: fetching text not from STDOUT (pipe) (Tad McClellan)
Help!! System V semaphores in Perl how?? <carrmic@charlie.cns.iit.edu>
Re: Internet Community needs cgi scripts like it needs (Chris Nandor)
Re: Internet Community needs cgi scripts like it needs <corky@ultranet.com>
Re: Larry's Quotes (Jason)
Re: PRINT (Tad McClellan)
problem with DB_File <janina.patolla@trivadis.ch>
Re: Public Response to Private Flame (albeit machine-ge (John Moreno)
Re: Public Response to Private Flame (albeit machine-ge (Tad McClellan)
Re: regex to extract text from string variable (Tad McClellan)
Re: Want to determine the subnet networks from a networ (Martin Vorlaender)
Re: Win32 Venting & The Answer (was Re: Win32: Any scri (Marc Haber)
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 13:36:47 -0600
From: flafy@actcom.co.il
To: flafy@actcom.co.il
Subject: A problem using CGI.pm to upload files from unix
Message-Id: <886360577.2089287683@dejanews.com>
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: 1 Feb 1998 17:34:32 GMT
From: mwang@alhena.ibk.ml.com (Michael Wang)
Subject: Re: Can PERL test for a process?
Message-Id: <6b2bn8$56a$1@news.ml.com>
Michael Peck <mpeck@pobox.com> wrote:
>>Trying to write a script that will test whether a process exists.
>
>Here is one example:
>
>$myprog = '/usr/lib/sendmail' ; # This is the program to look for.
>open(PS, "/usr/bin/ps -ef |") ;
>while( <PS> ) {
> ...
> }
>}
>close(PS) ;
I just wonder which of the following:
open(PS, "/usr/bin/ps -ef |") ; # use filehandle
@PS = `/usr/bin/ps -ef` ; # save the output to an array
is "better", or faster. Thanks.
------------------------------
Date: Sun, 1 Feb 1998 20:49:00 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: can variables be generated on the fly
Message-Id: <EnpwHz.IDD@world.std.com>
Cameron Kaiser <cdkaiser@delete.these.four.words.concentric.net> writes:
>aml@world.std.com (Andrew M. Langmead) writes:
>>eedvab@eed.ericsson.se (Vjekoslav Balas) writes:
>>>Subject: Re: can variables be generated on the fly
>>Its a feature called symbolic references. The feature exists, but
>>there use is strongly discouraged, and in most cases can be easily
>Why? There's nothing in the New Testament aka Programming Perl that calls
>symbolic references depreciated.
No, there is just text that discourages their use.
Lets look up Symbolic References in the index. There are two
entries. The first one just glosses over the subject and says "See
"Symbolic References" later in this chapter." The second entry, of
course, is the section "Symbolic References", which says "This is very
powerful, and slightly dangerous..."
It then points to the "use strict 'refs'" pragma to protect against
accidentally using a symbolic reference. So lets look up "strict" in
the section of library modules. The title? "strict -- Restrict Unsafe
Constructs" Again, it doesn't sound very enthusiastic.
And if you look at the section where the perlref man page introduces
symbolic references, you get text similar to the camel book and a
sentence that says, "People frequently expect it to work like this.
So it does." Not exactly a ringing endorsement either.
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.
Some examples that I have seen in the past:
Someone wanted to create a config file to initialize variables from.
printer=postscript
remotehost=goldilocks
while(<CONFIG>) {
($var,$value) = split /=/,$_,1;
$$var = $value;
}
But if they are going to do that, why not just load the file into a
hash instead?
while(<CONFIG>) {
($var,$value) = split /=/,$_,1;
$config{$var} = $value;
}
Or sometimes people want to create a bunch of arrays, but don't know
the number they will need until runtime:
$line = 0;
while(<>) {
@{'line' . $line++} = split /\s+/;
}
But they are much better off using a two dimensional array.
$line=0;
while(<>) {
$lines[$line++] = [ split /\s+/ ];
}
I'm not saying there is never any use for symbolic references, but
there are only few applications in which they are the best choice. And
someone should know what the alternatives are (and realize why they
are not appropriate) before they decide to use them.
I know there is supposed to be more than one way to do it, but
sometimes at least one of those ways is a whole lot worse than the
rest.
--
Andrew Langmead
------------------------------
Date: 1 Feb 1998 17:33:42 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Don't forget the Perl Journal (was Re: Good place to start in Perl 5)
Message-Id: <6b2blm$7fg$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, king@cogsci.ucsd.edu (Jonathan King) writes:
:HOWEVER (and I do mean to shout here), I was really *pissed* at the
:number of typos and other flaky things that turned up in my copies
:of these books. Yes, they were first printings, but it did make me
:a little sad to see O'Reilly books that went to the printers with as
:many warts as these had.
You really don't know how hard it is. That's all I can say.
:> HTML: The Definitive Reference
:Er, don't you really mean:
: HTML: The definitive Guide, 2nd Edition (Yet Another ORA product)?
:
:If you don't mean it, I do.
Yes, I meant that. Whoops.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Espousing the eponymous /cgi-bin/perl.exe?FMH.pl execution model is like
reading a suicide note -- three days too late."
--Tom Christiansen <tchrist@mox.perl.com>
------------------------------
Date: Sun, 01 Feb 1998 17:57:26 GMT
From: sloop@mailcity.com (Dave O.)
Subject: Re: don't kill me, but
Message-Id: <34d4b584.85238096@news.xmission.com>
On Sun, 1 Feb 1998 03:02:06 -0600, "michael a. martinez"
<mikael@inmedia.com> wrote:
>I'm trying, I'm reading, I'm doing the work... I'm not slacking and trying
>to get off easy. I promise who ever reads this. I just picked up Learning
>Perl from O' Reilly, because I'm told it's the best. If it is anything like
>the other O'Reillys' I believe it... O'Reilly rules,
>
>Anyway, I've written a simple "hello world" ".pl" file, O'Reilly assumes as
>it should that I know enough Unix to execute this file, but I have not
>reached that level yet....
>
>If anyone can help me, I would be so thankful.
It's nice to see someone doing his homework! :)
Try this: first enter your account's unix shell and type, "whereis
perl"
The first part of the response should say something like
"/usr/bin/perl"
Then enter the text editor under unix (or wheverver it is that you
edit your scripts) and set the first line to #!/usr/bin/perl
or whatever that "whereis" command returned. Then put a "-w" (no
quotes) one space after the #!/usr/bin/perl text... so the end result
should be "#!/usr/bin/perl -w"
Next you need to make your script executable. This is done with
Unix's "chmod" command. Enter "chmod +x <scriptname>"
but replace <scriptname> with the name of your Perl script.
An example would be "chmod +x runme" for a program named "runme".
Now to run that script all you must do is type its name.
You're now using the "shebang" approach to running perl programs.
As for the book you've got, you have the best! The Llama book, and
later the Camel book are the best tools I've found for learning and
programming in Perl. If your interests take you in this direction you
may also benefit from the Mouse book (CGI). A Unix book might be
worth picking up too.
Dave
------------------------------
Date: Sun, 01 Feb 1998 18:09:54 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: fetching text not from STDOUT (pipe)
Message-Id: <34d5a59c.3858133@flood.xnet.com>
Vegard Hanssen <vegardha@ifi.uio.no> wrote:
>open(PROG, "program |") || die;
>
>while(<PROG>) {
> <do something with the text>
>}
>close PROG;
>
>-------
>
>I want to fetch the text from the program, but how do I do it when the
>program not output the text to STDOUT?
>
>Vegard
Man pages for just about any shell cover redirecting stderr to stdout,
but 'man perlipc' does not cover isolating stderr from stdout if line
terminators differ (stderr\r vs stdout\n). Here are alternatives for
isolating stderr and stdout.
To just get stderr from a program and not touch stdout where $cmd =
your pogram (I use this for 'dialog' menus which put menu on screen
and return selection in stderr):
$stderr = `$cmd 3>&1 1>&2 2>&3 3>&-`;
Following is another method to get status from stderr in real time
(now) and data from stdout when finished (I do not have open3):
# FIFO for $cmd stdout
$cmdout = "/tmp/fifo.$$";
unless (-p $cmdout) {
unlink $cmdout;
system('mknod', $cmdout, 'p')
&& die "Can't mknod $cmdout: $!\n";
}
my $sleep_count = 0;
do { # Spawn child to trap $cmd stdout
$pid = open(KID_TO_READ, "-|");
unless (defined $pid) {
warn "cannot fork: $!";
die "bailing out" if $sleep_count++ > 6;
sleep 10;
}
} until defined $pid;
unless ($pid) { # we are the child
$| = 1;
@fifo = ();
open(FIFO, "<$cmdout") or die "Can't read $cmdout; $!\n";
while (<FIFO>) {
push @fifo, $_;
}
close FIFO;
print @fifo; # to parent
exit 0;
}
$cmd = 'program';
open(IN, "$cmd 3>&1 1>&$cmdout 2>&3 3>&- |")
or die "Can't open $cmd: $!\n";
# Process stderr from $cmd
# example for status refreshed on single line (\r)
$/ = "\r"; # only if eol is not \n
while (<IN>) { # stderr from $cmd
# do something with $_
}
$/ = "\n"; # only if you changed it
close IN;
# Get stdout from child
@data = ();
while (<KID_TO_READ>) {
push @data, $_;
}
close KID_TO_READ;
unlink $cmdout;
David Efflandt/Elgin, IL USA
efflandt@xnet.com http://www.xnet.com/~efflandt/
------------------------------
Date: Sat, 31 Jan 1998 18:29:16 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: fetching text not from STDOUT (pipe)
Message-Id: <skf0b6.oh2.ln@localhost>
Vegard Hanssen (vegardha@ifi.uio.no) wrote:
: open(PROG, "program |") || die;
: I want to fetch the text from the program, but how do I do it when the
: program not output the text to STDOUT?
Well, we would kinda need to know where it _does_ put its output...
To a file?
To STDERR?
To a TTY?
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 01 Feb 1998 14:30:31 -0600
From: Michael Carroll <carrmic@charlie.cns.iit.edu>
Subject: Help!! System V semaphores in Perl how??
Message-Id: <34D4DB67.555B0540@charlie.cns.iit.edu>
I need help. I want to implement a system V binary semaphore in perl,
but I can't get it to work. I can get it to create the semaphore but
not remove it and I can't get it to work once I have it created. Here
is the test code I have so far.
$semid = semget(IPC_PRIVATE, 1, IPC_CREAT);
print "id = $semid\n";
$temp = semctl($semid, 0, SETVAL, 1);
print "set = $temp\n";
$opP = pack("sss", 0, -1, 0777);
$opV = pack("sss", 0, 1, 0777);
semop($semid, $opP);
print "in cs\n";
sleep(5);
semop($semid, $opV);
$temp = semctl($semid, 1, IPC_RMID, 0);
print "exiting kill = $temp\n";
There are just a few print lines in there to see what is going on. The
only way it will create the semaphore is with the IPC_PRIVATE.
IPC_CREAT doesn't seem to be doing it. Please e-mail me if you know how
to implement a binary semaphore. I really need it. Thanks for any help
in advance.
carrmic@charlie.cns.iit.edu
------------------------------
Date: Sun, 01 Feb 1998 13:53:21 -0500
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Internet Community needs cgi scripts like it needs ...
Message-Id: <pudge-0102981353220001@ppp-5.ts-1.kin.idt.net>
In article <6b0nj0$fmo$1@cyprus.atlantic.net>, chip@pobox.com wrote:
# In article <34D3DD4D.47BD@ultranet.com>, Bob Trieger
<corky@ultranet.com> wrote:
# > In article <34d3a76d.9173776@news.seicom.net>, mpeck@pobox.com wrote:
# >> In article <6au11q$e5o@panix.com>, 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 ...
# >
# >...Operating Systemism & Operating Systemists...
# >...Platform specific programming languages...
#
# ... Microsoft ...
... people who push for Microsoft products ...
... superfluous attributions in Usenet ...
... a sense of community ...
... more venture capital ...
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10 1FF7 7F13 8180 B6B6'])
#== New Book: MacPerl: Programming for the Rest of Us ==#
#== Publishing Date: Early 1998. http://www.ptf.com/macperl/ ==#
------------------------------
Date: Sun, 01 Feb 1998 14:23:02 -0500
From: Bob Trieger <corky@ultranet.com>
Subject: Re: Internet Community needs cgi scripts like it needs ...
Message-Id: <34D4CB96.4744@ultranet.com>
Chris Nandor wrote:
>
> In article <6b0nj0$fmo$1@cyprus.atlantic.net>, chip@pobox.com wrote:
> # In article <34D3DD4D.47BD@ultranet.com>, Bob Trieger
> <corky@ultranet.com> wrote:
> # > In article <34d3a76d.9173776@news.seicom.net>, mpeck@pobox.com wrote:
> # >> In article <6au11q$e5o@panix.com>, 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 ...
> # >
> # >...Operating Systemism & Operating Systemists...
> # >...Platform specific programming languages...
> #
> # ... Microsoft ...
>
> ... people who push for Microsoft products ...
> ... superfluous attributions in Usenet ...
> ... a sense of community ...
> ... more venture capital ...
... being censured for having to use MS products ...
... more "adult" websites ...
PS. Why is sense of community such a bad idea?
------------------------------
Date: 1 Feb 1998 19:04:37 GMT
From: robobob@blech.mindwell.com (Jason)
Subject: Re: Larry's Quotes
Message-Id: <slrn6d9hq7.mmn.robobob@blech.mindwell.com>
On Sun, 25 Jan 1998 20:10:56 +0000, Jerry Pank
<jerryp.usenet@connected.demon.co.uk> wrote:
>In one_of_my_my_many_Perl_books/Faqs/c.l.p.m/ or somewhere else,
>I remember seeing a link to a site with Larry's quotes.
>
>Can't find it now. Would someone shine the torch ?
>
http://www.perl.com/CPAN/misc/lwall-quotes.txt.gz
--
Jason Kohles -- System Administrator -- XMission Internet Access
jason@xmission.com (at work) jason@mindwell.com (at play)
"We're not surrounded, we're in a target-rich environment!"
------------------------------
Date: Sun, 1 Feb 1998 08:59:57 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: PRINT
Message-Id: <dl22b6.2k1.ln@localhost>
Walter Archie (warchie@att.net.hk) wrote:
: Subject: PRINT
You don't need to shout at us...
: --------------5DA3410E9A0AD134094F2B3A
: Content-Type: text/plain; charset=us-ascii
: Content-Transfer-Encoding: 7bit
Please don't do that.
: How do you do a print statement so that it does think your trying to
: print a variable instead of the variable text. Like so:
: e.g.
: $status="Test"
: print "$status = $status"
: ^^^^^^
: I want the output to be:
: $status = Test
print "\$status = $status"
: --------------5DA3410E9A0AD134094F2B3A
: Content-Type: text/html; charset=us-ascii
: Content-Transfer-Encoding: 7bit
: <HTML>
Please don't do that either.
Really.
You are:
Using twice the bandwidth with no increase in communication.
Using twice the disk space on *thousands* of computer around
the world with no increase in communication.
Being killfiled even as we speak (folks that habitually waste
limited Internet resources often get that sort of treatment).
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 01 Feb 1998 20:38:26 +0100
From: Janina Patolla <janina.patolla@trivadis.ch>
Subject: problem with DB_File
Message-Id: <34D4CF32.29889A58@trivadis.ch>
Hi,
I want to use the tie-function with a DB-file. On three different
plattforms (Linux 2.0.32 with perl 5.003, Linux 2.0.32 with perl
5.004_04, Digital Unix 4.0B with perl 5.004_04) I always get the
message:
-----------------------------------------------------------------------
Can't locate object method "TIEHASH" via package "DB_FILE" at ./db1.pl
line 9.
-----------------------------------------------------------------------
Here comes my little script:
-----------------------------------------------------------------------
#!/usr/bin/perl -w
#use strict ;
use DB_File ;
my (%hash) ;
# open the database
tie %hash, "DB_FILE", "test_db", O_CREAT|O_RDWR, 0666, $DB_HASH
or die "cant open database test_db" ;
# add some records:
$hash{'tzdpab'} = '76536' ;
$hash{'tzdalm'} = '76056' ;
$hash{'tzdqur'} = '76527' ;
$hash{'tzdfrh'} = '76529' ;
# close the database ;
untie %hash ;
------------------------------------------------------------------------
Can you help me ?
Bye
------------------------------
Date: Sun, 1 Feb 1998 15:19:14 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Public Response to Private Flame (albeit machine-generated)
Message-Id: <1d3s1y5.1p7ij92a2mxcaN@roxboro0-013.dyn.interpath.net>
Rich Grise <lovegod@earthling.net> wrote:
> Before I go rage on this "tchrist" guy (what does "tchrist" stand for,
> after all, "The Christ??" who in The World does this guy think he is?
> The OWNER of Perl? The owner of the NG? Did he check with Larry? I think
> probably not) I thought I should quote the ACTUAL responses I've
> received from this character, in response to what I thought were
> well-thought-out posts, doing my best to keep to the conventions and
> etiquette of the NewsGroup:
As any number of people will tell you what Tom Christiansen (tchrist)
sent you was not a flame and was not intended to be anything similar to
that. It's simply a automated response informing you that the
newsreader you are using has mangled your post almost beyond all
comprehension. Since you are using NS this isn't surprising. It has no
personal judgements in there at all.
Since you are using Win95, I'd recommend that you switch to Agent or
Gravity.
He sent you a note that your posting agent does something very simple
very wrong and goes into some detail explaining exactly what (and why)
this was.
Instead of posting this message you should have simply sent him a
private response saying "Thanks, I didn't know that. I'll see what I can
do to keep it from happening again. Do you have any suggestions. I'm
using....", in which case you'd have probably got a infomative response
listing some of the better newsreaders for your system.
--
John Moreno
------------------------------
Date: Sun, 1 Feb 1998 08:46:20 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Public Response to Private Flame (albeit machine-generated)
Message-Id: <sr12b6.2k1.ln@localhost>
Rich Grise (lovegod@earthling.net) wrote:
: Before I go rage on this "tchrist" guy
You should perhaps take a minute or two to "know your enemy" before
launching a flame...
1)
A word search for 'tchrist' in the documentation that came with your
perl distribution finds 6 matches. That might have served as a clue
to a thinking person.
2)
Searching for 'tchrist' in c.l.p.m on www.dejanews.com would have
found 80-some matches. From that, you would have gotten the
'tchrist@mox.perl.com' address.
Searching in c.l.p.m for that address would have found 3000-some
(that's right, a few *thousand*) matches.
A search for 'lovegod@earthling.net' finds 12 matches.
A thinking person might have deduced at this point that there just
might be more folks in c.l.p.m on his side than on yours...
3)
Searching for 'tchrist' at www.excite.com would have found 756
matches. Another clue as to who this "tchrist" guy is...
4)
It is pretty hard for me to imagine that someone who is Learning Perl
or Programming Perl does not know who he is.
: (what does "tchrist" stand for,
: after all, "The Christ??"
I don't believe it would take a Rocket Scientist to figure that out
from examining the From: header that you included below.
Think much?
[
What does 'lovegod' stand for, after all?
Bet you get a lot of dates from your clever choice of account name...
]
: who in The World does this guy think he is?
You'd have to ask him that.
: The OWNER of Perl? The owner of the NG? Did he check with Larry? I think
^^^^^^^
^^^^^^^
After observing the above (and the below a well) I find this
assertion questionable.
: probably not) I thought I should quote the ACTUAL responses I've
: received from this character, in response to what I thought were
: well-thought-out posts, doing my best to keep to the conventions and
^^^^^^^^^^^^^^^^^^^^^^^^^^^
: etiquette of the NewsGroup:
^^^^^^^^^^^^^^^^^^^^^^^^^^
I guess you don't know all the elements of netiquette then.
1) posting private email publicly
2) having word-wrap misconfigured in your newsreader software
3) making off-topic postings, even when you KNOW it is off topic
(you said "this is probably the wrong newsgroup, but" and then
went on to post there anyway)
Those are all bad netiquette.
: ---------------------------------------------------------
: Date: Sat, 31 Jan 1998 15:42:00 -0700
: From: Tom Christiansen <tchrist@jhereg.perl.com>
: To: lovegod@earthling.net
[snip]
: If you can think of any way to make this message more helpful, please
: let me know. I apologize in advance if this message comes off sounding
: unkind to you; it wasn't meant to be. I'm honestly just trying to help
: to make the Net a better place for all of us.
It appears that you had trouble understanding this paragraph.
Many people will *ignore* your postings (I skip 10-20 every day due
to crappy formatting) when they are hard to read.
Avoiding things that decrease the readership for your postings would
seem like a Good Idea to me.
You would not know that folks are not reading your postings unless
someone told you.
So Tom told you.
Ignore his whole message if you don't mind being ignored.
[snip]
: --------------------------------------------------------------
: well, oootsy-tootsy-too!
Hey!
None of that hoity-toity intellectual style of debate here.
: Here is what my response to him about that was:
[snip]
: ------------------------------------------------------
: And then, what's the next thing I receive (off-list, mind you;
: I've been trying to be polite about this up until now!)
: ================================>
Why does this upset you?
You are not being singled out.
It is an *auto* responder. Everybody that sends him email gets that
response.
It is just a fancy 'vacation' program.
: Date: Sat, 31 Jan 1998 20:17:16 -0700
: From: Tom Christiansen <tchrist@jhereg.perl.com>
: To: rmgrise@spacestar.net
: Subject: Automatic mail from tchrist [Re: Re: Your message with oddly
: wrapped lines (was Re: Survival Ofperl)]
: This is my automatic mail responder.
[snip]
: While I do read (most) all email messages that come in, please
: understand
: that because I receive literally hundreds of messages each and every
: day,
: I cannot hope to respond to all of them, nor even to a substantial
: fraction of them. Prefixing a subject line with "URGENT: " may help,
: but
: it really had better be so, or else you go in the killfile. (NB: there
: are no urgent programming questions.)
Seems clear why he uses an autoresponder.
Guess you couldn't see that either.
: ---------------------------------------------------------------
: Apparently, this "TheChrist" guy is so High-and_f????ing_Mighty
: that he has MACHINES flame us
If you think that pointing out breaches of netiquette are flames,
then you can probably expect plenty more flames.
: because he can't spare the time from
: his gatesian-nine-thousand-dollares an hour job
^^^^^
Tom has on many occasions eloquently and beautifully engaged in
MS bashing. Some so wonderful that I've enshrined them on my
hard disk.
I doubt he has a 'gatesian' anything...
_You_, on the other hand, _do_ seem to be a PoB.
Pot. Kettle. Black.
: to answer our
: questions
He has answered several thousand questions.
How many have you answered?
: or even validate anything us roob questioners are
: unsure of, and NOT ONLY THAT! He not only doesn't bother to answer
: our questions,
He *does* answer questions. Thousands of them!
Man you are truly a silly sort of person!
: but he apparent DOES have the time to rag on us
: about our poor little crippled mailers that don't WORD WRAP "RIGHT"!
^^^^^^^^^^^^^^^^
Exactly!
If you don't want to hear about crippled mailers then don't use
crippled mailers, else live with your decision.
: Pfaugh! So, if Mister Christ Almighty has no time to bother with
: our questions such that he has a F???ING AUTOMATIC RESPONDER
: FLAME questions that we sent to his oh-so-ivory-tower personal
: mailer, maybe we should just quit listening to his gold-plated
: ass?
You probably should have remained silent on this isssue.
You have now "spoken and removed all doubt".
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 31 Jan 1998 18:26:37 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: regex to extract text from string variable
Message-Id: <tff0b6.oh2.ln@localhost>
Gerrard Family (family@gerrard.org) wrote:
: Thanks in advance for a working example of this, if it can be done. I can
: use Perl 4 or 5.
But if you use perl4 folks will snicker behind your back...
;-)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 01 Feb 1998 18:39:48 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Want to determine the subnet networks from a network:subnet combo.
Message-Id: <34d4b364.524144494f47414741@radiogaga.harz.de>
kevinm@crt.com wrote:
: I'm really looking for an algorithm that will do the or'ing needed with
: ANY subnet. Here's what the algorithm should be able to do:
[examples snipped]
I think the following code does what you want, but then, I did only test it
on the two examples you gave and a few trivial cases.
It sure is clumsy, but I don't yet know how to use pack/unpack/vec right.
I don't mind; TMTOWTDI ;-)
Hope it helps,
Martin
#!perl -w
use strict;
use integer;
my $network = '10.216.0.0';
my $netmask = '255.255.240.0'; # 1st testcase
#my $netmask = '255.255.216.0'; # 2nd testcase
my $fixed_mask = '255.255.0.0';
# i.e. mask for the part of $network that is not subject to subneting
sub aton($) {
my @bytes = split /\./, $_[0];
return undef if @bytes != 4;
my $res = 0;
for my $i (@bytes) {
$res = ($res << 8) | $i;
}
return $res;
}
sub ntoa($) {
my $n = $_[0];
my @res = ();
for (0..3) {
unshift @res, $n & 0xFF;
$n >>= 8;
}
return join '.', @res;
}
print "Network: $network\n";
print "Netmask: $netmask\n";
print "fixed : $fixed_mask\n";
my $tmp = aton($fixed_mask);
my $fixed_part = aton($network) & $tmp;
my $subnet_part = aton($netmask) & ~$tmp;
my $variant_part;
my @bits = (); # .. of $subnet_part, MSB in $bit[0]
my $setbits = 0; # .. in $subnet_part
for (0..31) {
unshift @bits, ($subnet_part & 1);
$subnet_part >>= 1;
++$setbits if $bits[0];
}
# Loop through all numbers 0.. 2**$setbits-1
# and distribute each's bits among the bits available for subneting.
my $sig = 1 << ($setbits - 1); # highest significant bit in range
for my $i (0..((1 << $setbits) - 1)) {
$tmp = $i;
$variant_part = 0;
for my $bit (@bits) {
$variant_part <<= 1;
next if !$bit;
$variant_part |= 1 if $tmp & $sig;
$tmp <<= 1;
}
print 'Subnet: ', ntoa($fixed_part | $variant_part), "\n";
}
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: Sun, 01 Feb 1998 18:36:54 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Win32 Venting & The Answer (was Re: Win32: Any scripts to shut down all services?)
Message-Id: <6b2fcb$45b$2@nz12.rz.uni-karlsruhe.de>
troy@whadda.com (Troy Denkinger) wrote:
>There, you now have three solutions. Go write the friggin' thing.
First thing tomorrow. Thanks.
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: Sun, 01 Feb 1998 13:03:27 -0500
From: see-below@crocker.com (Steve Linberg)
Subject: Re: Win32: Any scripts to shut down all services?
Message-Id: <see-below-0102981303270001@pri03-024.oldcity.dca.net>
In article <6b0i68$ev4$2@nz12.rz.uni-karlsruhe.de>,
Marc.Haber-usenet@gmx.de (Marc Haber) wrote:
> I have been posting numerous questions to clpm now and have not
> received a single useable response.
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. How many questions have you
*answered*? Let's see. Deja news. OK, 10 posts to c.l.p.m. Hmm - none.
So you're PO'd that nobody's answering your questions, but you yourself
are contributing nothing. Except complaints that nobody's answering your
questions. Right?
If you're really stuck, hire somebody. Post a job offer for a
consultant. Call the Perl Institute, who for US$195 will answer any
question you like about Perl for Win32. Or keep reading. Going through
the FAQ (which?) once is hardly doing research. Most of all, stop acting
like people in this newsgroup -- or in any free forum -- owe you answers.
Be frustrated if you want, but please keep the complaining to a minimum.
--
slinberg@ com
crocker.
Try that one, spambots!
------------------------------
Date: Sun, 01 Feb 1998 18:36:46 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Win32: Any scripts to shut down all services?
Message-Id: <6b2fc3$45b$1@nz12.rz.uni-karlsruhe.de>
Followup-To: set to alt.dev.null ignored. I am not that easy to fool.
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.
>How many questions have you
>*answered*? Let's see. Deja news. OK, 10 posts to c.l.p.m. Hmm - none.
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.
And, I am guilty of merely asking if somebody already invented the
particular wheel I am thinking about to build.
>So you're PO'd that nobody's answering your questions,
Nope. That just was some kind of overreaction at someone who told me I
am using the wrong OS (which I am not). It is that kind of non-answer
I am really PO'd about. If nobody cares to post a followup or mail a
reply, fine.
>Right?
Not quite. Please don't take me as the raging ignorant newbie I appear
to be in this argument. I am not.
>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.
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.
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 1783
**************************************