HDTenEightyP/NetNews huggingface dataset:
From: rdm2@donner.uucp (24337-mcburnett)
Subject: Re: UUDECODE and perl ...
Organization: Bellcore, Livingston, NJ
Date: Wed, 11 Nov 92 13:41:19 GMT

In article <1992Nov10.231657.17411@morwyn.uucp> forrie@morwyn.uucp (Forrest Aldrich) writes:
>Someone was very kind and sent me a perl script which was supposed to
>be able to 'cat' a file of combined uuencoded scripts, stripping all
>the headers, etc., and placing them into one file to be decoded.
>
>I tried it, and it didn't work
...
>Forrest

Hi All,

Here is what I use to "auto decode" articles.  First I must ensure that
the articles are in the proper order.  (This could also be automated but
I have never had the need.)  Once the articles are in the proper order
(in one file or in several) I can execute "extract" which will recognize
the beginning of a uuencoded seciton and pass it to uudecode.  My
process uses the conventions that prevail in comp.binaries where a BEGIN
code word preceeds the uuencoded stuff and an END follows it.

-Roe

Roe D McBurnett III Bellcore (908)699-2273 rdm2@chaucer.cc.bellcore.com
#insert <std.disclamer>

================cut here================
#! /usr/local/bin/perl -S
#extract will scan for uuendcoded stuff and feed it to uudecode
open(_uud,"|uudecode");
line: while (<>) {
	if(/^BEGIN/){
		$p = 'y';
		next line;
	}
	if(/^END/){
		$p = 'n';
	}
	if( /^begin/ || /^end/ || /Subject/ ){
		print $_;
	}
	if($p eq 'y'){
		print _uud $_;
	}
}
Roe D McBurnett III Bellcore (908)699-2273 rdm2@chaucer.cc.bellcore.com
#insert <std.disclamer>
From: marcap@cs.concordia.ca (PAWLOWSKY marc)
Newsgroups: comp.lang.perl
Subject: Questions on Perl Source Code.
Summary: Trouble with integers.
Date: 13 Nov 92 20:06:44 GMT
Organization: Computer Science, Concordia University, Montreal, Quebec


Due to a nasty gotch'a in the 80486 my port of PERL has trouble
with integers.  In particular 1 becomes 1.000000000000000056.

Now this little beast cause trouble on unformatted outputs, and
when lists are joined, and even trouble with boolean operators.

Now the question is can anybody tell me where are doubles converted
to strings (is it in sprintf statements allover?)  Can anybody
tell mhere are the logical operators implemented (e.g. ||, &&, ...).


Is there a document somewhere that helps explan the C source code.
I'm looking for some type of overview, explaining what the data 
structures are, flow control, tht type of thing.

Thanks

    Marc Pawlowsky


P.S.  Hint for next version of PERL, include an integer type
that is freely converted between doubles, strings, and integers
so this type of portability problem disappears.


Newsgroups: comp.lang.perl
From: forrie@morwyn.uucp (Forrest Aldrich)
Subject: UUDECODE and perl ...
Organization: Vision Graphics
			  Dover, NH
			  USA
Date: Tue, 10 Nov 1992 23:16:57 GMT

Someone was very kind and sent me a perl script which was supposed to
be able to 'cat' a file of combined uuencoded scripts, stripping all
the headers, etc., and placing them into one file to be decoded.

I tried it, and it didn't work (and then, stooopidly and accidentally 
bit-bucketed it), and I couldn't really figure out why.  Is that you
must 'teach' it about all the possible headers that could be in a message?
I looked at the file, and I didn't see any leftover, omitted headers.
UUDECODE complained of a short file, or some kind of error from it.

Anyone know about this one?  Thanks... 

In other things:  some time ago, there was a discussion about creating
menus in curseperl.  I have a version of menu.pl, and haven't tried it,
but I also indicated that I had a C program that did a lot of good
menuing and forms creation.  _Many_ people requested a copy, and I
sent it out accordingly... no responses for a long time, so I wondered
if anyone _did_ anything with it, and if they did, could they please
share it with us.  Thank you.

