HDTenEightyP/NetNews huggingface dataset:
From: sankar@hal.COM (Sankar Bandy)
Newsgroups: comp.lang.perl
Subject: perl does not treat # inside `` properly
Date: 15 Sep 92 17:52:29 GMT
Organization: HaL Computer Systems, Inc.
NNTP-Posting-Host: quality.hal.com


The perl language is supposed to provide shell syntax equivalence
within the `` characters. However I have seen that the # character
even within `` is not treated equivalently. e.g.

[sankar@quality]/users/halserv3-2/sankar/bin{156}cat $CVSROOT/CVSROOT/modules |grep - | grep -v #  
world           -a .
CVSROOT         -i mkmodules CVSROOT
modules         -i mkmodules CVSROOT modules
loginfo         -i mkmodules CVSROOT loginfo
commitinfo      -i mkmodules CVSROOT commitinfo
rcsinfo         -i mkmodules CVSROOT rcsinfo
editinfo        -i mkmodules CVSROOT editinfo
testmod -a testdir/new
bigmod -a testdir/new2
[sankar@quality]/users/halserv3-2/sankar/bin{157}%

However within perl the same thing does not work :
  DB<11> p `cat $cvsroot/CVSROOT/modules |grep - | grep -v #`

  DB<12> p `cat $cvsroot/CVSROOT/modules |grep -`
    #       key     -a    aliases...
    #       -i prog         Run "prog" on "cvs commit" from top-level of module.
    #       -o prog         Run "prog" on "cvs checkout" of module.
    #       -t prog         Run "prog" on "cvs rtag" of module.
    #       -u prog         Run "prog" on "cvs update" of module.
    #       -d dir          Place module in directory "dir" instead of module name.
    #       -l              Top-level directory only -- do not recurse.
    # The "-a" option specifies an alias.  An alias is interpreted as if
    # everything on the right of the "-a" had been typed on the command line.
    world           -a .
    CVSROOT         -i mkmodules CVSROOT
    modules         -i mkmodules CVSROOT modules
    loginfo         -i mkmodules CVSROOT loginfo
    commitinfo      -i mkmodules CVSROOT commitinfo
    rcsinfo         -i mkmodules CVSROOT rcsinfo
    editinfo        -i mkmodules CVSROOT editinfo
    testmod -a testdir/new
    bigmod -a testdir/new2
Newsgroups: comp.lang.perl
From: buus@spica.bu.edu (Bryan Buus)
Newsgroups: comp.lang.perl
Subject: Re: Camel Book for 5.xxx hardback?
Date: 9 Sep 92 19:24:20 GMT
Organization: Boston University Skateboarding Team
In-reply-to: dwells@cognet.ucla.edu's message of 8 Sep 92 19:02:08 GMT


> Yeah - mine started losing pages after 2 weeks.  I called them, and
> the new book will have a different binding.  Yea!

Yup, the latest printing has a paperback 'lay-flat' binding.. it's
really great.  I just wish that the new addition of MH-xmh had it too! :)

Bryan
Newsgroups: comp.lang.perl
From: dhami@cs.ubc.ca (Mandeep S Dhami)
Subject: Re: aub problem finding sys/socket.ph
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Date: Wed, 9 Sep 92 06:08:10 GMT

stantz@sgi.com (Mark Stantz) writes:

>
>             Running with '#!/usr/local/bin/perl -I <X>' doesn't help.
>

#! notation allows only ONE argument (for example you may use
-pi.bak but not -p -i.bak). This is the semantics of #! invocation
(at least on my system, SunOS) and has nothing to do with perl.
So, you may use -I<X> not -I <X>.

BTW, You may also use:
  push(@INC,'<X>') ;   # prefer default INC OR
  unshift(@INC,'<X>'); # prefer files in X

Mandeep
__________________________________________________________________
"I'm very brave generally," he went on in a low voice:
"only to-day I happen to have a headache."
                                      -- Lewis Carroll
