HDTenEightyP/NetNews huggingface dataset:
From: mbeattie@black.ox.ac.uk (Malcolm Beattie)
Newsgroups: comp.lang.perl
Subject: Re: Is this a bug...
Date: 16 Dec 92 12:43:40 GMT
Organization: Oxford University Computing Service, 13 Banbury Rd, Oxford, U
Originator: mbeattie@black

In article <1gi84dINNhcv@armory.centerline.com> thomaso@centerline.com (Thomas Andrews) writes:
>I posted this "bug" but I didn't get any response.  Here it is again.
>Anybody want to comment/explain.  I checked the Camel book, and there
>is no explanation there...
>
>It appears that calling a subroutine with no argument list is not the
>same as calling the subroutine with an empty argument list.  That is,
>	&foo();
>is different from
>	&foo;
>I could not find documentation for this in the camel book.  Is this
>a bug or a feature?
>
[example deleted]
>It would print a blank line...

RTFM.
Camel book, index on p.452: subroutine invocation, 135
p.135:
As an alternate (and preferred) form, you may call a subroutine by
prefixing the name with an ampersand: &foo(@args). If you aren't
passing arguments, you don't have to use parentheses. If you omit
the parentheses, no @_ array is passed to the subroutine.

--Malcolm

>--
>Thomas Andrews
>CenterLine Software


-- 
Malcolm Beattie <mbeattie@black.ox.ac.uk> | I'm not a kernel hacker
Oxford University Computing Services      | I'm a kernel hacker's mate
13 Banbury Road, Oxford, OX2 6NN (U.K.)   | And I'm only hacking kernels
Tel: +44 865 273232 Fax: +44 865 273275   | 'Cos the kernel hacker's late
From: mbeattie@black.ox.ac.uk (Malcolm Beattie)
Newsgroups: comp.lang.perl
Subject: Re: programming challenge
Date: 15 Dec 92 16:05:59 GMT
Organization: Oxford University Computing Service, 13 Banbury Rd, Oxford, U
Originator: mbeattie@black