Forrest

-- 
	   -----------	      Forrest Aldrich	      -----------
	   -------     morwyn!forrie@unhtel.unh.edu	  -------
	   ----						     ----
	   --	     VISION GRAPHICS --	Dover, NH - USA	       --
	   ------------------------------------------------------
From: clewis@ferret.ocunix.on.ca (Chris Lewis)
Newsgroups: comp.lang.perl
Subject: Re: stat(2) on ISC and "stat"new "stat" program
Date: 7 Nov 92 08:55:38 GMT
Organization: Elegant Communications Inc., Ottawa, Canada

In article <1992Nov6.223732.9010@xyzoom.info.com> rob@xyzoom.info.com (Rob Lingelbach) writes:
|Using Tim Wilson's perl script "stat" to provide user-access to
|stat(2), I find that on my Unix there are "0"'s (zeroes) in the fields
|for blocks and blksize, as follows:

|/usr/rob/.mushrc
|	device		0x3
|	inode		948		0x3b4
|	mode		-rw-r--r--	0100644
|	nlink		1
|	owner		rob
|	group		other
|	rdev		0
|	size		2042
|	atime		Fri Nov  6 14:30:16 PST 1992
|	mtime		Mon Oct 26 20:56:13 PST 1992
|	ctime		Mon Oct 26 20:56:13 PST 1992
|	blksize		0
|	blocks		0

|Tim hasn't heard of this behavior, and we were wondering if it is
|specific to something "missing" from ISC's stat(2).  Can anyone tell
|me what's wrong here?  OS is ISC 3.0.

System V stat() doesn't support blksize or blocks.  These are
(usually) part of the Berkeley Fast File System (and other newer
file system formats).

In ISC, which is supposed to support FFS optionally (I think). the
struct members may be there in <stat.h>, but the file is on an
ordinary System V partition and the numbers are unavailable.
Or, it could be that these entries simply aren't there at all,
and Tim's program doesn't take into account a shorter stat structure
than he's used to.

This is why "ls -s" of a file is usually wrong on a System V machine
and you're looking at a file with holes.  It'll just be the file
size divided by the block size (or hardcoded 512).
-- 
Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
Ferret list: ferret-request@ferret.ocunix.on.ca
Newsgroups: comp.lang.perl,news.software.b
From: kherron@ms.uky.edu (Kenneth Herron)
Subject: Perl Dynafeed administration pkg posted to alt.sources
Date: Fri, 13 Nov 1992 20:54:45 GMT
Organization: University Of Kentucky, Dept. of Math Sciences

I've posted a package to administer a Dynafeed server to alt.sources.
It's a little rough, but it has been working fine here since last
may.  Please feel free to bombard me with questions, suggestions, etc.

Caveat:  In the installation instructions, I forgot to mention that
you have to update the #! line to reflect the location of your perl
binary.
-- 
Kenneth Herron                                              kherron@ms.uky.edu
University of Kentucky                                         +1 606 257 2975
Dept. of Mathematics     "Your ball goes over them, it sails off the edge into
a huge cauldren of fire-breathing dragons."  "And they call this a par three?"
Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: scripts should indicate the Perl version (a proposal)
Organization: Motorola Codex, Canton, Massachusetts
Date: Tue, 10 Nov 1992 14:01:02 GMT

ckd@eff.org (Christopher Davis) writes:

>MC> == Michael Cook <mcook@fendahl.dev.cdx.mot.com> 

> MC> How about this idea: There should be a way to specify in a Perl
> MC> script what version of Perl the script was written for.  Then, as
> MC> new keywords and other non-backwardly-compatible functionality are
> MC> added, old scripts could still likely work correctly.

