HDTenEightyP/NetNews huggingface dataset:
From: dem@cs.princeton.edu (Doron Meyer)
Subject: Re: Camel Book for 5.xxx hardback?
Originator: dem@elan
Organization: Princeton University Computer Science Department
Date: Fri, 4 Sep 1992 06:59:32 GMT

In article <1992Sep1.013209.2058@uvaarpa.Virginia.EDU> mmorse@z.nsf.gov writes:
>Do you have a copy from the first printing?  There was a problem with
>pages falling out.  I wrote to the publisher and they sent me a new
>copy, which seems much more durable.  (I don't think they'll kill me
>for posting this--they seem to be genuinely concerned that buyers are
>happy with their books.)  I agree with Randall (or is it Randal?) that
>soft cover is plenty good for *any* computer book--systems don't stay
>around long enough to wear out a hard back.
>
>- --Mike

I would have to wholeheartedly disagree.  I bought copy of K&R 2 a few
years ago in hardback around the same time my friend bought the
softcover version.  Mine is still in good condition, while his is
falling apart.  If a Fortran has lasted until now, I think my book
will fall apart before ANSI C does.

Doron
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: fast way to get number of elements in an assoc array?
Originator: tchrist@pixel.convex.com
Date: Thu, 27 Aug 1992 15:28:38 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of meissner@osf.org (Michael Meissner):
:In article <1992Aug27.032106.20515@CS.ORST.EDU> jacobsd@prism.cs.orst.edu (Dana Jacobsen) writes:
:
:| 
:|   Is there a function akin to $#array that works on associative arrays?
:
:	int (scalar (%array))

Um, that doesn't tell you how many keys are in the array, just 
how full the hashtable is.  You have to do something more like

    $count++ while each %array;

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist

    char program[1];        /* Unwarranted chumminess with compiler. */
        --Henry Spencer in his regcomp.h regular expression lib
From: exubho@exu.ericsson.se (Blake Holman)
Newsgroups: comp.lang.perl
Subject: Sendmail rewriting rules in Perl?
Date: 29 Aug 92 01:32:16 GMT
Reply-To: exubho@exu.ericsson.se (Blake Holman)
Organization: Ericsson Network Systems, Inc., Richardson Texas


I would like to have a perl script use sendmail.cf as input and
use the sendmail rewriting rules to tell me some information about
the to and from entries in my syslog from sendmail.

Has anyone out there done anything like this?

Ideally, I would like to be able to pull out the to and from mail
addresses, put them through the rewriting rules and determine if
the mail would be sent within my domain or my root domain, or 
whether the mail would be sent external to my companies root domain.

Many thanks in advance.

Blake Holman
Ericsson Network Systems, Inc.
Richardson, Texas
(214) 997-6784
Newsgroups: comp.lang.perl
From: jhd@irfu.se (Jan D.)
Subject: Update FAQ? Was: fast way to get number of elements in an assoc array?
Date: Fri, 28 Aug 1992 07:50:21 GMT
Organization: Swedish Institute of Space Physics, Uppsala, Sweden
Keywords: associative array number count $#array $#

In article <BtnIDn.390@news.cso.uiuc.edu> ejk@ux2.cso.uiuc.edu (Ed Kubaitis - CCSO) writes:
>jacobsd@prism.cs.orst.edu (Dana Jacobsen) writes:
>  |
>  |  Is there a function akin to $#array that works on associative arrays? I
>  |have an associative array with over 30,000 keys, and this is what I'm 
>  |currently doing:
>  |
>  |    @dummykey = keys(%records);
>  |    print $#dummykey+1, " records loaded.\n";
>  |    undef (@dummykey);
>  |
>  |  The problem with this is that the key list takes up a significant chunk of
>  |memory, as well as being very slow.  The alternative way of handling this is
>  |to keep a seperate variable that contains the number of elements in the 
>  |array...
>
>From perl 4.0 patch #20: 
>
>  |Subject: scalar keys %array now counts keys for you
>
>So 'scalar(keys(%records))' or '$nkeys = keys(%records);' should work on 
>perl beyond 4.019. Don't know how fast it is on large arrays, though.
>