__________________________________________________________________
Newsgroups: comp.lang.perl
From: bcutter@pdnis.paradyne.com (Brooks Cutter)
Subject: the chat2.pl answer...
Organization: AT&T Paradyne, Largo Florida
Date: Tue, 8 Sep 92 16:59:28 GMT

Yes, I never fail to amaze myself to the extent of how much I can
embarass myself in public...

As several people pointed out (Thanks merlyn@reed.edu, ckd@eff.org and
fenner@cs.psu.edu) The capability already exists in chat2.pl

(For those who don't know what I'm talking about, I asked about
opening a two way path of communication between a sub-process)

Thanks everyone for pointing out the obvious to me...

for my next question, I'd like to ask where the "any" key is...?

(Just kidding, no responses please... 8)


-- 
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
Subject: Re: SAS compared to Perl
From: russell@ccu1.aukuni.ac.nz (Russell Fulton)
Date: Sun, 13 Sep 1992 21:12:57 GMT
Organization: University of Auckland, New Zealand.

jfh@netcom.com (Jack Hamilton) writes:

>In article <hhg1-110992064042@132.197.14.85> hhg1@gte.com (Hal German) writes:
>>
>>This is the text version of a paper presented at the Boston Area SAS User's
>>Group recently. It will also be in the proceedings of the Northeast SAS
>>Users Group. Enjoy !

>I now do some things using perl on the PC that I would previously have
>done in SAS.  Both are useful.  Perl is faster and has better string
>manipulation capabilities; on the other hand, SAS has a lot of statistical,
>graphical, and data entry tools that perl doesn't.  Different tools for
>different jobs. 

>SAS's major usage base is still on IBM mainframes, I believe.  Has anyone

 Not any more I think, SAS runs on all sorts of systems from PCs to
mainframes. 

Apart from that I second Jack's comments. I too use both sas and Perl,
it is sometimes a toss up to decide which to use for a particular
application. Like Jack said SAS's strength is its statistical and
graphical capabilities. I also use SAS if the tables get really
complicated. 

Actually I often use a mixture of the two. Example:

For our network billing I use perl to analyse the raw email logs, reading
addressess and deciding if the address is local or not (using a
complicated list of regular expressions something that SAS can't do).
From these log files I produce a cleaned up file with a record for each
message that went off campus with all the data you would expect in a
sensible format. This file is then read by SAS along with ftp and telnet
logs and I then print the bills and produce other reports in SAS.



-- 
Russell Fulton, Computer Center, University of Auckland, New Zealand.
<rj_fulton@aukuni.ac.nz>
Newsgroups: comp.lang.perl
From: ckd@eff.org (Christopher Davis)
Subject: Re: REXX compared to perl
Organization: Electronic Frontier Foundation Tech Central
Distribution: comp
Date: Mon, 14 Sep 1992 15:11:33 GMT

PM> == Peter Mutsaers <muts@fysap.fys.ruu.nl> 

 PM> When reaeding 'SAS compared to perl' an article of M. Haley (spelled
 PM> correctly?) came to my mind; his articles are reprinted in a dutch
 PM> computer magazine. He stated that for all administration tasks one
 PM> should use REXX as it is the only one which is supported on all
 PM> platforms. 

Except for those platforms on which it's not supported.  And since it's
proprietary you have to *buy* the ports for many systems.  It does come
with VM/CMS though :-)

 PM> Now this person is quite biassed towards old fashioned (but proven)
 PM> technology which is used in financial and administrative environments
 PM> and I don't trust such statements a lot, but still I became curious
 PM> about it. Is REXX something similar to perl, and if so how do they
 PM> compare?