In article <mcook.724208660@fendahl.dev.cdx.mot.com> mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
>Mike Stramba <stramba@zooid.guild.org> writes:
>
>>Ok, all you perl wizards out there.
>
>>This out'a be a snap for ya.
>
>> If I have the string :
>
>>          Exxxxppppppprrrrrrreeeeesssssiiiiiiiiioooooonnnnnnnnnsssssssss
>
>> and I want to kill the duplicated letters and end up with:
>
>>          Expressions
>
>You mean "Expresions", right?
>
>> Lets' see some of your elegant solutions !
>
>> Btw, this problem came up as a result of trying to edit a formatted man
>> page ... for guess what program ?  (starts with 'P ... ends with 'l')
>
>> Why am I editing a man page? ... because my computer, an Atari doesn't know
>> about them.
>
>> I'm interested in seeing solutions to the above, anyway.
>
>>Mike
>
[reply deleted]

The orginal post with the question hasn't reached here yet so
I'll reply to the reply. How about:

tr/\0-\377//s

or you can restrict the range if you wish. My first attempt
was to complement the null SEARCHLIST and do tr///cs in order
to save using \0-\377 but the complement is done before the
searchlist gets copied in place of the null replacelist.

A little further playing turned up the short incantation
tr/*//c
which turns all the characters in $_ into asterisks. Probably
useless but rather neat, I thought.

--Malcolm
-- 
Malcolm Beattie <mbeattie@black.ox.ac.uk> | I'm not a kernel hacker
Oxford University Computing Services      | I'm a kernel hacker's mate
13 Banbury Road, Oxford, OX2 6NN (U.K.)   | And I'm only hacking kernels
Tel: +44 865 273232 Fax: +44 865 273275   | 'Cos the kernel hacker's late
From: dansmith@Autodesk.COM (Daniel Smith)
Newsgroups: comp.lang.perl
Subject: switching off symtabs via %_foo assignments?
Date: 17 Dec 92 19:31:33 GMT
Organization: Autodesk Inc., Sausalito CA, USA


	Let's say you have some interactive Perl script, and you
want to have more than one instantiation [1] of it, but that you want
to do that within the same process...

[1] as in, you want to push a menu and use the same routines and all,
but have a unique set of variables for that "push"

	I've thought of going through something I'm writing and
putting "$instance_name'some_var" in place of "$some_var".  I don't like
that idea :-)

	I'm wondering if it's "safe" to swap "%_some_package" around.  Let's
say I fire off my script, and I'm in the "main" package.  So far so good...
Now before getting too far into the code, I say something like:

	eval "package instance_1";
	%_instance_1 = %_main;

	So now I'm in a "instance_1" context, right?  I think it means
that I just picked up the entire symtab from main (bear with me, I'm still
trying to figure this stuff out).  I think I get a benefit of not having
to change any code.

	If I now want an "instance_2", I suppose I could do:
	
	eval "package instance_2";
	%_instance_2 = %_main;

	or

	%_instance_2 = %_instance_1;

	to easily inherit what "instance_1" was doing...

	The tricky part (as if this isn't bad enough!) seems to be in
going from one instance to another.  I can't just say "package" again,
since it clobbers all of the vars in the package.  At this point I'm
starting to run out of steam (other than the idea of caching away the
symtab of an instance so that I can grab it back later).  I think
Tom C. has something like this going on in Plum for mail folders. I'm
thinking of applying it to pretty much the whole script though.  Any ideas?
I'm also somewhat concerned about how portable this might be.  A little
experimentation on a SPARC is fine, but I want to get a little feedback
about possible hiccups on other platforms.

				Daniel
-- 
     Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
	      Disclaimer: written by a highly caffeinated mammal
	    dansmith@autodesk.com            dansmith@well.sf.ca.us

Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: system() vs exec()
Organization: Motorola Codex, Canton, Massachusetts
Date: Fri, 18 Dec 1992 23:58:08 GMT

ram@eiffel.com (Raphael Manfredi) writes:

>>According to mcook@fendahl.dev.cdx.mot.com (Michael Cook):
>>>Besides, you've used @_ after you used local().  That's a Perl no-no.

[...]

>(Note: this is an implementation problem, not a conceptual one. I pointed that
>out to Michael in private e-mail and he replied that (paraphrasing) Perl
>was 'practical', not conceptual.)

What, you disagree?  There are many examples in Perl, perl, perL and PeRl
where things don't work the way you might think.  A big part of learning to
program in Perl is learning what *not* to do.  Of course, many languages have
this property.  (I said this in a private e-mail to Raphael...but who really
cares?)

Michael.
Newsgroups: comp.lang.perl
From: piet@cs.ruu.nl (Piet van Oostrum)
Subject: Re: programming challenge
Date: Mon, 14 Dec 1992 11:40:44 GMT
Reply-To: piet@cs.ruu.nl (Piet van Oostrum)
Organization: Dept of Computer Science, Utrecht University, The Netherlands

>>>>> Mike Stramba <stramba@zooid.guild.org> (MS) writes:

MS>  and I want to kill the duplicated letters and end up with:

I thought that 

s/(.)\1+/\1/g

would be a natural solution but perl complains
/(.)\1+/: regexp *+ operand could be empty

whereas in this case it cannot be empty. It looks like \<digit> refs should
inheruit attributes (e.g. HASWIDTH) from the referenced part.
By the way the following:

s/(.)\1{2,}/\1/g;

gives an interesting error message:

/(.)\1{2,}/: internal regexp foulup
-- 
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31 30 531806   Uucp:   uunet!mcsun!ruuinf!piet
Telefax:   +31 30 513791   Internet:  piet@cs.ruu.nl   (*`Pete')
From: ram@eiffel.com (Raphael Manfredi)
Newsgroups: comp.lang.perl
Subject: Re: system() vs exec()
Date: 17 Dec 92 18:36:47 GMT
Organization: Interactive Software Engineering, Santa Barbara CA

Quoting chip@tct.com (Chip Salzenberg) from comp.lang.perl:
>According to tchrist@convex.COM (Tom Christiansen):
>>    sub system { fork ? wait : exec @_ }
>
>What if fork fails?  Try instead:
>
>    sub system {
>        local($pid) = fork;
>        return undef unless defined($pid);
>        $pid ? wait : exec @_;
>    }

What if exec fails? Try instead:

    sub system {
        local($pid) = fork;
        return undef unless defined($pid);
        $pid ? wait : (exec(@_), exit 1);
    }

>Note that, for non-BSD systems, you should check for EINTR; changes to
>that effect are left as an exercise for the reader. :-)

Same comment holds.
-- 
Raphael Manfredi <ram@eiffel.com>
Interactive Software Engineering Inc.
270 Storke Road, Suite #7                      / Tel +1 (805) 685-1006 \
Goleta, California 93117, USA                  \ Fax +1 (805) 685-6869 /
Newsgroups: comp.lang.perl
From: mark@drd.com (Resident.Alien)
Subject: How to handle switches and args
Organization: DRD Corporation
Date: Wed, 16 Dec 1992 19:53:50 GMT

What's the current consensus and generally favored
method to handle switches and args to a script?


I'm improving a currently existing script which is wholly interactive
to take args so I can feed it things from my mail reader.

something like:

| dobug.pl -app foo -cat bar -topic 'This is the topic of this bug report'

Is there some generally approved package to handle such an animal?
-- 
mark.lawrence@drd.com                                     (918)743-3013
DRD Corp., 5506 South Lewis Ave., Tulsa, OK 74105         (918)745-9037 fax
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: unpack and shift idiom?
Originator: tchrist@pixel.convex.com
Date: Thu, 17 Dec 1992 00:18:10 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 jsparkes@bcars68a.bnr.ca (Jeff Sparkes):
:I'm reading binary data from a network stream.  I've accumulated the data in
:a variable called $data, and am taking it apart in chunks.  The code
:looks like:
:	@output = unpack("L4S6", $data);
:	$data = substr($data, 28);
:	@names = unpack("A20", $data);
:	???
:
:I'm concerned by the need to use a constant as the arg to substr, especially
:since I calculated it wrong the first time, and it took me a while to find.
:This gets especially hairy when I pull strings out of the data stream, since
:I don't know how many bytes to skip after unpacking A strings because some
:stripping occurs.
:
:Please tell me I'm missing something!

You might try using c2ph to generate all the constants for you.

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


    The steady state of disks is full.  --Ken Thompson
Newsgroups: comp.lang.perl,comp.databases.oracle
From: kstock@isfrance.encore.fr (Kevin Stock)
Subject: Oraperl patch 3 posted to comp.sources.misc
Keywords: Perl, Oracle, OCI, Oraperl, patch
Organization: Sterling Software
Date: Sat, 12 Dec 1992 20:14:01 GMT
X-Md4-Signature: 8a1c1b41f3cd823897da1f480f6caf07

Patch 3 for version 2 of Oraperl, a set of usersubs which allow Perl
to access Oracle databases, has been posted to comp.sources.misc. You
need Perl (v3.0.27 or better) and Oracle (including the Oracle Call
Interface) to build Oraperl. If you can build Larry's Curseperl, then
you can also build Coraperl, which is Oraperl with Curses.

Oraperl version 2 appeared as 5 postings in comp.sources.misc
volume 30, issues 87 to 91. Patch 01 appeared shortly afterwards
as issue 99, and Patch 02 as volume 32, issue 93.

	Kevin Stock
	kstock@encore.com
From: tal@Warren.MENTORG.COM (Tom Limoncelli)
Newsgroups: comp.lang.perl
Subject: Re: programming challenge
Date: 14 Dec 1992 16:44:53 -0500
Organization: Mentor Graphics -- IC Group
NNTP-Posting-Host: milk.warren.mentorg.com

In article <1992Dec14.185822.7058@wdl.loral.com> mab@wdl39.wdl.loral.com (Mark A Biggar) writes:

>but of course this doesn't really solve the 'Goofy' problem which doesn't
>have a general solution even with the addition of dictionary lookup because
>word pairs like 'met' vs 'meet'.  That problem looks like it take a full
>English understanding AI to solve.

Without an English dictionary it's not too difficult to solve one
simple case.  You can turn gggoooooofffyyy into goofy.  However you
can't turn ggggggggooooofyyyyyy into goofy.

Hint:  In the first case the repetitions are all multiples of 3.

Tom
-- 
Tom Limoncelli -- tal@warren.mentorg.com (work) -- tal@plts.uucp (play)
Reality is stranger than fiction #943247:  The IRS granted
ANS approval as a 501c3 "charity" on September 14, 1992.
Newsgroups: comp.lang.perl
From: chip@tct.com (Chip Salzenberg)
Subject: Re: In 5.0, are we gonna get...
Date: Tue, 15 Dec 1992 00:19:36 GMT
Organization: TC Telemanagement, Clearwater, FL

According to mab@wdl39.wdl.loral.com (Mark A Biggar):
>Larry has talked about adding a 'reduce' operator that calls a special
>sort like function (used $a,$b for arg passing) on each element of a
>list for doing summations like so:
>
>	$sum = reduce {$a+$b} 1,34,$x,45,-8,0.1;

Interesting.  That operation would be a generalization of join:

	$x = join(":", @foo);

and

        $x = reduce {$a.":".$b} @foo;

would be equivalent (though join would probably be much faster).
-- 
Chip Salzenberg at Teltronics/TCT  <chip@tct.com>, <73717.366@compuserve.com>
  "you make me want to break the laws of time and space / you make me
   want to eat pork / you make me want to staple bagles to my face /
   and remove them with a pitchfork" -- Weird Al Yankovic, "You Make Me"
Newsgroups: comp.lang.perl
From: sommar@enea.se (Erland Sommarskog)
Subject: Re: C comment parser?
Organization: Enea Data AB
Date: Sun, 13 Dec 1992 14:43:37 GMT

Michael Cook (mcook@fendahl.dev.cdx.mot.com) writes:
>I can give you an RE that'll work.  Here:
>
> s%/\*([^*]|\*+[^/*])*\*+/%%g

Nope. Won't work in all cases. Consider:

printf("/*");
.....
printf("*/");
-- 
Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se
From: nall@ibm12.scri.fsu.edu (John Nall)
Newsgroups: comp.lang.perl
Subject: Re: Followup:  Suggested reading
Date: 17 Dec 92 14:16:08 GMT
Reply-To: nall@ibm12.scri.fsu.edu (John Nall)
Organization: SCRI, Florida State University

In article <1goik4INNilh@matt.ksu.ksu.edu> holland@matt.ksu.ksu.edu (Rich Holland) writes:
>About a week ago, I posted the following to comp.lang.perl:
>
>] Anyone have any suggestions about which books/articles/papers I should be
>] reading as a beginning perl programmer?
>] to comp.lang.perl in a week or so.
>
>I only got one response, from stevel@autodesk.com:
>
>> The best reference around is:
>>
>> Programming Perl
>> Larry Wall and Randal Schwartz
>> O'Reilly & Associates
...