Hmm, looking at the source, it looks as if this is the way to go.
keys(%records) in scalar context (or values(%records) for that matter)
does NOT make a temporary array and then returns the length of the array (which
I thought it did).
It just counts the entries in %records. I can't imagine anything being faster.

This feature isn't mentioned in the manpage though.

So '$nkeys = keys(%records);' is the way to go.

Maybe update FAQ on this (if not already done)?

	Jan D.


Newsgroups: comp.lang.perl
From: asherman@laser.fmrco.com (Aaron Sherman)
Subject: Re: how to 'write' cr-nl
Reply-To: asherman@fmrco.COM
Organization: I-Kinetics, 19 Bishop-Allen Dr., Cambridge, MA
Date: Tue, 1 Sep 1992 14:14:15 GMT


>>>>> watson@carssdf.UUCP (- Self Empl. Sys.Integrator) said:

watson> Is there an easy way to write CR-NL at the end of the lines
watson> instead of just "\n".  Sort of like  $\ = "\r\n", except make
watson> it apply to the write statement?

What's wrong with:

format STDOUT =
@<<<<<<<<<<<<<<<<<< Test: @>>>>>>>>>>>> ^M
.

Does this do something that I'm not expecting?

--
--------
Disclaimer: I am solely responsible for the content of this message.
The views expressed here may not be the views of I-Kinetics, Fidelity,
any of the Fidelity-owned corporations or my mother.
Newsgroups: comp.lang.perl
From: doi@jrd.dec.com (Hitoshi Doi)
Subject: Re: Looking for MS-DOS port of perl?
Organization: DEC Japan Research and Development Center
Date: Mon, 31 Aug 1992 00:18:35 GMT

In article <5211@blue.cis.pitt.edu.UUCP>, rm55+@pitt.edu (Rudolph T Maceyko) writes:
# In article <1992Aug26.181425.543@ccu.umanitoba.ca> rahardj@ccu.umanitoba.ca (Budi Rahardjo) writes:
# >albert@INSL.McGill.CA (Albert Pang) writes:
# >...
# >>Is anyone who has perl executable and are willing to share it with the
# >>rest of the world.  It will be much appreciated.
# >
# >Try anonymous fto to ftp.ee.umanitoba.ca:/pub/msdos/perl
# 
# NOTE: perl386.zoo (which is perl-4.035) still has some problems, like
# 
# 	while (<>)
# 
# not working (when it worked just fine with perl_exe.zoo (perl-4.019), and
# not being able to set $~ to anything other than the name of a file handle
# and still get output...

I'm working on building perl 4.035 with a more recent version of DJGPP.
I hope some of these problems get fixed.
--
Hitoshi Doi, International Open Systems Engineering        doi@jrd.dec.com
Japan Research and Development Center               decwrl!jrd.dec.com!doi
Digital Equipment Corporation Japan          [from Japan: doi@dec-j.co.jp]
Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: Why doesn't this work?
Organization: Motorola Codex, Canton, Massachusetts
Distribution: usa
Date: Wed, 2 Sep 1992 23:24:07 GMT

@prism.cs.orst.edu writes:

>Why doesn't this work?