It's similar.  It's basically VM-PERL (hehe ;-) though it's been ported
to the Amiga and other systems.  It doesn't have anywhere near the
string-handling capabilities that perl does (I literally had to
implement rot13 by listing the entire alphabet 4 times, because it
doesn't support ranges).  It's used for a lot of the same sorts of
things perl gets used for, often by default, since it is the best/only
script language on many systems.
--
Christopher Davis   | ]CALL -151       
<ckd@eff.org>       | *300: 20 DD FB 60
System Administrator| *3D0G            
EFF +1 617 864 0665 | ]CALL 768        
Newsgroups: comp.lang.perl,alt.sources
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: change of email address ...
Date: 9 Sep 92 05:48:47 GMT
Organization: NetLabs, Inc.

In article <1992Sep8.202602.24413@maths.tcd.ie> robb@maths.tcd.ie (Robert Bashford) writes:
: mike@meiko.com (Mike Stok) writes:
: 
: >What is the perl-users digest?  What level of perl user is it aimed at?  Can
: >I try it for a while?
: 
: mee tooo.

Er, it's just comp.lang.perl, gatewayed to a mailing list for people
without USENET access.  If you're asking for it here, you either don't
want it, or you already have it...

Larry
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: problems opening a file read/write
Date: 9 Sep 92 16:23:22 GMT
Organization: NetLabs, Inc.

In article <1992Sep9.094428.16363@uvaarpa.Virginia.EDU> krm%pri-mu.LOCAL@pri-mu.prime.com writes:
: Hi net,
: 
: I tried the following small piece of code:
: 
: --------------------------------
: #!/bin/perl
: open(TEST,"+>tst")||die "open";
: while($_=<TEST>){
:    if (/add/){
:       chop ;
:       $_.="ADD\n";
:    }
:    print TEST $_ || die "print";
: }
: close(TEST) || die "close";
: --------------------------------
: 
: Now the problem:
: 
: If I use open with "+>filename", the file will end up empty.

That's because +> will truncate a file, just like >.  The + only opens
it for both reading a writing.  If you want to append to a file,
use +>>.

: If I use "+<filename", it will remain unchanged.

This is probably a buglet in your stdio.  Many versions of stdio require
a seek between reads and writes.  If you seek to the end of the file
it should append.

Larry
Newsgroups: comp.lang.perl
From: vsh@etnibsd.uucp (Steve Harris)
Subject: Religion (was: Re: coding style (was Re: Perl language formatting conventions?))
Organization: Eaton Corp, Semiconductor Equipment Div., Beverly, MA
Date: Wed, 9 Sep 1992 23:33:10 GMT

In article <1992Aug27.180029.19638@netlabs.com> lwall@netlabs.com (Larry Wall) writes:
>
>That probably just means I need to add a case statement to Perl.  But the
>minimalist in me rebels.  :-)
>
>You want religion, I got religion...
>
>Larry

Amen!

It seems that the Cannonical :-) perl style is most closely related to Hinduism --
consider the richness of its mythology and the seemingly endless scope of its pantheon, 
contrasted with the underlying principle that the multiciplicity of forms derives
from a duality which arises from a unity which emerges out of nothingness.

Who says you cannot be a minimalist and have a case statement too!

But what we really want to know is:  do your curlies cuddle up to your elses?
-- 
... Steve Harris - Eaton Corp. - Beverly, MA - uunet!etnibsd!vsh
From: peter@merlin.acadiau.ca (Peter Steele)
Newsgroups: comp.lang.perl
Subject: fork question
Date: 9 Sep 92 17:59:34 GMT
Organization: Acadia University

I have perl program that uses fork to create various child processes and
I want the parent program to wait until all child processes are complete.
Here's a cut down version of what I'm doing:

sub test1 {
    print "test1\n";
    sleep(2);
    print "Done test1\n";
    exit(0);
}

sub test2 {
    print "test2\n";
    sleep(4);
    print "Done test2\n";
    exit(0);
}

$| = 1;
print "Starting...\n";
fork && &test1;
fork && &test2;
print "Done.\n";
wait; wait;

When I run this program, I'd expect the to wait calls to wait for the
two child processes to complete. However, both of the calls return -1,
and the parent exits before the child processes are done. Observe:

merlin% testit
Starting...
test1
Done.
test2
Done test1
merlin% Done test2

Why are the wait calls not waiting?
--
Peter Steele        Unix Services Manager            peter.steele@acadiau.ca 
Acadia Univ., Wolfville, NS, Canada B0P 1X0  902-542-2201  Fax: 902-542-4364
Newsgroups: comp.lang.perl
From: asherman@laser.fmrco.com (Aaron Sherman)
Subject: a2p bug...
Reply-To: asherman@fmrco.COM
Organization: I-Kinetics, 19 Bishop-Allen Dr., Cambridge, MA
Date: Tue, 15 Sep 1992 20:35:56 GMT


I felt bad about posting an awk-2-perl bug to the perl newsgroup, so I
compromised....

The following *perl* script, on my machine:

	open(P,"|a2p|perl"); print P 'BEGIN{exit}';close P; # ;-)

yields:

	Bad label: line at - line 10.

A *perl* error message... ;-)

Stats:

	Sun 4 running SunOS 4.1.2
	perl v. 4.034 (a2p is from that version)

(Has anyone noticed that 4 is a rather magic number for software and
 hardware revs in the UNIX community these days?)

Also, could someone please send me the docs that Larry wrote on how to
get the patches by mail? Thanks.



			-AJS


open(P,"|a2p|perl");print P 'BEGIN{print"Just another perl wanabe!"}';close P;
--
--------
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: jhd@irfu.se (Jan D.)
Subject: Re: stupid questions : deleted ing leading spaces
Date: Thu, 10 Sep 1992 22:58:48 GMT
Organization: Swedish Institute of Space Physics, Uppsala, Sweden

In article <ASHERMAN.92Sep9160424@laser.fmrco.com> asherman@fmrco.COM writes:
>
>>>>>> jhd@irfu.se (Jan D.) said:
>
>jhd> chare@unilabs.uucp (Chris Hare) writes:
>
>>As a matter of of fact, if you can suggest a way to remove the leading
>>spaces, and compact multiple spaces any where else on the line to be one
>>space I'd appreciate it.
>>
>
>jhd> 	s/^ //;
>jhd> 	s/ +/ /g;
>
>jhd> If you want to replace general white space (i.e. tabs and space)
>jhd> you should say:
>
>jhd> 	s/^\s//;
>jhd> 	s/\s+/ /g;
>
>s/^\s+//;	# or s/^ +//; for just spaces.
>s/\s+/ /g;	# or s/ +//g; for just spaces.
>
>Otherwise:
>
>	"	   Hello, world!"
>
>turns into:
>
>	" Hello, world!"
>
>Not:
>
>	"Hello, world!"
>

Well, I was looking at Chris first sentence:

	I am running 4.035 and I need to delete a single leading space at the
	beginning of a line.

And while we are nit picking, your comment for the second
line is wrong :-) :-).

	Jan D.
Newsgroups: comp.lang.perl
From: pmoore@cix.compulink.co.uk (Paul Moore)
Subject: Re: Prompting for input
Reply-To: pmoore@cix.compulink.co.uk
Date: Tue, 8 Sep 1992 20:18:10 +0000


In his posting, James Gillespie says:
  > pause.  It appears to me that there must be something left
  > on STDIN as a result of entering the string "n\n", but I
  > can't find anything in the Camel book about such an
  > occurrence, or how to "suck" 
 
Er - what about the "\n"? getc only gets a single character.
 
Gustav.
 
------------------------------------------------------------------------
Paul Moore (pmoore@cix.compulink.co.uk)   |
------------------------------------------------------------------------
Programming is the process of debugging an empty source file
------------------------------------------------------------------------
From: carter@cmptrc.lonestar.org (Carter Bennett)
Newsgroups: comp.lang.perl
Subject: Fixing roman.pl is easy.
Summary: Put in a "1" wherever there's a syntax error.
Date: 10 Sep 92 16:10:29 GMT
Organization: CompuTrac Inc., Richardson TX