Since I didn't do a response, I suppose that I should not put in my two cents
this late in the game :-) but will anyway.

The best reference around is the perl manual (perl.man) which comes with the
source.  The book "Programming Perl" is great to read in order to understand what
it is that the perl manual is telling you.  Once you have the manual-reading down,
however, perlman is the best reference (IMHO).

By the way, a sincere tip of my cap to those early Perl programmers who *only*
had perl.man to use.  I tried it in the early days, and found it to be a bit too
cryptic (so went to ICON instead for text manipulation).  However, having now gone
through the Camel book (which certainly has its faults!), I use only perl.man for
reference.

John Nall

-- 
John W. Nall              | Supercomputer Computations Research Institute
nall@mailer.scri.fsu.edu  | Florida State University, Tallahassee, Florida
  "Why yes, as a matter of fact, I DID vote for Hillary!!" - me
From: faigin@aero.org (Daniel P. Faigin)
Newsgroups: comp.lang.perl
Subject: Re: Perl IV & V incompatibilities?
Date: 18 Dec 92 09:39:00
Organization: The Aerospace Corporation, El Segundo, CA
	<FAIGIN.92Dec17134910@soldan.aero.org>
	<MERLYN.92Dec18091127@romulus.reed.edu>
NNTP-Posting-Host: soldan.aero.org
In-reply-to: merlyn@ora.com's message of 18 Dec 92 17:11:33 GMT