>   while ( ($eval) = ($path =~ /(\`.*\`)/) ) {
>      $val = "";
>      if ( $eval ) {
>         $val = eval( $eval );
>         chop $val;
>      }
>      $path =~ s/$eval/$val/;
>   }

[...]

>  DB<5> p $eval
>`echo David D. Perkins--071160 | cut -f1 -d-`

In s/$eval/$val/, the value of $eval is used as a regular expression.  So,
you're trying to match either "`echo David D. Perkins--071160 " or " cut -f1
-d-`".

You should be able to get away with this:

      $path =~ s//$val/;

(From the manual page: "If the PATTERN evaluates to a null string, the most
recent successful regular expression is used instead.")

Otherwise, you could do this:

      $eval =~ s/\W/\\$&/g;	# escape any special RE characters.
      $path =~ s/$eval/$val/;

Or this:

      substr($path, index($path, $eval), length($eval)) = $val;

Or use the /e modifier, and replace the whole loop with this:

      $path =~ s/`[^`]*`/chop($val = eval($&)); $val/eg;

(You'll probably want to use /`[^`]*`/ instead of /`.*`/.)

Michael.
Newsgroups: comp.lang.perl
From: mab@wdl39.wdl.loral.com (Mark A Biggar)
Subject: Re: Fast String Operations?
Organization: Loral Western Development Labs
Date: Tue, 25 Aug 1992 21:59:59 GMT

In article <1992Aug25.151625.3134@IDA.ORG> rlg@IDA.ORG (Randy garrett) writes:
>I'm looking for the fastest way to perform the following operation.
>Basically, this is a conversion of one database format to another.
>If I have a NULL field, indicated by 2 pipe symbols next to
>each other, I want to insert either a -1 or a ~ between the 
>two pipes, depending upon whether the type of that field
>is a integer or a character.  I know the type of the field
>because I've already pre-filled that array with the correct
>types from the Data Dictionary (Thanks Sybase to Perl Interface!).

I probabily make more sense to use split for this, modifiy your code like so:

>#!/usr/local/bin/perl
># Walk thru a string; if find "||" insert either a ~ or a -1
># depending on value of @name 
>
>$string = "a|bcd||g||i|||";
>@name = (1,2,1,1,2,1,2,1);
>
>$count = 0;  # index into @name

@string = split(/|/,$string);
foreach $s (@string) {
	$s = ($name[$count++] == 1 ? -1 : '~') if $s eq '';
}
$string = join('|', @string);

>print "$string\n";

The foreach could be written as a grep() but I think this was is more
understandable.

--
Perl's Maternal Uncle
Mark Biggar
mab@wdl1.wdl.loral.com




Newsgroups: comp.lang.perl
From: bcutter@pdnis.paradyne.com (Brooks Cutter)
Subject: Re: Ordering indices based on their values
Organization: /etc/organization
Distribution: comp.lang.perl
Date: Thu, 27 Aug 92 22:31:42 GMT

In article <GLENN.92Aug26122420@capella.clsi.COM> glenn@clsi.COM (Glenn Boysko) writes:
>I was wondering if anyone knew of an efficient, simple way to produce an
>ordered array of indices whose order was based on their values.  

Well the way I chose wasn't particularly efficient, but it got the
job done and that's all I was after (or at least the first thing...)

I'm sure someone will point out that I'm doing it the hard way, but...

Basically this sorts the keys and goes through the list making
a second associative array with the data seperated by commas...

Then I go through the sorted list (which is sorted by the time the
call was open -- in reverse order in this example) and do the
necessary processing..


foreach $key (sort bynumber keys(%recdat'total_mins_open)) {
	$total_mins = $recdat'total_mins_open{$key};

	if ($report'time{$total_mins} eq '') {
#			print STDERR "Saving $key in report_time{$total_mins}\n";
			$report'time{$total_mins} = $key;
	} else {
#			print STDERR "Appending $key to report_time{$total_mins}\n";
			$report'time{$total_mins} .=  ",$key";
	}
}


foreach $keys (reverse sort bynumber keys(%report'time)) {
	@keys2 = split(',', $report'time{$keys});
	foreach $keys_ctr (0..$#keys2) {
		$key = $keys2[$keys_ctr];

		...code to access values by $key...
	}
}

and bynumber from the perl book...

sub bynumber { $a <=> $b; }


If anyone out there knows a better way, please speak up!


-- 
Brooks Cutter    (I: bcutter@pdnis.paradyne.com)
                 (U: ...uunet!pdn!pdnis!bcutter)
Unix System Administrator, Information Services
        AT&T Paradyne, Largo Florida
Newsgroups: comp.lang.perl
From: peter@merlin.acadiau.ca (Peter Steele)
Subject: Re: Simultaneous processes
Organization: Acadia University
Date: Thu, 27 Aug 1992 14:57:19 GMT

>>How does one set up simultaneous processes in perl? For example,
>>how would I translate the following into perl:

>>    ls -la > d1 &
>>    ls -la > d2 &
>>    ls -la > d3 &
>>    wait
>>    cat d1 d2 d3 > d4

>It would probably be enough to wait for them in the order they were started.
>For example, here's the logic from a script I use run parallel rsh's:

>foreach $host (@host)
>{
>    open($host, "rsh $host $command |") || die "popen";
>}
>foreach $host (@host)
>{
>    while (<$host>)
>    {
>        &do_something_with($_);
>    }
>    close($host);
>}

I don't know perl well enough to know if this will do what I want.
Full parallelism is needed as this script is intended to perform
disk I/O benchmarking. I decided to (gasp) hack something together
in C-shell. I've included it below; if someone wants to convert this
to perl or Bourne shell, I'd be interested in seeing it.

#!/bin/csh
# Usage: iotest drive1list drive2list
# The drive lists are comma-separated lists. This routine might be
# called using "iotest usr,var cs1,cs2,users". Output is collected
# in /tmp/final.results.

set dlist1=`echo $1 | tr ',' ' '`
set dlist2=`echo $2 | tr ',' ' '`
set size=$3

cp /dev/null /tmp/final.results

@ i=1
while ($i <= $#dlist1)
    @ j=0
    while ($j <= $#dlist2)
        @ b=1
        foreach d ($dlist1[1-$i] $dlist2[1-$j])
            benchmark $d >/tmp/results.$b &
            @ b++
        end
        wait
        cat /tmp/results.* >>/tmp/final.results
        echo '+++++++++++++++++++++++++++++++++++++' >>/tmp/final.results
        rm /tmp/results.*
        @ j++
    end
    @ i++
end

--
Peter Steele        Unix Services Manager            peter.steele@acadiau.ca 
Acadia Univ., Wolfville, NS, Canada B0P 1X0  902-542-2201  Fax: 902-542-4364
From: gc@bnl.gov (Graham Campbell)
Newsgroups: comp.lang.perl
Subject: SEGV in perl
Date: 25 Aug 92 18:53:19 GMT
Reply-To: gc@bnl.gov
Organization: Brookhaven National Laboratory

Why do beginners (like me) always cause trouble?

The following perl script causes perl to core dump with a SEGV on a Sun
running SunOS 4.1:

#!/bin/sh --  # wish i were perl
# set -vx
eval 'exec perl -d -S $0 ${1+"$@"}'
	if $running_under_some_useless_shell;
while (($key,$value) = each %ENV){
	print "$key";
	if ($key =~ /WAVE_.*/){
		delete $ENV{$key};
		print " deleted";
	};
	print "\n";
};
print "\nRecapitulating\n";
while (($key,$value) = each %ENV){
	print "$key\n";
}

And "perl -v" says:

This is perl, version 4.0
 
$RCSfile: perl.c,v $$Revision: 4.0.1.6 $$Date: 91/11/11 16:38:45 $
Patch level: 19
 
Can anyone enlighten me?

Graham
---
Graham
gc@bnl.gov
Newsgroups: comp.lang.perl
Subject: Re: select misses pending data on socket
From: dov@menora.weizmann.ac.il (Dov Grobgeld)
Date: Wed, 2 Sep 1992 12:29:37 GMT
Organization: Weizmann Institute of Science, Computation Center.

lwall@netlabs.com (Larry Wall) writes:
: In article <1992Aug31.201931.14111@uvaarpa.Virginia.EDU> dov@menora.weizmann.ac.il writes:
: : The print line of $rout shows that select reports that there is no data
: : to be read on the socket. How can that be?
:
: Because there isn't any data to be read on the socket.  It's already been
: read into the stdio buffers.
:
: Don't use select with <>.  Use sysread() or recv() instead.
:
: I suppose I really ought to make select work with stdio, but that can
: get gory...
:
: Larry

So many strange functions (select(), recv(), sysread(), fileno(), vec() )
to do the conceptually simple task of:

   "Check if there are apples under the tree, and if so, pick them,
    but don't hang around waiting for them to fall."

I'm used to it being very simple to implement well defined problems
like this in Perl (yes, I'm spoiled ;-), but this seems to be an exception.

It seems like the socket related functions, as opposed to the rest of
Perl, are just directly copied versions of the underlying Unix functions.
If socket support was provided in a different operating system, it
wouldn't map very well to these function names I believe.

Anyhow, I seem to have gotten to grips with these calls now and have
rewritten the client program from the Camel book without any forks.
Perhaps such a program should be included in the next version (generation)
of the (family of) Camel(s).

Just one more question about the sockets. How do I detect if the server
I'm connected to has closed down the connection?

  @apple= ("Just ","Another ","Perl ","Hacker,"); $tree=0; $branch=1;
  print while $_ = splice(@apple,$tree,$branch);

--
                                                        ___   ___
                                                      /  o  \   o \
Dov Grobgeld                                         ( o  o  ) o   |
The Weizmann Institute of Science, Israel             \  o  /o  o /
"Where the tree of wisdom carries oranges"              | |   | |
                                                       _| |_ _| |_

Newsgroups: comp.lang.perl
From: bruce@harry.ugcs.caltech.edu (Bruce J Bell)
Subject: how do you tell if a key exists?
Organization: California Institute of Technology, Pasadena
Date: Thu, 27 Aug 1992 04:45:38 GMT

My question is:  is there a straightforward way to tell if a
key exists in an associative array?

The problem is, an entry can exist whose value is undefined:
  $a{"key"}=69; undef $a{"key"}
or
  undef $x; $a{"key"}=$x

You can search for it:
  $a{"key"}
or delete it:
  delete $a{"key"}
but I don't know how you can tell the difference between an
undefined value copied from the array entry (key does exist)
and an undefined value you get because there's no such entry
(key doesn't exist).

Of course you could always check all the keys in the array,
one by one, but is there a way to avoid that?

Replies to me, please.


-- Bruce
Newsgroups: comp.lang.perl
From: jgd@acl.lanl.gov (Jerry G. DeLapp)
Subject: Re: coding style (was Re: Perl language formatting conventions?)
Reply-To: jgd@acl.lanl.gov
Organization: Advanced Computing Lab, LANL, NM
	<1992Aug25.214800.10825@netlabs.com>
	<1992Aug27.072110.24646@news.Hawaii.Edu>
	<1992Aug27.180029.19638@netlabs.com> <Btp60t.MLI@news.cso.uiuc.edu>
Date: Thu, 3 Sep 1992 22:57:43 GMT

>>>>> On Fri, 28 Aug 1992 14:10:05 GMT, ejk@ux2.cso.uiuc.edu (Ed Kubaitis - CCSO) said:

Ed> Alas, indentation is for people, not compilers.

Unless you've ever written code in OCCAM (transputer's base programming
language). Code blocks were indicated by indentation, and you were forced to
use exactly (blech!) two character indentation.
--

Jerry G. DeLapp -- ACL System Scientist -- (505) 665-4531 <jgd@lanl.gov>
Computing beyond the Bleeding Edge -- The Advanced Computing Laboratory
Newsgroups: comp.lang.perl
From: ggr@koonda.acci.com.au (Greg Rose)
Subject: Re: coding style (was Re: Perl language formatting conventions?)
Organization: Australian Computing and Communications Institute
Date: Mon, 31 Aug 1992 00:14:20 GMT

In article <1992Aug28.181821.9569@netlabs.com> lwall@netlabs.com (Larry Wall) writes:
>In article <FAIGIN.92Aug27141558@soldan.aero.org> faigin@aero.org (Daniel P. Faigin) writes:
>: On 27 Aug 92 18:00:29 GMT, lwall@netlabs.com (Larry Wall) said:
>: 
>: > You want religion, I got religion...
>: 
>: And you should never argue religion with the son of a preacher. :-)
>
>Yes you should.  :-)

Oh, come on, this isn't an argument...

--
Greg Rose                 Australian Computing and Communications Institute
ggr@acci.com.au                                              +61 3 282 2532
From: ericw@bach.amd.com (Eric Wedaa)
Newsgroups: comp.lang.perl
Subject: help with if ( ! $a =~ /##/ ) PLEASE!!!
Date: 27 Aug 92 20:02:55 GMT
Distribution: usa
Organization: Advanced Micro Devices, Inc.

Silly question of the day...  (And I know that 15 minutes
after I post this, and it goes out through the ether, I'll
probably figure it out myself.) 

I am having a h!@# of a time getting this code fragment to 
work:

if ( ! $a =~ /#/ ){
	some_random_bit_of_perl;
}

It never does anything!  What I want it to do is if $a does not 
have "#" in it, then it should do "some_random_bit_of_perl;"

What fundamental thing am I missing?

>>Ericw
--
Eric Wedaa  -  eric.wedaa@amd.com | Two more kinds of lies...
{ames apple uunet}!amd!ericw      |     Release Dates, and Benchmarks
Advanced Micro Devices, M/S 167 PO Box 3453 Sunnyvale, CA 94088-3453
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: merlyn@ora.com (Randal L. Schwartz)
Newsgroups: comp.lang.perl
Subject: Re: the official word from Tim O'Reilly (of OR&A) about hardcover Camels
Date: 1 Sep 92 16:03:39 GMT
Article-I.D.: romulus.MERLYN.92Sep1090332
Organization: Stonehenge Consulting Services; Portland, Oregon, USA

In article <1992Sep1.155206.900@sniap.mchp.sni.de> Mathias.Koerber@sniap.mchp.sni.de (Mathias Koerber) writes:
   Does OR&A consider taking mail-order orders, maybe even now? Or will I again have to
   find another supplier?

OR&A is forbidden by its contract with Addison Wesley from fulfilling
international orders.  You must find an Addison Wesley supplier near
you.

print "Just another Perl [book] hacker,"

--
Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
merlyn@reed.edu (guest account) merlyn@ora.com (better for permanent record)
cute quote: "Welcome to Portland, Oregon -- home of the California Raisins!"
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: nuther perl-idiom question..
Originator: tchrist@pixel.convex.com
Date: Wed, 2 Sep 1992 14:11:42 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of dhami@cs.ubc.ca (Mandeep S Dhami):
:>In Perl, one often writes:
:>    $x = $foo || "default";
:As long as you can be assured that $foo is not the string "0"!

Yes, well, I consider that false, as are defined nulls.  
I think as long as you're aware that it works this way,
it's ok.

How often do you say

    while (defined($_ = <>)) {
	
    } 

which you technically should lest the last line be a lone zero?

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist

    You want it in one line?  Does it have to fit in 80 columns?   :-)
                    --Larry Wall in <7349@jpl-devvax.JPL.NASA.GOV>
Xref: sparky comp.lang.perl:5561 fj.lang.perl:110
From: hanusj@storm.CS.ORST.EDU (Joe Hanus)
Newsgroups: comp.lang.perl,fj.lang.perl
Subject: Help with variable interpolation inside s///
Keywords: variable interpolation, substitution
Date: 27 Aug 92 20:37:37 GMT
Article-I.D.: CS.1992Aug27.203737.13356
Followup-To: comp.lang.perl
Organization: Computer Science Dept., Oregon State University
Originator: hanusj@storm.CS.ORST.EDU



I have written a short capitalization script that's not working. The
script assumes all words not found in a standard dictionary are proper
nouns.  Those found in the dictionary are capitalized by replacing
with the word from the dictionary. 

The line giving the problem is commented


Any help would be appreciated.
-------------------------------------------------------

#!/usr/bin/perl

# get exceptions...
open( CHANGES, "/usr/dict/words" );
@words = <CHANGES>;
close( CHANGES );


# now do the capitalization for each line of the input file...
while ( <> ) {

   # begin by assuming every word is a proper noun.
   # capitalize every word...
   tr/A-Z/a-z/;
   while ( ($firstletter) = /\b([a-z])/ ) {
      $firstletter =~ tr/a-z/A-Z/;
      s/\b([a-z])/$firstletter/;
   }

   # take care of the exceptions...
   foreach $word ( @words ) {
      # find the word without regard for case and replace
      # it with the word as it appears in /usr/dict/words.
      s/$word/$word/gi;   # this is the line that's not working.
      # It should find the word in $word regardless of case and 
      # substitute the word in $word as it was located in the 
      # dictionary


---------------------------------------




   # print the line...
   print;
}

------------------------------------------------------------------------------
Joe Hanus                            | E-MAIL hanusj@bionette.cgrb.orst.edu
Microbial Germplasm Database         |
Dept. of Botany and Plant Pathology  | Phone  (503)-737-5300
Oregon State University              | FAX    (503)-737-3045
Corvallis, OR 97331-2902             |
______________________________________________________________________________
   }
--