>(The real solution would be not to use lower case unquoted strings, and
>trust in Larry not to break anything.  Or hard-code the version, say:
>#!/usr/local/bin/perl4.035 -- #-*-Perl-*-)

You have a particular class of incompatibilities in mind.  What about those
like the hack that enables bitwise operations on strings: perl searches for
use of the keyword 'vec'.

Larry says that Perl 5.0 may let us invoke subroutines by doing foo() instead
of &foo().  Does that mean we have to pick a new naming convention for
subroutines, such as FOO() or Foo(), to avoid using future keywords?  There
may be a clever fix for this conflict, too.  But maybe there's a generalized
solution...

BTW, the "version specifier" should have file scope.  A require'd file might
have been written for a different version of Perl.

Michael.
Newsgroups: comp.lang.perl,comp.unix.wizards,comp.sys.sun.admin
From: eposnak@dale.ksc.nasa.gov (Ed Posnak)
Subject: Re: Changing the owner of a process
Keywords: process owner
Organization: NASA
Date: Thu, 5 Nov 1992 23:52:28 GMT

Is there an un-general way of changing the euid of a process from another
process?  We have an unusal requirement on our project for a 'shift-change'
where a user logs in and 'inherits' ownership processes that were running
under another euid.  Thanks in advance.

-- 
--
Ed Posnak
Harris Space Systems Corporation
eposnak%core1@kssib.ksc.nasa.gov
From: tcking@uswnvg.com (Tim King)
Newsgroups: comp.lang.perl
Subject: Looking for perl sources
Date: 12 Nov 92 15:48:50 GMT
Organization: U S WEST NewVector Group, Inc.
X-Newsreader: Tin 1.1 PL5

I am interested in perl and would like to know where to obtain the
sources via ftpmail.  Any assistance would be greatly appreciated.

--
Tim King, tcking@uswnvg.com or uunet!uswnvg!tcking
US West NewVector Group Inc., Bellevue, Washington
206-450-8533
Newsgroups: comp.lang.perl
From: weingart@inf.ethz.ch (Tobias Weingartner)
Subject: Where am I?
Followup-To: comp.lang.perl
Keywords: subs
Reply-To: weingart@inf.ethz.ch
Organization: ETH - Switzerland
Date: Wed, 11 Nov 1992 08:34:17 GMT


Yo, thought I knew most things (er, ahem...) about
perl, but now that I am getting fancier, I find
my knowledge lacking.

I suddenly have a need to know within a subroutine,
what subroutine called me, and what the subroutine
that I am currently executing in is.

Is there any way to find this stuff?  Would make
my life a LOT easier!  Also, if anyone has made
a general perl script, that will invoke any
sub, locally or remote, please let me know...

(Damn, why can't rsh carry over ENV, why does the
shell have to glob everything, why, Why, WHY!?!?)

Wish that there was something like rexec, that does
a little bit more authentication...

***************************************************************
* Tobias Weingartner  * Not every man is willing to die...    *                
* c/o Bruno Opprecht  * Some have to be PUSHED out the window *
* Oberdierikoner st.7 * ------------------------------------- *                
* 6030 Ebikon Luzern  *      ...This space for rent...        *
* SWITZERLAND         *      ...This space for rent...        *                
***************************************************************
* +41'041'33'25'40    * ..Midnight the fading, blue Wizrd..   *
***************************************************************
SYSTEM-F-ANARCHISM, the operating system has been overthrown                  

PGP2.0 Public Key available at 'finger weingart@tau.inf.ethz.ch'

From: lynch@hpcc01.corp.hp.com (Howard Lynch)
Date: Fri, 6 Nov 1992 00:39:51 GMT
Subject: require "did not return a true value" ???
Organization: OCD IC MFG
Newsgroups: comp.lang.perl

Hello, I'm a novice perl user who is VERY grateful for help received so
far from readers of this notes group.  I have a problem that seems so
simple that I'm a bit embarassed that I can't figure out what's going
on, but am frustrated enough to expose my ignorance.

What does this error message mean?  ('hpocia.' is my ksh prompt)

	hpocia. perl1.pl
	perl2.pl did not return a true value at ./perl1.pl line 4.

Here is the script, and the file that it is trying to 'require':

	hpocia. cat perl1.pl
	#!/usr/local/bin/perl.4.019
	#
	
	require 'perl2.pl';
	
	print "done\n";
	
	hpocia. cat perl2.pl
	sub perl2 {
	        print "test from perl2\n";
	        }
	
THANKS for any feedback!
	
Howard Lynch
HP OCD IC Manufacturing
hl@hpocia.sj.hp.com
Newsgroups: comp.lang.perl
From: weingart@inf.ethz.ch (Tobias Weingartner)
Subject: SUID Perl scripts
Followup-To: poster
Keywords: SUID, perl, taintperl
Reply-To: weingart@inf.ethz.ch
Organization: ETH - Switzerland
Date: Thu, 5 Nov 1992 14:58:49 GMT


Yo Dudes an' Dudettes!

I have a small question.  You see, I have this neat SUID Root
perl script, that does some neat things.  Now the question I have
is this:

Running this SUID Root perl-script on SunOS 4.1.2, can it be
spoofed by LD_*?

Also, at the top of the perl script, I have this.  Is this correct,
or did I do something stupid here?

#!/usr/local/bin/taintperl
...
...

Is taintperl the thing to use?  /usr/local/bin/perl complains
about a little deficiency my kernel seems to have.  SUID scripts...

Thanks for any replies.

-- 

***************************************************************
* Tobias Weingartner  * Not every man is willing to die...    *                
* c/o Bruno Opprecht  * Some have to be PUSHED out the window *
* Oberdierikoner st.7 * ------------------------------------- *                
* 6030 Ebikon Luzern  *      ...This space for rent...        *
* SWITZERLAND         *      ...This space for rent...        *                
***************************************************************
* +41'041'33'25'40    * ..Midnight the fading, blue Wizrd..   *
***************************************************************
SYSTEM-F-ANARCHISM, the operating system has been overthrown                  

PGP2.0 Public Key available at 'finger weingart@tau.inf.ethz.ch'
From: tcking@uswnvg.com (Tim King)
Newsgroups: comp.lang.perl
Subject: Re: Looking for perl sources
Date: 13 Nov 92 15:54:08 GMT
Organization: U S WEST NewVector Group, Inc.
X-Newsreader: Tin 1.1 PL5

Tim King (tcking@uswnvg.com) wrote:
: I am interested in perl and would like to know where to obtain the
: sources via ftpmail.  Any assistance would be greatly appreciated.
: 

I have the needed info.  Thanks to those who responded.

--
Tim King, tcking@uswnvg.com or uunet!uswnvg!tcking
US West NewVector Group Inc., Bellevue, Washington
206-450-8533
Newsgroups: comp.lang.perl
From: chappell@symcom.math.uiuc.edu (Glenn Chappell)
Subject: Partial RegExp's
Reply-To: chappell@math.uiuc.edu (Glenn Chappell)
Organization: Math Dept., University of Illinois at Urbana/Champaign
Date: Mon, 9 Nov 1992 15:11:20 GMT

Here's a question I've been pondering for a few weeks:

Inherent in the design of Perl seems to be the idea that you always have
enough space in memory for the entirety of any file you'd ever want to
work on. But what if you don't? How does one do wonderful things like
"split" and various pattern matches & such on files that are just too big?

Well, if there's already a standard, ok-I'll-spell-it-all-out-for-a-
neophyte-like-you-but-next-time-read-the-book-okay answer to this
question, I'd like to hear it. If, not, an idea:

Of course, the way you deal with huge files is to read them in chunks.
The problem with that is that you miss a pattern match that starts on
one chunk and ends on another.

Currently, the result of an attempt at a pattern match gives one of two
responses: "Got a match" or "Didn't get a match". What if there were a
way to tell the pattern matcher that some patterns may extend off the
end of the currently available text, and we gave the matcher the ability
to give two other reponses: "Got a partial match, and if you give me
more data, I may get a match" and "Got a match, which may turn into a
bigger match if you give me more data". The matcher would also return
the place at which the partial match began.

Now, from what I know of pattern matching, it seems to me that this would
be an easy modification to do. The question, then, is whether it would
be worthwhile. So, does anyone think so? Or is it just me?

				Glenn Chappell  <><
Newsgroups: comp.lang.perl
From: gerrys@sun.com (Gerry Singleton - OpCom Consultant)
Subject: ps2asc
Reply-To: gerrys@sun.com
Organization: Sun Microsystems, Inc.
Date: Fri, 6 Nov 1992 23:27:12 GMT

A while back, March 92, someone posted a copy of ps2asc.  Mine has become
damaged and I'd like a replecement.  Anyone help?  The author no longer
has a copy.
---
G. Roderick Singleton, OPCOM Solaris 2.0 Migration Support Centre
{ gerrys@canada.sun.com | gerry@nexus.yorku.ca | gerry@eclectic.uucp }
Voice: 1-800-363-6200 (Canada and U.S.A.)

Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: PERL 4.035 on SCO v3.2
Keywords: sco perl install
Organization: Motorola Codex, Canton, Massachusetts
Date: Thu, 12 Nov 1992 20:43:56 GMT

schan@birch.srg.af.mil (Stephen Chan x4485) writes:

> I'm having some problems getting Perl 4.035 up on my machine. The
> configure script was amazing (one day, that script will conquer the world),

Sounds like something out of the Terminator movies: "On March 15, 1996 at
12:47pm, Larry Wall's Configure script became self-aware..."

Michael.
Perl's estranged second cousin-in-law, twice removed.
From: hoodj@gov.on.ca (Jim Hood)
Newsgroups: comp.lang.perl
Subject: Compiling 4.035 w/ gcc-2.2.2 under SunOS 4.1.2
Keywords: what flags, other tweaks?
Date: 13 Nov 92 16:32:14 GMT
Organization: Government of Ontario

I compiled perl with the native cc uneventfully, and it passed the
test suite.

I've had no luck with gcc-1.39 or gcc-2.2.2: the former compiled,
but flunked, the latter didn't even compile. If someone has
figured out the correct magical incantations for gcc, and is willing
to share, I'd be much appreciative.
--
Jim Hood
hoodj@gov.on.ca
Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: explicit sub parameters - a proposal
Organization: Motorola Codex, Canton, Massachusetts
Date: Thu, 12 Nov 1992 20:30:11 GMT

tchrist@convex.COM (Tom Christiansen) writes:

>From the keyboard of mcook@fendahl.dev.cdx.mot.com (Michael Cook):
>:What about this idea: perl should allow this construct:
>:
>:	sub foo($a, $b, @rest) {
>:	  # ...
>:	}
>:
>:which would be exactly equivalent to
>:
>:	sub foo {
>:	  local ($a, $b, @rest) = @_;
>:	  # ...
>:	}
>:
>:That would greatly improve the readability of Perl, I think.  (Not to mention
>:the fact that people might be less likely to stumble into all the strange
>:things that can happen when you start playing around with @_.)

>Yes, this would help with at least one aspect of variable suicide,
>the one addressed by the first part of FAQ 2.31 as of the last posting.

>I agree that it would be an improvement, but some things are left
>unaddressed.  One problem is that what I believe people really expect to
>work is:

>	foo(@abc, @xyz) if $blah;

>	sub foo(@alpha, @beta) {
>	    ....
>	} 

I've come to learn that &foo(@abc) means &foo($abc[0], ..., $abc[$#abc]).
I'm sure that changing the rules would break a lot of existing code (but then
there is that clever "version" idea that someone posted a couple days ago...).