On 18 Dec 92 17:11:33 GMT, merlyn@ora.com (Randal L. Schwartz) said:
> For those of you that don't know, Dan is the tale-spinner of the
> "history of Perl" in the Camel book.  He should know.

Additionally, I was the first person to be caught by a perl transition. You
see, I had written a whole batch of scripts in the first version of perl that
Larry made available on blackvax. These scripts went through a data dictionary
document and extracted out the data type definitions, topologocially sorted
them, and then produced a Pascal include file. Perl 0 used regular expressions
using the regular expression scanner that was in rn -- Larry believes in
software reuse -- which was originally based on some Emacs scanner. This was
the one in which you escaped the () to indicate grouping, i.e., 
	\(\d\d\d\)

etc.

Well, when Larry went to Perl 1, he put in the RE scanner we all know today --
without escaping. One day, Larry thought it would update the perl on blackvax
to the new version, which was now on sdcrdcf. He did. All my scripts broke.

To this day, I'm still not sure I found all the old scripts :-)

Daniel 
Perl's Paternal Godparent, or something like that (Mark's the Maternal one)

--
[W]:The Aerospace Corp. M1/055 * POB 92957 * LA, CA 90009-2957 * 310/336-8228
[Email]:faigin@aerospace.aero.org              [Vmail]:310/336-5454 Box#13149
		    "And as they say, the rest is compost"