In article <1992Sep9.174228.10632@avernus.com> mgfrank@avernus.com (Marc G. Frank) writes:
>
>It has been pointed out that all the (Arabic) ones were deleted from the
>script I recently posted.  This was either a Stupid Emacs Trick or a bug
>in my port of C-News.  (I *sincerely* hope it was the former!  :-)  In
>case someone wants to use the script and can't figure out where the
>missing ones go, drop me a note and I'll mail you the script.

Thanks for the script, Marc!  I was able to make it functional by doing
the following:

    1.  At the end of the package, place a "1" before the semicolon.
    2.  Where the values of X, M, C, and I are assigned, put a "1" at
	the beginning of the literal value.
    3.  Run testromn.pl repeatedly, and insert a "1" wherever there is
	a syntax error.  :-)

The package works fine now, but the documentation shows that it was written
about September, 992 A.D!  Perhaps this will cut down on Marc's mail for
resends.

Carter R. Bennett, Jr. - Scientist      No matter where you go...
carter@scilab.lonestar.org - home                 .../dev/tty!
carter@cmptrc.lonestar.org - work
KI5SR
Newsgroups: comp.lang.perl
From: Sean@legastat.demon.co.uk (Sean Hughes)
Subject: DIFF
Distribution: world
Organization: Legastat
Date: Tue, 15 Sep 1992 16:38:51 +0000

Hello happy perl people

Has anyone written a diff-like routine?

What I'm trying to do is to compare a target line of text against a
whole document in order to find the text that matches the target most
closely at a charcater level.  The hamfisted approach would be to use
split to break each line into one character per line lines and run 
system calls to diff - but this strikes me as pretty silly.

I appreciate I should get into the diff algorithms(^) but before I start
re-inventing square wheels has anybody done this kind of thing already ?

(^ does anyone know an ftp or some such site where I can get hold of:
"An O(ND) Difference Algorithm and its Variations", Eugene Myers,
Algorithimica Vol. 1 No. 2, 1986, p251 )

Many thanks

Sean at the core dump

Newsgroups: comp.lang.perl
From: asherman@laser.fmrco.com (Aaron Sherman)
Subject: Re: how to get passwd
Reply-To: asherman@fmrco.COM
Organization: I-Kinetics, 19 Bishop-Allen Dr., Cambridge, MA
	<1992Sep3.184343.12651@netlabs.com>
	<ASHERMAN.92Sep4130521@laser.fmrco.com>
	<MERLYN.92Sep4120357@romulus.reed.edu>
Distribution: usa
Date: Mon, 7 Sep 1992 03:43:36 GMT

>>>>> merlyn@ora.com (Randal L. Schwartz) said:

merlyn> print ((split(/:/,$last))[2]); # why add zero?  foo!

Because a "::" should be interpreted as a ":0:".

Or so I feel.


			-AJS

PS: It hadn't even occurred to me (even though I new getc was sloppy)
	that anything but the algorithm was the bottleneck, thanks.
--
--------
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.
From: tmhoff@oogoody.Corp.Sun.COM (Todd Hoff)
Newsgroups: comp.lang.perl
Subject: reopening STDOUT as another stream
Date: 4 Sep 1992 23:13:11 GMT
Organization: Sun Microsystems, Inc.
Distribution: world
Reply-To: tmhoff@oogoody.Corp.Sun.COM
NNTP-Posting-Host: oogoody.corp.sun.com


I can't quite figure out how to freopen STDOUT as another
stream. Any suggestions?
From: dansmith@Autodesk.COM (Daniel Smith)
Newsgroups: comp.lang.perl
Subject: how to find all current package names?
Date: 13 Sep 92 21:47:05 GMT
Organization: Autodesk Inc., Sausalito CA, USA


	You have a script.  You've included some libraries,
