[6522] in Perl-Users-Digest
Perl-Users Digest, Issue: 147 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 19 22:08:42 1997
Date: Wed, 19 Mar 97 19:00:52 -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 Wed, 19 Mar 1997 Volume: 8 Number: 147
Today's topics:
/RE/ for Dummies - It is even hard for experts! (Robert Schuldenfrei)
Re: 2 fields 2 files <merlyn@stonehenge.com>
Do sysopen() and open() create equivalent filehandles? (James Marshall)
Re: IEEE arithmetic and exceptions <walton@frontiernet.net>
Installation Question <grantr@epsc-s2.saicspt.com>
IO::* on 5.003, solaris, gcc 2.7.2.1 (Tim Smith)
Re: Need help substituing multiple lines in file (Mike Stok)
Re: ODBC package problem <jlguru@cris.com>
Re: Parsing html tag attributes & values in Perl <rodos@haywood.org>
Re: perl-binaries for aix1.3 <rootbeer@teleport.com>
Re: perl-script doesn't run <rootbeer@teleport.com>
Recognizing spaces <mriggsby@sybex.com>
Re: Redefining character set matched by \w ? <rootbeer@teleport.com>
Re: replacing et al <rootbeer@teleport.com>
Re: Signaling a child process (Charles DeRykus)
simple counter <rvince@sprynet.com>
Re: Unix and ease of use (WAS: Who makes more ...) <carla@ici.net>
Re: Unix vs WIN95 equivalents <rob@netcentral.net.no.spam>
Re: Who makes more $$ - Windows vs. Unix programmers? <dmweldy@no-junk-mail.ingr.com>
X11::Fvwm 0.1 available (Randy)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 20 Mar 1997 01:22:52 GMT
From: sailboat@tiac.net (Robert Schuldenfrei)
Subject: /RE/ for Dummies - It is even hard for experts!
Message-Id: <5gq3gg$2ga@news-central.tiac.net>
I got some help from Tom Christiansen and Eric Bohlman, but neither script did
the complete chore. Here is the script as suggested by Tom:
@rem = '
@echo off
perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
@rem ';
# captest - testing ways to to change all caps to initital caps.
# This solution was suggested by Tom Christiansen.
$buffer= " THIS is regular text. ";
$buffer=~ s/(\w+)/\L\u$1/g;
print "Buffer: $buffer \n";
__END__
:endofperl
It passed the test by converting THIS IS ALL CAPS to This Is All Caps, but also
converted the above to This Is Regular Text. Clearly having all of my manual in
initial caps is going overboard :)
Here is Eric's code. It too solved the problem of turning THIS IS ALL CAPS into
This Is All Caps. It was easy on the rest of the text, but had its own grief
with the sentence below:
@rem = '
@echo off
perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
@rem ';
# captest - testing ways to to change all caps to initital caps.
# This solution was suggested by Eric Bohlman.
$buffer= "It is I, said the MCS-3 system.";
$buffer=~ s/\b([A-Z])([A-Z]+)/$1\L$2/g;
print "Buffer: $buffer \n";
__END__
:endofperl
It produced "It is I, said the Mcs-3 system. MCS-3 is the name of my production
management system and it would be hard to repair the damage.
I think that the secret to solving this is in the fact that the target is lines
that are ALL caps on one line. It starts with ^, the beginning of the line, has
random white space, every letter is in caps (although there may be numbers and
dashes) and ends with a \n newline. If even one character is lower case, go on
to the next line.
I will be out for the next few days, so if anyone has a solution I will get to
it next week.
Least anyone think I am not pleased for the help that Eric and Tom gave, this IS
NOT the case. In fact just looking at their solution was a big help to my perl
and /RE/ education. Thank you. Bob
.
Robert Schuldenfrei
S. I. Inc.
32 Ridley Road
Dedham, MA 02026
Voice: (617) 329-4828
FAX: (617) 329-1696
E-Mail: bob@s-i-inc.com
WWW: http://www.tiac.net/users/tangaroa/index.html
------------------------------
Date: 19 Mar 1997 16:55:56 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: 2 fields 2 files
Message-Id: <8c7mj3e8s3.fsf@gadget.cscaper.com>
>>>>> "Lars" == Lars Gregersen <lg@kt.dtu.dk> writes:
Lars> On Wed, 19 Mar 1997 08:14:39 +0000, John Clark <john@mcl.net> wrote:
>> I have 2 fields in 2 files. A and B in file 1, A and C in file2.
>> Fields A in both files are not necessary in the same order and some
>> entries may be missing. How do I use keys to sort and print ABC.
Lars> If I understand you correctly: Read your files into a %hash.
Lars> Do a foreach loop using sort keys %hash and print the keys.
Lars> Somebody must be able to do this in a one-liner, I guess.
Not quite one line, but illustrating interesting concepts:
@ARGV = @files = qw(file1 file2);
for (<>) {
my ($first,$rest) = /(\S+)\s*(.*)/ or next;
$data{$first}{$ARGV} = $rest;
}
for (sort keys %data) {
print $_;
for $file (@files) {
print " $data{$_}{$file}" if exists $data{$_}{$file};
}
print "\n";
}
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 530 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 20 Mar 1997 01:00:19 GMT
From: jsm@best.com (James Marshall)
Subject: Do sysopen() and open() create equivalent filehandles?
Message-Id: <5gq273$juj$1@nntp2.ba.best.com>
If I open a file with sysopen() and appropriate flags, are there any
subtle differences between that filehandle and one opened with open()?
I wanna start using sysopen() for all my file needs, but don't want
to get bitten later. I assume the answer is "yes", but I can't find
definitive word anywhere.
Tangential idea: With all the CGI going on, it may be useful for open()
to grow a "lockable" option. Not only would it be convenient, but many
people need locking without realizing it.
Thanks a bunch,
James
............................................................................
James Marshall james@jmarshall.com San Francisco, CA @}-'-,--
............................................................................
------------------------------
Date: Wed, 19 Mar 1997 21:04:43 -0500
From: Bob Walton <walton@frontiernet.net>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: IEEE arithmetic and exceptions
Message-Id: <33309B3B.6E88@frontiernet.net>
Tom Phoenix wrote:
>
> On Sun, 16 Mar 1997, Bob Walton wrote:
>
> > Is there any way of getting Perl to generate Inf and NaN
> > values and suppress the error messages for division by zero
> > and domain errors in built-in functions? Thank you.
>
> Hmmm.... This could become a 'use ieee;' pragma. But there's a pesky
> scoping problem: How can you make my module use ieee if I didn't think
> about it when I wrote it? This might happen, if it won't break too many
> things. Any ideas what would break? Do you want to make a patch and
> find out? :-)
>
> -- Tom Phoenix http://www.teleport.com/~rootbeer/
> rootbeer@teleport.com PGP Skribu al mi per Esperanto!
> Randal Schwartz Case: http://www.lightlink.com/fors/
Tom, thanks. I'm not sure if by "module" you mean Perl modules?
If so, it would seem to me like it couldn't break much -- right
now, folks are either getting fatal errors from division by zero
and domain errors, or they are enclosing their expression in an
"eval" and getting undef. If things were set up so an "eval"
simply changed NaN or Inf to undef, that behavior would continue
(since NaN and Inf propagate) and the only change would be the
absence of fatal errors (and the return of NaN or Inf) from
operations like 1/0 etc without eval.
If on the other hand, you mean by "module" internal perl code,
I can only speculate, as I am not familiar with that code. It
would seem like a fairly small number of places would be affected
-- conversion routines from numeric to string and back,
fprint/sprint, the arithmetic operators, and maybe a few other
places. I note that the package Math::BigFloat already does
what appears to be the equivalent of IEEE arithmetic in its scheme.
Regarding a patch, I am willing to do what I can, which probably
isn't very much, as I have no expertise in perl internals.
------------------------------
Date: Wed, 19 Mar 1997 12:52:45 -0800
From: Russ Grant <grantr@epsc-s2.saicspt.com>
Subject: Installation Question
Message-Id: <3330521D.2BF@epsc-s2.saicspt.com>
I'm tring to install PERL 5 on a Sun Ultra, Solaris 2.5 and I'm getting
the following message:
End of configuration questions.
Stripping down executable paths...
Creating config.sh...
If you'd like to make any changes to the config.sh file before I begin
to configure things, do it as a shell escape now (e.g. !vi config.sh).
Press return or use a shell escape to edit config.sh:
Doing variable substitutions on .SH files...
Extracting Makefile (with variable substitutions)
Extracting cflags (with variable substitutions)
Extracting config.h (with variable substitutions)
Output line too long.
Output line too long.
Output line too long.
Output line too long.
Output line too long.
Then I go into an apparent endless loop. I realize this probably has
nothing to do with PERL but I was curious if anyone has seen this
message and could give me some advice.
Thanks..
Russ
------------------------------
Date: 19 Mar 1997 18:14:11 -0700
From: trs@azstarnet.com (Tim Smith)
Subject: IO::* on 5.003, solaris, gcc 2.7.2.1
Message-Id: <5gq313$25d@web.azstarnet.com>
Hello,
Trying to compile the IO-1.15 module from CPAN, and having trouble when
linking. I can't find which library files I'm missing.
Any help is most appreciated. Thanks,
Tim Smith
Here's the info:
uname -a:
SunOS web 5.4 Generic_101945-39 sun4d sparc
perl -v:
This is perl, version 5.003 with EMBED
built under solaris at Oct 3 1996 12:49:27
+ suidperl security patch
gcc -v:
gcc version 2.7.2.1
Output of 'make' in the IO-1.15 directory, after running perl Makefile.PL:
LD_RUN_PATH="" gcc -o blib/arch/auto/IO/IO.none IO.o
Undefined first referenced
symbol in file
Perl_Sv IO.o
Perl_newXS IO.o
Perl_sv_2mortal IO.o
Perl_newRV IO.o
Perl_na IO.o
Perl_do_open IO.o
Perl_sv_2io IO.o
Perl_sv_setsv IO.o
Perl_sv_yes IO.o
Perl_sv_grow IO.o
Perl_sv_newmortal IO.o
Perl_gv_stashpv IO.o
Perl_sv_2iv IO.o
Perl_stack_sp IO.o
Perl_sv_bless IO.o
Perl_sv_undef IO.o
Perl_sv_setiv IO.o
Perl_stack_base IO.o
Perl_newSVpv IO.o
Perl_markstack_ptr IO.o
Perl_newSViv IO.o
Perl_newGVgen IO.o
Perl_sv_setpvn IO.o
main \
/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.4/2.7.2.1/crt1.o
perl_get_sv IO.o
Perl_croak IO.o
Perl_sv_2pv IO.o
ld: fatal: Symbol referencing errors. No output written to\
blib/arch/auto/IO/IO.none
make: *** [blib/arch/auto/IO/IO.none] Error 1
------------------------------
Date: 20 Mar 1997 00:00:41 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Need help substituing multiple lines in file
Message-Id: <5gpun9$q8m@news-central.tiac.net>
In article <5gmeqp$n13@senator-bedfellow.MIT.EDU>,
Michael Genrich <mikeg@mit.edu> wrote:
>I'm having trouble with a simple substitution script that will replace
>a certain block of text in a file with another block of text. My script
>is as follows:
>`/usr/local/bin/perl -pi -e 's/\Q$nuke\E/\Q$pave\E/gm' $ARGV[0]`;
If you set the input record separator to "" then the -p processing happens
on paragraph-like fragments rather than lines, and if it's undef then you
slurp input files in one (possibly large) chunk. According the the 2nd
Edition of Programming perl -00 as a command-line switch will effectively
do $/ = "" and -0777 effectively does $/ = undef.
Remember to think about what $, ^ and . mean if you use patterns once you
have multiple lines in $_
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com | Pencom Systems Administration (work)
------------------------------
Date: Wed, 19 Mar 1997 17:14:59 -0700
From: "Jerry L. Gubka" <jlguru@cris.com>
To: Donovan Janus <donovan@zaak.nl>
Subject: Re: ODBC package problem
Message-Id: <33308182.4AF7@cris.com>
Donovan Janus wrote:
Hi
I am trying to connect to an SQL server with the Win32::ODBC module.
I have Perl 5 build 110, version 5.001 on a Windows NT 4 server.
My systemadministrator installed all the files (well, the .pm and
the
.pll files) into the right directories and when I want to connect to
my SQL with the following code:
use Win32::ODBC;
$Data = new Win32::ODBC("DSN=DeZaak;UID=MyName;PWD=MyPassWord");
($qualifier, $owner, $name, $type) = $Data->Catalog("", "", "%",
"'TABLE'");
$Data->Close();
I get the error:
Can't call method "Catalog" without a package or object reference at
line 3.
When I ran the test.pl which comes along with the Win32::ODBC module
I
do get the DSN name and all other bits of pieces which shows
evidence
that there is a connection the ODBC manager.
I need some help on this urgently and I have been browsing the web
(http://www.perl.org, www.perl.com, www.hip.activeware.com etc.) and
although they all showed me what to do, none of them gave a solution
to this error.
Many thanks in advance,
Donovan Janus
janus@zaak.nl
BTW, I already ordered the book "WWW database Programming for
Windows
NT" and I also have the "WWW database developers guide" and the last
one doesn't has anything on the subject and the first one hasn't
arrived yet nor will for the next 3 weeks.
Go here and read the first problem description ...
http://www.roth.net/odbc/odbcfaq.htm#CommonErrors
It cured a similar problem I was experiencing. The Perl installation
routine didn't set the registry items correctly for me.
Live long, and prosper
Jerry L. Gubka
------------------------------
Date: Thu, 20 Mar 1997 11:25:09 +1000
From: Rodos <rodos@haywood.org>
To: Dan Sumption <dan@gulch.demon.co.uk>
Subject: Re: Parsing html tag attributes & values in Perl
Message-Id: <333091F5.2CFF@haywood.org>
Dan Sumption wrote:
> Below, I present my final (for now) version. I added a couple of
> configuration variables, so you can either use it the obvious way or
> the way I wanted it originally. Due to the haphazard way in which I
> learned perl, the code is probably fairly sloppy - if anyone spots any
> obvious flaws in the way I'm doing things, please please let me know
> OK, so here, for anyone interested, is the code to return an
> associative array of attributes and their values, given an html tag:
On the performance side you test for the trailing > character and
terminate from within the while loop. Would it be better to do this up
front (like the previous version) and save one test for each interation.
Whats the main reason for changing the previous attribute=value parsing
to the new one? Was it to support the new options, it seams more
complicate (or maybe it is just my lack of sleep :-).
Now that we have a tag parse routine how about one to take a file and
break it into tag and text, parseTag can then be used to parse each tag.
I have the following object that does it but I now know that it will
screw up on tags that contain > or < inside quotes. I would also like to
make it as fast as possible! It should not modify the file in any way,
so dumping the parsed output to a file should match the original file
(newlines and all).
Any alternative solutions or improvements on this one?
#############################################################################
# Object : HTMLParser
#
# Methods : HTMLParser(<text>) Constructor. Pass text to parse
# NextChunk Returns the next chunk from the
text
# GetPage Returns whatever is left of the
page
package HTMLParser;
sub new { # Constructor
my $self = {};
bless $self;
$self->{'thePage'} = $_[1];
return $self;
}
sub NextChunk {
my $self = shift;
my ($level, $bit, $chunk);
# Break the bage down into matching < and >'s and return each chunk
as required.
# A chunk may be a tag or clear text
#Is there anything left to process?
if ($self->{'thePage'} eq "") {return undef;}
$level = 0;
$chunk = '';
# Make sure we are starting with the <
$left = index($self->{'thePage'},'<');
if ($left > 0) {
$chunk = substr($self->{'thePage'},0,$left); # Get the big
chunk
substr($self->{'thePage'}, 0, $left) = ''; # Remove it
#$main::chunkSaves += $left;
return $chunk;
}
while ($self->{'thePage'} ne '' ) {
# Lets find and jump to the next < or >
$right = index($self->{'thePage'},'>');
$left = index($self->{'thePage'},'<');
$left = ($left < $right) ? $left : $right;
if ($left > 0) {
$chunk .= substr($self->{'thePage'},0,$left); # Get the
big chunk
substr($self->{'thePage'}, 0, $left) = ''; # Remove it
#$main::chunkSaves += $left;
}
$bit = substr($self->{'thePage'},0,1); # Get next character
out of file.
substr($self->{'thePage'}, 0, 1) = ''; # Replace the first
character
# with nothing, a reverse chop
# If we find a start increment the level
if ($bit eq '<') { # Start of tag
if ($level == 0) {
# If there is clear text in chunk return it otherwise
just keep processing
# so that this tag is extracted and then returned at the
>
if ($chunk ne '') {
$self->{'thePage'} = $bit . $self->{'thePage'}; #
Put the < back
return $chunk;
}
}
$level += 1;
}
if ($bit eq '>') { # End of tag
$level -= 1;
if ($level == 0) {
$chunk .= $bit; # The > is part of this chunk
not the next one
return $chunk;
}
}
# We are in the middle of either a tag so keep adding it on
$chunk .= $bit;
}
# Hit the end of the page, return whatever was left.
return $chunk;
}
sub GetPage { # Return whatever is left of the page
my $self = shift;
return $self->{'thePage'};
}
sub AddChunk {
# Add a chunk onto the start of the page so it can be processed.
# Used for putting back a comments content and parsing it
my $self = shift;
$self->{'thePage'} = $_[0] . $self->{'thePage'};
}
###### End of code
------------------------------
Date: Wed, 19 Mar 1997 17:21:28 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Jonny Birkelund <jonnyb@omni.uio.no>
Subject: Re: perl-binaries for aix1.3
Message-Id: <Pine.GSO.3.95q.970319172041.17596R-100000@kelly.teleport.com>
On 19 Mar 1997, Jonny Birkelund wrote:
> I'm looking for binaries for aix1.3
It's almost always better to compile Perl yourself. Have you tried? It's
easier than you might think. Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Wed, 19 Mar 1997 17:22:14 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: matgorl@chem.leidenuniv.nl
Subject: Re: perl-script doesn't run
Message-Id: <Pine.GSO.3.95q.970319172154.17596S-100000@kelly.teleport.com>
On Wed, 19 Mar 1997 matgorl@chem.leidenuniv.nl wrote:
> Subject: perl-script doesn't run
When you're having trouble with a CGI form in Perl, you should first look
at the please-don't-be-offended-by-the-name Idiot's Guide to solving such
problems. It's available on the perl.com web pages. Hope this helps!
http://www.perl.com/perl/
http://www.perl.com/perl/faq/
http://www.perl.com/perl/faq/idiots-guide.html
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Wed, 19 Mar 1997 16:21:34 -0800
From: Matt Riggsby <mriggsby@sybex.com>
Subject: Recognizing spaces
Message-Id: <3330830E.47C5@sybex.com>
I've written most of a subroutine that regularizes the width of an
incoming chunk of text. What it's supposed to do is to take the text
(which I'm calling $message), strip out any existing linefeeds, then
parse through the text and put in a \n after every word that takes a
line over a given number of characters (as the code fragment below
indicates, I'm trying to end up with lines not much over 60 characters
long). It works tolerably well except for one thing: it ignores one of
my conditions. Regardless of how I state it, it chops the text neatly
at 60 characters, usually in the middle of a word. I have tried
reordering the criteria, using different operators (e.g.: both
conditions joined by an "and"), and defining the blank space differently
(' ', the literal operator, and the whitespace operator have all failed
as well as the current design). I'm including the problematic fragment
below. Any ideas what I'm missing?
#After the text has been put safely into $message and the old
#linefeeds removed, initialize a counter that will keep track of
#the number of characters per line
$linecounter = 0;
#initializes the string that will eventually return the
#reformatted text
$final = "\n";
@chars = split(//, $message);
foreach $variable (0 .. $#chars) {
$final .= $chars[$variable];
$linecounter = $linecounter + 1;
#Check to see if the character is a space; this is where the
problem is
if ($chars[$variable] = " ") {
#If so, check to see if the line has passed 60 characters
if ($linecounter > 60) {
#If so, slap on a linefeed and start the next line
$final .= "\n";
$linecounter = 0;
}
}
}
#$message gets turned into $final out here somewhere, but that works
fine
------------------------------
Date: Wed, 19 Mar 1997 15:40:52 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Olivier Dehon <dehon_olivier@jpmorgan.com>
Subject: Re: Redefining character set matched by \w ?
Message-Id: <Pine.GSO.3.95q.970319153001.17596E-100000@kelly.teleport.com>
On 19 Mar 1997, Olivier Dehon wrote:
> I was wondering if it was possible in Perl to redefine the character set
> that is matched by \w.
Perhaps you're looking to include un-American letters with funny little
marks on them? :-) That's handled in the upcoming 5.004 with locale
support. See the docs for 5.003_93 if that's what you're interested in.
On the other hand, maybe you want to match arbitrary characters. For that,
you must use a character class, or something equivalent. Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Wed, 19 Mar 1997 17:30:05 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Alex Schajer <schajer@dircon.co.uk>
Subject: Re: replacing et al
Message-Id: <Pine.GSO.3.95q.970319172313.17596U-100000@kelly.teleport.com>
On Wed, 19 Mar 1997, Alex Schajer wrote:
> How do I replace everything after a certain point.
> EG /this/that/then/this/replace.me
>
> How do I leave the this and thats and cut replace.me
Do you want to extract or delete the text at the end? Or to extract or
delete text after a certain string or pattern or number of characters or
repetition of phrases? I find your request somewhat ambiguous! :-)
If this example doesn't help, maybe a more concrete example would be good.
$foo = "I like apple pie and applesauce, but not green apples.";
$count = 0;
$foo =~ s/apple/ ++$count == 3 ? "lime" : "apple" /ge;
print "$foo\n";
Good luck!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: Thu, 20 Mar 1997 00:29:45 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Signaling a child process
Message-Id: <E7BG1M.Gv5@bcstec.ca.boeing.com>
In article <E798pH.MHq@bcstec.ca.boeing.com>,
Charles DeRykus <ced@bcstec.ca.boeing.com> wrote:
>
>2. The parent blocks very early on the waitpid call and
> will just restart if there's a signal interrupt. I
>
not true - apparently only 4.2BSD automatically restarted waitpid
after a signal interrupt. Other systems don't restart or
make restarts optional.
HTH,
--
Charles DeRykus
ced@carios2.ca.boeing.com
------------------------------
Date: 19 Mar 1997 23:21:05 GMT
From: "R. Vince" <rvince@sprynet.com>
Subject: simple counter
Message-Id: <01bc34bc$2754dbe0$b6c0a6cf@isjfvklh>
Can anyone send me a simple perl 5 counter....I'm just looking for
something really simple, more as a learning tool. thx, Ralph
------------------------------
Date: Fri, 14 Mar 1997 21:31:45 -0500
From: Alicia Carla Longstreet <carla@ici.net>
Subject: Re: Unix and ease of use (WAS: Who makes more ...)
Message-Id: <332A0A11.2804@ici.net>
Mikko Rauhala wrote:
> M. Prasad wrote:
> >of use has not been the strong suite of Unix. Granted,
> >modifying text files automatically and sending out an
> >"AT" and listening for "OK", sounds like trivial
> >programming tasks. But in the PC world, it is a trivial
> Gee, I haven't done this for my Linux systems when I've installed modems
> and by golly, they do seem to magically work.
Really, you just installed it and it worked, you didn't have to update a
device description file, to tell Linux about the new modem? You either
have plug `n play support or the support for your modem was already
established.
> Oh, I did have to set the serial port IRQ once, since I use IRQ 7. Still,
> that's something that can't really be reliably detected.
That's nice, but I don't even have to do that, Windows 95 automatically
assigns IRQ's and other resources at boot up time. Devices like my
modem can be 'told' by Windows what resources they are going to use,
older devices (without plug `n play support) need descriptions, e.g.
Windows has to be told what resources that are configured to use.
In any event, your last statement sounds like you have created some type
of device description file and all you have to do, when you change
modems, is make the proper adjustments on the modem card. What would
you need to do if you had to insert another device that 'insisted' on
using IRQ 7?
--
********************************************
* Alicia Carla Longstreet carla@ici.net
********************************************
Lord give me the serenity to accept the things I cannot change
Lord give me the strength the change the things I can change
And Lord give me the wisdom to recognize the difference.
------------------------------
Date: Wed, 19 Mar 1997 17:06:22 -0600
From: Rob Huffstedtler <rob@netcentral.net.no.spam>
Subject: Re: Unix vs WIN95 equivalents
Message-Id: <3330716E.18B08006@netcentral.net.no.spam>
I had the same problem back when I was trying to go through the llama
book. I couldn't find any key combination that functioned as end of
file.
You could put the thing in a loop and test each element as you get it.
If it matched a pre-defined EOF marker, you could use a last to end the
loop. If you do that, make sure you lose that element.
However, in the year or so since, I have never had to take an array from
STDIN in the real world, so it's not that big of an issue.
A better alternative would be to install Linux on a separate partition
anyway.
Malcolm Cifuentes wrote:
>
> In article <332C55D8.5CAC@worldnet.att.net>,
> Mark Miller <M.P.Miller@worldnet.att.net> writes:
> >I am using the llama book and am having difficulty finding any kind of
> >documentation explaining equivalent keystrokes between Unix and WIN95. As an
> >example, on page 65, it explains how to end a manually entered array: press
> >"Control-D" and then the script will continue. This combination does not work
> >in WIN95. Instead, I've had to use the following:
> >
>
> Have you tyried "Control-Z", I know this has the same effect as "Control-D"
> for some applications between unix and 95.
>
> mal
------------------------------
Date: Wed, 19 Mar 1997 18:01:02 -0600
From: "Dennis Weldy" <dmweldy@no-junk-mail.ingr.com>
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <01bc34c1$71f84600$12938781@weldypc>
Novell has since abandoned the project and sold Unix to the Santa Cruz
Operation.
This happened at least a year ago, maybe more.
Also, you left off "complement" in the sense of one or two's complement
notation.
"To negate a value in two's complement notation, you complement (toggle the
status of the bits) then add one." ;-)
Dennis
Alicia Carla Longstreet <carla@ici.net> wrote in article
<332A07CA.3949@ici.net>...
> Curt Vendel wrote:
> >
> > Thats a popular Microsoft PR propaganda. NT made its way into a lot
of
> > Novell shops, but either to compliment the Novell Network or as a
>
> I can see it now, the Windows NT Server continously telling the Novell
> Server how beautiful it is. I think you mean complEment. See below.
>
> > seperate network, I've seen it replace Novell only in Novell 3.x sites,
> > most 4.x sites are remaining Novell and going to IntraNetware and those
> > sites that went from 4.x to NT went right back to 4.x after seeing how
> > sloppy Domains & Trusting is. However this may all change when NT 5.0
> > arrives with its DSS (a Novell NDS clone) and NT finally has a
directory
> > tree. Novell has been really shinning lately with its products,
> > however its next two releases: IntraNetware II and III are being
delayed
> > and that may spell serious trouble.
>
> Actually, didn't Novell get really smart a couple of years ago and buy
> Unix from AT&T? In any event, they are supposedly perfecting a product
> called Unixware, which will be a Unix Server OS with built-in Netware
> support. It will make a terrific Server.
>
> --
> ********************************************
> * Alicia Carla Longstreet carla@ici.net
> ********************************************
> Lord give me the serenity to accept the things I cannot change
> Lord give me the strength the change the things I can change
> And Lord give me the wisdom to recognize the difference.
>
> Usage Note: Complement and compliment, though quite distinct in meaning,
> are sometimes confused because they are pronounced the same. Complement
> means "something that completes or brings to perfection": The antique
> silver was a complement to the beautifully set table. Compliment means
> "an expression or act of courtesy or praise": They gave us a compliment
> on our beautifully set table.
>
------------------------------
Date: 20 Mar 1997 00:16:27 GMT
From: randy@byz.org (Randy)
Subject: X11::Fvwm 0.1 available
Message-Id: <5gpvkr$j48$1@nadine.teleport.com>
Keywords: fvwm module alpha Perl
Version 0.1 of X11::Fvwm has been uploaded to PAUSE, and should propagate to
CPAN servers over the next few days.
When available at CPAN, you can find it as:
$CPAN/authors/id/RJRAY/X11-Fvwm-0.1.tar.gz
Until then, there is a brief page about the module at:
http://www.byz.org/~randy/perl/X11::Fvwm
this page does include the man page for the module, and a snapshot of a
sample Tk-based application. In a day or two, links to directly retrieve
the package through CPAN will be added.
This is an alpha release. Not all planned features are in, not all data
packet types are yet correctly identified and dissected. The interface
style andoverall functionality are still subject to drastic change before
this moves into beta.
>From the README file for 0.1:
X11::Fvwm version 0.1 (alpha 1)
WHAT IS IT?
This is a Perl 5 extension to simplify writing Fvwm2 modules in Perl 5. Not
only in Perl 5, but with the Tk extension as your GUI library!
This requires fvwm 2.0.45 or better, and perl 5.002 or better. It is very
highly recommended that you also install the latest version of Tk (which is
Tk400.202 as of this writing), also available from CPAN.
WHAT DOES IT DO?
Fvwm2 has a very well-defined module API, to allow the brunt of non-core
window-manager work be done by external modules. X11::Fvwm is a layer over
this interface, allowing you to use Perl rather than C as the language for
developing these modules.
When fvwm launches a module, it sets up file descriptors for two-way
communication, and proceeds to occassionally broadcast data packets to
those modules that have asked to receive the given data type. The modules,
in turn, can send commands back to fvwm, including requests for more (and
more specific) data, operation on windows managed by fvwm, etc.
PROBLEMS/BUG REPORTS
Please send any reports of problems or bugs to randy@byz.org. I wouldn't
mind a short note to know that you're using this, just so I can justify its
continued development :-).
CREDITS AND LICENSES
This package is copyright (c) 1997 by Randy Ray (randy@byz.org) and may be
distributed under terms of the Artistic License used to cover Perl itself.
See the file Artistic in the distribution of Perl 5.002 or later for details
of copy and distribution terms. All rights reserved.
--
^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
randy@byz.org http://www.byz.org/~randy/
"Sometimes I think the surest sign that intelligent life exists elsewhere in
the universe is that none of it has tried to contact us." --Calvin
------------------------------
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 147
*************************************