In the definition ``sub foo(@alpha, @beta, $gamma, %delta)'', perl -w should
warn about the parameters that follow @alpha, since the declaration doesn't
make sense.

Michael.
Perl's estranged second cousin-in-law, twice removed.
Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: Oracle most wise, ....
Organization: Motorola Codex, Canton, Massachusetts
Date: Tue, 10 Nov 1992 14:17:42 GMT

ccechk@nuscc.nus.sg (Heng Kek) writes:

[lots of grovelling deleted]

>Why does it take me 5 days to code the same program in C when it
>took only half in Perl?

I suspect you're a beginner at Perl.  As you use it more, you'll be able to
get that down to half a day. :-)

Michael.
From: rm55@cislabs.pitt.edu (Rudolph T Maceyko)
Newsgroups: comp.lang.perl
Subject: /usr/include/*.h -> /usr/contrib/lib/perl/*.ph
Date: 5 Nov 92 22:04:35 GMT
Distribution: na
Organization: University of Pittsburgh


1.
Has anyone created working, as-complete-as-is-possible, *.ph files for
/usr/include and /usr/include/sys for Ultrix 4.2A
[DECstation 5000/240 et al.] ?



2.
Is there a version of c2ph that does COFF instead of .stabs?
A lot of the stuff in the .ph files ends up being useless without the
typedefs and sizeof's.



3.
Has anyone felt it necessary to emulate the cpp defines that would
normally be in effect when #including <file.h>?  By this, I mean like adding
this to the top of each file.ph or making each file.ph require it:

definitions emulate the implicit DEFINEs that cpp uses.
#
eval 'sub ANSI_COMPAT {1;}' unless defined &ANSI_COMPAT;
eval 'sub __ANSI_COMPAT {1;}' unless defined &__ANSI_COMPAT;
eval 'sub __ANSI_COMPAT__ {1;}' unless defined &__ANSI_COMPAT__;
eval 'sub MIPSEL {1;}' unless defined &MIPSEL;
eval 'sub __MIPSEL {1;}' unless defined &__MIPSEL;
eval 'sub __MIPSEL__ {1;}' unless defined &__MIPSEL__;
eval 'sub bsd4_2 {1;}' unless defined &bsd4_2;
eval 'sub __bsd4_2 {1;}' unless defined &__bsd4_2;
eval 'sub __bsd4_2__ {1;}' unless defined &__bsd4_2__;
eval 'sub host_mips {1;}' unless defined &host_mips;
eval 'sub __host_mips {1;}' unless defined &__host_mips;
eval 'sub __host_mips__ {1;}' unless defined &__host_mips__;
eval 'sub mips {1;}' unless defined &mips;
eval 'sub __mips {1;}' unless defined &__mips;
eval 'sub __mips__ {1;}' unless defined &__mips__;
eval 'sub ultrix {1;}' unless defined &ultrix;
eval 'sub __ultrix {1;}' unless defined &__ultrix;
eval 'sub __ultrix__ {1;}' unless defined &__ultrix__;
eval 'sub unix {1;}' unless defined &unix;
eval 'sub __unix {1;}' unless defined &__unix;
eval 'sub __unix__ {1;}' unless defined &__unix__;
#
# end of extra definitions...

These could even be defined as usersubs to spare some execution time.


Thanks,
Rudy Maceyko

Newsgroups: comp.lang.perl
From: davis@cs.cornell.edu (Jim Davis)
Subject: standard output from wish
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Date: Tue, 10 Nov 1992 15:44:59 GMT


Mandatory apology:  I have searched the Tcl FAQ and all back articles
before sending these questions.

I want to write some simple, window oriented commands in wish (Tcl).
I would like these commands to parse command line arguments, to print
reasonable error messages if the arguments are wrong, and to be able
to produce output on standard output as a result.  But I can't
find a way to do it.

I tried calling echo but it produces no output.  (If I start wish with
no args, and call echo, I *do* see the output; but if I have a shell
script with wish as the interpreter, I *don't* see the output; I can
also do

exec echo "bunch of words" > /dev/console

but I don't want the output to go to the console, I want it to
go to the place where the user invoked the program.

If I were programming in csh, I would have written something like

if ($#argv > 5) then
  echo "usage: `basename $0`  FILE [-switch baz] "
  exit 1
endif

What's the Tcl/wish equivalent?

I can use error, but it produces a lot of output including a trace of
the internal location within the script; this does not belong in the
error message.

In the more general case, I'd like to be able to send stuff to std
output so that I can do other things from the shell with the results
of my Tcl program.

best wishes
Newsgroups: comp.lang.perl