From: thomaso@centerline.com (Thomas Andrews)
Newsgroups: comp.lang.perl
Subject: Is this a bug...
Date: 14 Dec 1992 15:10:05 GMT
Organization: CenterLine Software, Inc.
NNTP-Posting-Host: 140.239.2.21

I posted this "bug" but I didn't get any response.  Here it is again.
Anybody want to comment/explain.  I checked the Camel book, and there
is no explanation there...

It appears that calling a subroutine with no argument list is not the
same as calling the subroutine with an empty argument list.  That is,
	&foo();
is different from
	&foo;
I could not find documentation for this in the camel book.  Is this
a bug or a feature?

In particular, the following prints out "Just another Perl hacker,":

sub func {
	print join(" ",@_),"\n";
}

sub main {
	&func;
}

&main("Just","another","Perl","hacker,");

while if main were defined as:
 sub main {
	&func();
 }
It would print a blank line...
--
Thomas Andrews
CenterLine Software
From: utashiro@sran230.sra.co.jp (Kazumasa Utashiro)
Newsgroups: comp.lang.perl
Subject: Re: Perl-side globbing (was Re: Perl Shell...)
Date: 16 Dec 92 01:19:17 GMT
Organization: Software Research Associates, Inc., Japan

For your interest, here is my shell wildcard to regexp
subroutine.  This version works only for a filename (not a
path).  I wonder you call this simple or complex :-)

sub wildcard {
    local($_) = @_;
    s#\\?.#$_ = $&; s/\\?([_0-9A-Za-z])/$1/ || /\\./ || s/[*]/.*/ ||
	s/[|]/\$|^/ || tr/?{,}[]\-/.(|)[]\-/ || s/./\\$&/; $_;#ge;
    length($_) ? "^$_\$" : undef;
}

--utashiro
Newsgroups: comp.lang.perl
From: mike@r-node.gts.org (Mike Stramba)
Subject: Can I put a breakpoint in with a text editor?
Organization: R-node Public Access UNIX Information System (416-249-5366)
Date: Tue, 15 Dec 1992 09:33:14 GMT

I know I can do a 'c ###' to break at a line ### when in the debugger.

Can I put a 'breakpoint' in while editing the source, then run the debugger
and have it break like the 'c ###' command?

Mike

-- 
=====================================================================
Mike Stramba		Email: mike@r-node.gts.org
Toronto,Canada
=====================================================================
Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: array of file descriptors
Organization: Motorola Codex, Canton, Massachusetts
Date: Thu, 17 Dec 1992 20:41:41 GMT

fuat@news.ans.net (Fuat C. Baran) writes:

>Is there a way to store file descriptors (from an open()) in an array?
>I would like to open a set of files, store the open file descriptors
>in an associative array keyed by filename and be able to multiplex
>output to one of the files in a loop where for each line of output I'm
>given a filename.  I'd like to check if $filehandles{$filename} is
>defined and if not first open the file.