so you have more than just %_main.  Now, how would you find out
the names of all of the current packages?

	What I'm up to:

	In SoftList 3.0, which I'm working on, I have a "dumpv"
alias that can be invoked from the Perl CLI, and it shows the
state of everything in %_main (via dumpvar.pl).  I would like to be able 
spit out a list of packages so that the user could give dumpv a
"which package" argument.

				Daniel

p.s.  If you want to check out SoftList (the CLI part is in better
shape than the list handling), email me, and I'll send you the beta.
I have most of the command line editing you'd find in tcsh.
-- 
     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
From: dds@doc.ic.ac.uk (Diomidis D Spinellis)
Newsgroups: comp.lang.perl
Subject: Re: dbm problems/questions (msdos-perl).
Summary: 0 len files are ok in DOS dbm
Date: 15 Sep 92 13:58:31 GMT
Organization: Department of Computing, Imperial College, University of London, UK.
NNTP-Posting-Host: swan.doc.ic.ac.uk

In article <kebsch.716557576@neurotic> kebsch@neurotic.sni.de (Waldemar Kebsch) writes:
>I have fetched PERL419X.ZIP from Simtel and it runs fine. Because I have
>no experience with dbm I wrote a simple example using dbmopen(), dbmclose(),
>etc.. It works fine, but the [????????.dir] file is only 0 bytes long???
[...]
>Hmm .., what's going wrong (what I am doing wrong?) ?

There is nothing wrong.  The GNU-dbm library, which is what is probably
used by the Perl version you are using,  stores all data in the .pag
file.  The .dir file is not used.  Under Unix the two files are linked
together in order to keep their timestamps synchronised.  Under MS-DOS
the .dir file is just a dummy zero-length file.

Diomidis
-- 
Diomidis Spinellis    Internet: <dds@doc.ic.ac.uk>  UUCP: ...!uknet!icdoc!dds
Department of Computing, Imperial College, London SW7     #include "/dev/tty"
Newsgroups: comp.lang.perl
From: mhelgren@cat3.cs.wisc.edu (Matt Helgren)
Subject: Want to write STDIN and read STDOUT of system() proccess 
Organization: University of Wisconsin, Madison -- Computer Sciences Dept.
Date: Tue, 15 Sep 1992 21:59:02 GMT

	I want to be able to execute a system binary and read from its stdout
and write to its stdin.  How can I do this?  I tried a few things with pipe
and fork but nothing quite worked.  All help would be appreciated.


Matt Helgren
University of Wisc.
From: jpc@gauss.msri.org (Joe Christy)
Newsgroups: comp.lang.perl
Subject: perl4.035 under SunOS4.1.2
Date: 9 Sep 92 22:33:48 GMT
Followup-To: comp.lang.perl
Organization: Mathematical Sciences Research Institute, Berkeley
NNTP-Posting-Host: 128.3.188.58

I've recently come to this mainly Sun shop and miss my old tools.
What are the tricks neccessary to compile perl4.035 on a sparc (IPX)
under SunOS4.1.2? I have gcc as well as cc. My naive first attempt
using cc gave compile time errors in perl.c:

gauss(perl4.0): make
`sh  cflags perl.o` perl.c
		  CCCMD =  cc -c  -I/usr/include/sun -I/usr/ucbinclude -O  
		  perl.c: 95: If-less endif

Using gcc I compiled ok but the tests op/eval and op/regexp failed
and lib/big dumped core. The one thing, alas, I don't have, is enough
time to find what's going wrong ( I want to use my favorite perl
script to replace a departed programmer's buggy c code in a crucial
application). Surely someone has a recipe for how to build perl in this
common configuration. Help!
-- 
Joe Christy   |      Head of Mathematical Computing      | Two wrongs
jpc@msri.org  | Mathematical Sciences Research Institute | don't make a right,
(510)643-6069 |          1000 Centennial Drive           | but three lefts do
**************|           Berkeley, CA 94720             |********************
Newsgroups: comp.lang.perl