You can generate your own file handle symbols:

  $gensym = "fh0000";
  foreach $file (@file)
  {
     open(++$gensym, "<$file") || die "oops: $file, $!";
     $fh{$file} = $gensym;
  }

The trick is using the file handle with the <> operator:

  $_ = <$fh{$file}>;	# doesn't seem to work

  $tmp = $fh{$file};	# need an extra variable
  $_ = <$tmp>;

See also cacheout.pl.

Michael.
Newsgroups: comp.lang.perl
From: jon@cas.org (Jon Vander Hill)
Subject: Re: timing problem with $SIG{'CHLD'}
Organization: Chemical Abstracts Service, Columbus, Ohio
	<9234910.11586@mulga.cs.mu.OZ.AU>
Date: Mon, 14 Dec 1992 18:32:50 GMT

>>>>> On Sun, 13 Dec 1992 23:56:32 GMT, ggr@nareen.acci.COM.AU (Greg Rose) said:

> In article <9=h2hs#@rpi.edu> nobled@rebecca.its.rpi.edu (David Noble) writes:
>>    until ($addr = accept(NS,S))
>>	{ die $! unless $! eq 'Interrupted system call'; }
>>
>>Of course, this breaks if the text of the error message varies for
>>different platforms. In that case, you would have to check for any
>>variants on the interrupted system call message. Anybody know offhand
>>whether the text of $! is defined by perl or the operating system?

> My understanding is that the text of the error message comes from
> somthing that (eg. IBM) vendors often change, but the *NUMBER*
> associated with the error is defined by POSIX. So I always use

> sub EINTR { 4; }

> until ($addr = accept(NS,S)) {
> 	die $! unless $! == &EINTR;
> }

Even more portable would be:

require "errno.ph";  # assuming this has been added to your perl lib

$EINTR = &EINTR;     # this will fail if &EINTR is not defined

until ($addr = accept(NS,S)) {
  die $! unless $! == $EINTR;
}

Jon Vander Hill
jon@cas.org
From: eric@animus.Corp.Sun.COM (eric )
Newsgroups: comp.lang.perl
Subject: Re: Delete until pattern match
Date: 11 Dec 92 19:26:21 GMT
Organization: /home1/eric1/.organization
NNTP-Posting-Host: animus.corp.sun.com
In-reply-to: hans@symbas.UUCP's message of 11 Dec 92 18:46:09 GMT

In article <3722@symbas.UUCP> hans@symbas.UUCP (Hans Aafloy) writes:

  >    From: hans@symbas.UUCP (Hans Aafloy)
  > 
  >    I have some files in which I want to delete all lines until a
  >    certain pattern match. I know a couple of awkward ways to do it,
  >    ( using an array as temporary storage etc.) 
  >    but is there a quicker and more elegant solution ?
  > 
  >    Thanx for any hints - via e-mail please.
  > 
  >    Hans
  > 
  >    hans@symbas.lind.no 

I think this is exactly what I was just asking about a few message ago.  The
answer is:

  perl -ni.old -e 'print unless ( 1 .. /^---cut here---/ ); close(ARGV) if eof' file1 file2

What this does it go through all files ("file1", "file2", etc.), and
remove everything up to and including the pattern "---cut here---", and
rename the original file "file1.old", etc.

-Eric
Newsgroups: comp.lang.perl
From: dominic@onions.natcorp.ox.ac.uk (Dominic Dunlop)
Newsgroups: comp.lang.perl
Subject: In-place edit works on read-only files!!!
Date: 17 Dec 92 15:14:44 GMT
Organization: British National Corpus, Oxford University, GB
Originator: dominic@onions.natcorp.ox.ac.uk

If I
	perl -p -i -e 's/\bslug\b/snail/g' *.c

or whatever, it replaces files with edited versions thereof, even if
the files are read-only.  I know why this happens, and I know in-
place editing without back-ups is probably Not A Good Idea, but I'd
say it was slightly buggy behaviour.  What does anybody else think?

(FWIW, perl 4.035, SPARC, SunOS 4.1.1, Sun CC 1.1)

(No, I didn't lose any data.  I was mucking about with copies precious
files, not the real thing.)
-- 
Dominic Dunlop