HDTenEightyP/NetNews huggingface dataset:
From: kstock@isfrance.encore.fr (Kevin Stock)
Subject: oraperl-v2 - Extensions to Perl to access Oracle database, Patch02
Organization: Encore
Date: Sun, 4 Oct 1992 16:42:04 GMT
X-Md4-Signature: 7cbfa8cb978f2ee3d6c305b29adc35bc

Patch 2 for Oraperl, a version of Perl which can 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.

With this patch, Oraperl can now handle NULL fields and can also return
field names without truncation.

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.

	Kevin
	kstock@encore.com, kstock@encore.fr


Newsgroups: comp.lang.perl,comp.unix.admin
From: subbarao@tex.Princeton.EDU (Kartik Subbarao)
Subject: Re: Why I am glad I know perl
Reply-To: subbarao@fc.hp.com
Organization: putchar('I'); for (i = 0; i < 3; i++) putchar('E');
Date: Tue, 6 Oct 1992 18:27:10 GMT

In article <BvpIos.9Ew@cs.psu.edu> ehrlich@colossus.cs.psu.edu (Dan Ehrlich) writes:
>Here is just one reason why every system administrator should know perl.
>
>Scenario:  Sitting in a window on a standalone workstation as root.
>
>           Enter "rm *" assuming that I am in /foobar/blech/bin.
>
>           Notice that I must have been in /bin because "ls" no longer
>           exists.  Panic begins to set in.
>           
>           Confirm that I was really in /bin.  Panic mounts.
>           
>           Use ftp (from /usr/bin) to suck over some executables from
>           a similar workstation.  Hmmm.... Ftp doesn't preserve modes.
>           Panic level increasing.
>           
>           Perl!!  Perl has a built in chmod!
>           
>           Use echo to construct a script that will set execute bits on
>           sh, tar, cat, ls.
>           
>           Tar up /bin on remote workstations and extract to fully
>           restore /bin.
>           
>           Peace and tranquility have been restored along with /bin.
>           Blood pressure returns to normal.  Life goes on.
>            
>Buy the book.  Read the book.  Learn Perl.
>
>Note that this would not work on a Sun as /bin is a link to /usr/bin and
>ftp would have vanished along with everything else.  

Ah, but ftp is in /usr/ucb on a Sun. Good story, though. Perl is a very
useful tool.

	-Kartik
Newsgroups: comp.lang.perl,comp.unix.admin
From: ckd@eff.org (Christopher Davis)
Subject: Re: Why I am glad I know perl
Organization: Electronic Frontier Foundation Tech Central
Date: Tue, 6 Oct 1992 20:17:48 GMT

Dan> == Dan Ehrlich <ehrlich@colossus.cs.psu.edu> 

 Dan> Here is just one reason why every system administrator should know perl.
[scenario deleted]
 Dan> Buy the book.  Read the book.  Learn Perl.

Compile a copy statically linked.  Put it in /sbin.  If /sbin is your life
raft, Perl is your Swiss Army Chainsaw.  Nobody should be stuck on a
single-user island without a Swiss Army Chainsaw in their life raft.
--
Christopher K. Davis      |       NET.INSIGHTS INTO ARTISTIC CRITICISM:
<ckd@eff.org>   EFF #14   | ``[Y]ou don't cure bad art by locking it all up
System Administrator, EFF | in one museum, you cure it by throwing tomatoes
+1 617 864 0665  [CKD1]   | at bad artists.'' --Barry Shein <bzs@world.std.com>
From: phillips@cs.ubc.ca (George Phillips)
Newsgroups: comp.lang.perl
Subject: Re: ? possible (de)reference nested data types syntax ?
Date: 28 Sep 1992 23:30:50 -0700
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
NNTP-Posting-Host: yukongold.cs.ubc.ca

In article <1992Sep25.152437.7789@colorado.edu> tchrist@convex.COM (Tom Christiansen) writes:
:From the keyboard of ram@eiffel.com (Raphael Manfredi):
::Am I the only one who finds the \ prefix troublesome ?
:
:No, I do as well, but don't have a better suggestion, so have
:kept quiet.

Perl already lives with potential ambiguities with %, & and *, so why
not use a >, ? or ^ prefix instead of \?
From: jefftep@cs.utexas.edu (Jeffrey Grills)
Newsgroups: comp.lang.perl
Subject: Perl program grows in size
Date: 30 Sep 1992 18:51:51 -0500
Organization: CS Dept, University of Texas at Austin
NNTP-Posting-Host: earth.cs.utexas.edu


I've got a perl program that owns a socket.  It should run all the time,
without interruptions.  However, this program continually grows in
memory.  This turns out to be bad after a period of days.  Restarting
the program is a bad option, because it has to retain state with
the machine it's connected to.

It sits in a loop that sets some global variables (the same ones
every time) to nil each loop, gets input from the socket, sets
the global vars, calls some subroutines that have local variables,
and then gets back to where it was.  And it grew about 4k in the
process.

I've had it use dumpvar.pl occasionally, and I don'y see any variables
that grow, or get created.

The program is way to big to post here.  Where can I look?  What
can I do?  Should I take the time to hack it down to a stub that
I can post here?

Answer, questions, opinions always welcome...

Just another programmer, looking for a program to write, and a new
language to learn to write it in....  (smile)

-- 
-------------------------+--------------------------------------------------
jeff grills              | "Sometimes i see myself so clearly, because I
jefftep@cs.utexas.edu    |   see nothing at all.  This feeling of emptiness
Undergrad Lab, UT Austin |   flees my soul, leaving even less behind."  -me
Newsgroups: comp.lang.perl
From: weingart@inf.ethz.ch (Tobias Weingartner)
Subject: reset woes?
Followup-To: poster
Keywords: reset, DBM
Reply-To: weingart@inf.ethz.ch
Organization: ETH - Switzerland
Date: Tue, 6 Oct 1992 09:44:26 GMT

Yo, I now have a need for the following code to work.
However, I am getting some strange things happening.

Here is the code:

open(UDB, "<$udb_tmpl.data") || die "($host)Can't open $udb_tmpl.data.\n";
chop(@udb = <UDB>);
close(UDB);
dbmopen(BYU, "$udb_tmpl.byuid", undef) || die "($host)Can't open $udb_tmpl.byuid.\n";
dbmopen(BYN, "$udb_tmpl.byname", undef) || die "($host)Can't open $udb_tmpl.byname.\n";

foreach $i (@info){
	$j = $i;
	$k = (split(/:/, $BYN{$i}))[1];

	reset($BYN{$i});
	@udb = grep(!/^$j:/, @udb);
	reset($BYU{$k});
}

open(UDB, ">$udb_tmpl.data") || die "($host)Can't open $udb_tmpl.data.\n";
for(@udb){
	print UDB "$_\n";
}

close(BYU);
close(BYN);
close(UDB);


Not really pretty, but all it has to do, is work.
The reset and grep should delete entries from a
database which is both kept in ascii, and DBM format.

The first problem, is:
When I do:

reset($BYN{$i});

For some reason, $i gets reset as well.  Why?
That is the reason I do all those $j and $k
assignments.

Next, when I trace through the code, the following
happens:

reset($BYN{$i});

Gets executed.  I now type:

$i = 'test';

And I get a core dump!  No error messages, nada.
Not even the reason for the dump.

This is Perl -v:

$RCSfile: perl.c,v $$Revision: 4.0.1.4 $$Date: 91/06/10 01:23:07 $
Patch level: 10

Running on showrev:

***************  showrev version 1.15  *****************
* Hostname: "tau.inf.ethz.ch"
* Hostid: "52001cd9"
* Kernel Arch: "sun4c"
* Application Arch: "sun4"
* Kernel Revision:
 4.1.2 (TAU) #3: Thu Oct 1 19:04:51 MET 1992
* Release: 4.1.2

*******************************************************


Hmm, any suggestions?

Thanks much in advance,

--Toby.

From: kc@hpscit.sc.hp.com (Kwok Cheung)
Date: Thu, 24 Sep 1992 22:53:11 GMT
Subject: question of building array of arrays
Organization: Hewlett-Packard, Santa Clara, CA
Newsgroups: comp.lang.perl

	I try to build an array of arrays, and don't know how
to do it, would someone help?
	Let say I have a file call food look like this
**************
fruit orange
meat pork
vegetable cabbage
fruit apple
meat beer
vegetable lettice
**************

My code look something like this
#!/usr/bin/perl
open(FOOD,food)
|| die "can't open food"'
while ($lines=<FOOD>) {
   ($head, $tail)=split(' ',$lines);
   push(@{$head},$tail);
   print "list for $head is @{$head}","\n";
}

When I run the scripts, I got
Invalid component in string or format at ./t line 7, <FOOD> line 1.

Question: 
1. Did I push orange and apple into an array call @fruit or
   I push all the $tail into an array call @{$head}.

2. I want to push orange and apple into @fruit
                  pork and beef into @meat
                  cabbage and lettice into @vegetable
   How do I do it? and How do I print the different list?

3. Eventually I want to build an array call @food that have "meat","fruit","vegetable"
   Can I do it in perl ? 
Xref: sparky comp.lang.perl:6375 comp.databases:7100
From: buzz@fsrg.bear.com (Buzz Moschetti)
Newsgroups: comp.lang.perl,comp.databases
Subject: The DBperl Project
Date: 6 Oct 92 23:58:04 GMT
Reply-To: buzz@fsrg.bear.com (Buzz Moschetti)
Distribution: comp
Organization: Bear, Stearns & Co. Inc.

The creators of Infoperl, Interperl, Oraperl, Sqlperl, and Sybperl have
expressed interest in working together to create DBperl, a uniform SQL-based
perl API for Informix, Interbase, Oracle, Ingres, and Sybase.  Basic SQL
functionality will be supported as well as advanced concepts including variable
input parameter binding, transaction management, and NULL field interpretation
where possible.  The perl language's superior string, list, and array handling
coupled with the fact that it runs under an interpreter make it an ideal
vehicle for querying and formatting the type columnar data most often found in
relational DBs.

The DBperl interface will also permit run-time dynamic binding of the
vendor-specific DB access backend, thus permitting perl applications to
"instantly" switch among the five RDBM systems listed above.

The DBperl project is in its infant stages, and we would like to hear from
the network community regarding features and functionality that they would
like to see in such a product.  Send your comments to buzz@fsrg.bear.com 
(Interperl).  
Newsgroups: comp.lang.perl
From: mrgreen@mullian.ee.mu.OZ.AU (matthew green)
Subject: The Bible (Was: Re: "Camel" book)
Organization: Computer Science, University of Melbourne, Australia
Date: Thu, 1 Oct 1992 17:24:29 GMT

re..


print "Just another wanna-be Perl hacker\n";
Matt..
From: ram@eiffel.com (Raphael Manfredi)
Newsgroups: comp.lang.perl
Subject: Re: ? possible (de)reference nested data types syntax ?
Date: 29 Sep 92 23:48:48 GMT
Organization: Interactive Software Engineering, Santa Barbara CA

Quoting mjeffery@reed.edu (Mark Jefferys) from comp.lang.perl:
>Would overloading \{ ... }, \s/../.../, etc. break things too
>badly?  It may be possible to use both `ref' and `\' to create
>references, one for clarity, and one for succinctness.

As far as I am concerned, I would consider this a bad design. I know perl
is not minimal, etc..., etc..., BUT it's not an excuse to continue in this
direction. Whatever the final decision is, `\' or `ref', I would prefer to
have only one choice and stick to it.

I'll give a single example to illustrate my point. In perl, you can call
a subroutine `routine' by using either

	do routine();

or
	&routine;

Fine. Except that the semantic is not the same if I append 'while $_' before
the final ';'.

I have reported that as being a (design) bug a long time ago and decided to use
'&' exclusively to call my routines, since this was the only consistent way.

Why make things complicated when they are so simple? Besides, the manual page
does not need the extra confusion added with having both `ref' and '\'. This
could lead to confusions in the beginner's mind, leading him to think that
`ref' is yet another way to quote a portion of text, or whatever.
-- 
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: asherman@laser.fmrco.com (Aaron Sherman)
Subject: There's magic in the air! (was Re: Bus Error (is that a bug ;-))
Reply-To: asherman@fmrco.COM
Organization: I-Kinetics, 19 Bishop-Allen Dr., Cambridge, MA
	<ASHERMAN.92Sep25165710@gunwale.fmrco.com>
	<1992Sep28.193944.4068@netlabs.com>
Date: Wed, 30 Sep 1992 16:50:01 GMT


>>>>> lwall@netlabs.com (Larry Wall) said:

lwall> It's probably getting confused over the local(*_), in conjunction with
lwall> the implicit localizations of grep and foreach and subroutine arguments.
lwall> Not only that, but you're interating over @_ after localizing it and
lwall> assigning to it.  Things are bound to get interesting.

lwall> $_ and @_ are highly magical.  I'd localize $_ instead of *_, and avoid
lwall> trying to use @_ as an ordinary array within a subroutine.

Thanks. I had actually done this (this morning) and it seems to work
fine. The use of @_ after localizing *_ is fairly new in the code, so
that was not what was causing the original problem, but I suspect that
it was the localizing of so many references that caused the problem.
Is this still going to work the same way in 5.0, or will there be a
more 'pointer-like' mechanism for passing by reference?

One thing that I will do from now on is to not use @_ except in very
small functions. It just seems to be too magical (one interesting
effect was that after 'shift'ing everything off of it, a later unshift
did not add anything to it (!?) ).

BTW: My comments about depending on perl's stability "a little too
     much", were not to be taken as a slight against perl, just a
     comment on the fact that I was getting a little too complacent.
     ;-)


			-AJS
--
--------
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: buzz@toxicavenger.bear.com (Buzz Moschetti)
Newsgroups: comp.lang.perl
Subject: Examples of chat2'expect - Randal?
Date: 29 Sep 92 23:32:00 GMT
Reply-To: buzz@fsrg.bear.com (Buzz Moschetti)
Distribution: comp
Organization: Bear, Stearns & Co. Inc.

I am trying to wrap ftp with chat2 funcs in order to create a robust
batch-mode version of ftp.  

ftperl  :-)  knows to expect certain output from ftp after feeding it
well-known commands, e.g.  cd, binary, get filename, etc.

My efforts to get expect to work as I think it wants to work have been 
fruitless.  All I'm really trying to do is:

	send string to ftp;
	expect two, perhaps three patterns;
	if we have an error pattern match
		exit;
	no error; send another string;
	expect more patterns;
	if we have an error pattern match
		exit;
	no error; send yet another string;

Does anyone have a chat2'expect code sample they'd like to mail me that is
similar to the above pseudocode?  Clues are most appreciated.
From: majidi@rwja.umdnj.edu (Masoud Majidi)
Newsgroups: comp.lang.perl
Subject: formatted read (beginner's question)
Keywords: read
Date: 29 Sep 92 16:16:38 GMT
Organization: Robert Wood Johnson Medical School, Piscataway NJ

Dear netters,

I just started learning perl and actually was able to write a couple of
useful programs. I am using the Camel book as tutorial/reference.
I got into a simple problem and I appreciate it very much if somebody
could help me with it.

All I want to do is prompt the user for an integer and be able to read
in the integer from stdin. I was looking for something like scanf in C
but apparently read() is the only function that perl has for reading
and the problem is that read() is good when you know the length of the
input. Am I supposed to write my own routine to read in an integer?
i.e. read in characters from stdin till the eoln and then convert the
string to int? There got to be a easier solution for this trivial
problem ...

Thanks in advance for you help,

Masoud Majidi (majidi@umdnj.edu)
From: esulzner@cad645.intel.com (Eric Sulzner)
Newsgroups: comp.lang.perl
Subject: Re: pipe in and out of process
Date: 5 Oct 92 18:02:01 GMT
Distribution: comp
Organization: Design Technology, INTeL Corporation, Santa Clara, CA

Thanks to those who responded.  Here's a summary:

pipe(CR, PW);
$oldfh=select(CR); $|=1; select($oldfh);
$oldfh=select(PW); $|=1; select($oldfh);
pipe(PR, CW);
$oldfh=select(PR); $|=1; select($oldfh);
$oldfh=select(CW); $|=1; select($oldfh);

if ($pid = fork){       #parent
	close(CR); close(CW);
        } else {        #child
	open (STDIN, ">&CR");
	open (STDOUT, ">&CW");
 	close(CR);
	close(PW);
	close(PR);
        close(CW);
	exec("whatever") || die "ack\! ick\! gad\!: $!\n";
}

Now you can print to PW and read from PR.

   I'd like to read from and write to a process.  The Camel text for the
   open function says "(You may not have an open command that pipes both in 
   and out, though it's easy to build one using the pipe and fork
   commands.)"

   Would someone please post an example of this?  Thanks.
   --
   Eric Sulzner	esulzner@cadev6.intel.com	(408)765-4177
--
Eric Sulzner	esulzner@cadev6.intel.com	(408)765-4177
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: localizing file handles
Originator: tchrist@pixel.convex.com
Date: Sun, 4 Oct 1992 23:38:50 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 chare@unilabs.uucp (Chris Hare):
:I'm working on a script which will recursively read through other scripts.
:I need to be able to set a file handle as local to the instance of the
:subroutine being worked through.
:
:How do I do this?

    sub foo {
	local(*FH);
	open(FH, "blah") || die;
    } 

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

Perle, plesaunte to prynces paye/ To clanly clos in golde so clere,
Oute of oryent, I hardyly saye/ Ne proued I neuer her precios pere.
Newsgroups: comp.lang.perl
From: jsc@athena.mit.edu (Jin S. Choi)
Subject: eval error in 4.033?
Organization: Massachusetts Institute of Technology
Distribution: comp
Date: Mon, 5 Oct 1992 05:46:34 GMT

I just moved to 4.033 from 4.019, and one of the programs I was using
broke. Here's the fragment of code it barfed on (from 'classgrid'):

134:    eval <<EOSTUFF;
135:	\$$possible_days[$day_index][$start_index] =
136:	    "$class|$class_types{$type}|$hall";
137:	for(($start_index+1) .. ($end_index-1)) {
138:	    \$$possible_days[$day_index][\$_] =
139:		"v" x $entry_width . "|" .
140:		"v" x $entry_width . "|" .
141:		"v" x $entry_width;
142:	}
143:EOSTUFF

This errors out with:
Spurious backslash ignored at classgrid line 137, <MYFILE> line 4.
Spurious backslash ignored at classgrid line 137, <MYFILE> line 4.
Invalid component in string or format at classgrid line 134, <MYFILE> line 4.

I heard mention of a version 4.035; 4.033 was the latest I could find at
jpl-devvax.  Where can I get 4.035?  Also, is there a way to work around
this bug for now?

Haven't been following comp.lang.perl for a while, so forgive me if this
has been discussed before.  Oh, and could y'all mail replies, as I
haven't been reading news and don't know when I plan to start up again.

Thanks.

--
Jin Choi
jsc@athena.mit.edu
From: joel@abigale.uucp (Joel Rosi-Schwartz)
Newsgroups: comp.lang.perl
Subject: Re: formatted read (beginner's question)
Keywords: read
Date: 30 Sep 92 08:53:12 GMT
Organization: Techne Research, Finchampstead, Berkshire (UK)

In article <1607@rwja.umdnj.edu> majidi@rwja.umdnj.edu (Masoud Majidi) writes:
 [stuff deleted]
>All I want to do is prompt the user for an integer and be able to read
>in the integer from stdin. I was looking for something like scanf in C
>but apparently read() is the only function that perl has for reading
>and the problem is that read() is good when you know the length of the
>input. Am I supposed to write my own routine to read in an integer?
>i.e. read in characters from stdin till the eoln and then convert the
>string to int? There got to be a easier solution for this trivial
>problem ...

Actually, it is much simpler than this.  First of all you could just do:

	$num = <>;
or
	$num = <STDIN>;

These are the same and will put the keyboard input (including the newline)
into $num, so then just do:

	chop $num;

to strip the \n.  Since Perl is not a typed language it will treat $num
however you use it in a context, so if you say:

	$num = $num + 25;

it is an interger.  Beware, though that if the user enters a none number,
say "@$$@!@$@#$", this is 0 in a numeric context, so a bit if sanity
checking may be required on the input if what you are doing is critical
to the users input.

Also, take a look at sprintf() on page 184 of The Book.

Cheers,
Joel

-- 
     ==================================================================
     ||               T E C H N E   R E S E A R C H                  ||
     ||  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  ||
     ||                     Joel Rosi-Schwartz                       ||
     ||   Hildorien House            +   Email: joel@abigale.UUCP    ||
     ||   12 Waverley Way            +    (pyrltd!abigale.UUCP!joel) ||
     ||   Finchampstead, Wokingham   +   Phone: +44 (734) 730.260    ||
     ||   Berkshire RG11 4YD (UK)    +   Fax:   +44 (734) 730.272    ||
     ==================================================================
From: tardieu@hydre.enst.fr (Samuel Tardieu)
Newsgroups: comp.lang.perl
Subject: What is a true value ?
Date: 29 Sep 92 22:58:37 GMT
Organization: Telecom Paris, France

When compiling a perl script which includes the following line:
require 'get.pl';
I obtain the error message from perl:
get.pl did not return a true value at autoget line 6.

In get.pl, there is:
sub main'getfile {
    open(ftp,"| $FTP -n -i $adr > /dev/null") || return;
    print ftp "user anonymous `$WHOAMI`.$DOMAIN\n";
    print ftp "bin\n";
    print ftp "cd $locat\n";
    print ftp "get $nom\n";
    print ftp "bye\n";
    close(ftp);
    }

Tanks for all answers.
-- 
     Samuel TARDIEU  -  Telecom Paris  -  sam@enst.fr  -  (1) 45-81-71-97
From: rickers@ECE.Drexel.EDU (Rick Wargo)
Newsgroups: comp.lang.perl
Subject: Re: Need help with a crazy perl 4.035 probl
Date: 6 Oct 92 22:54:07 GMT
Reply-To: rickers@ECE.Drexel.EDU
Organization: Drexel University, ECE Department

In article 20888@news.eng.convex.com, tchrist@convex.COM (Tom Christiansen) writes:
> From the keyboard of rickers@cbis.ece.drexel.edu (Rick Wargo):
> :Here a problem which I cannot figure out.  I am hoping some bright soul
> :may have a clue because I don't yet have enough money saved for this one.
> :
> :The real problem is that I am writing a huge perl program.  Unfortunately, every
> :now and then I get the weirdest errors when I add a few lines of correct code.
> 
> :	open(TABLE, "<$file");
> :
> :		while (<TABLE>) {
> :			chop;
> :			...
> :			sub Problem_Routine;
> :			...
> :		}
> :
> :	close(TABLE);
> 
> Don't know whether that's literal code, but if so, one calls
> the subroutine with the &Problem_Routine syntax.  The other
> one will make the parser say funny things.

Typed in the code from my keyboard.  Don't know how I typed in
such a blatant mistake.  Obviously it should be &Problem_Routine.

Also, in original article, I noticed that adding a:
	1;
after the problem line made the error messages disappear.  I don't think
there is anything significant about the 1;  just that it makes the
problem line not the last line of the subroutine.

Rick
---
Rick Wargo        e-mail: rickers@CoE.Drexel.EDU

L
LMMM                           Law Manager, Inc.
LMMM         legal office automation specialists
------------------------------------------------
80 west georgianna drive  *  richboro, pa  18954

                                   Richard Wargo
                               Software Engineer
                             tel: (215) 895-1225
                             fax: (215) 895-1690
Newsgroups: comp.lang.perl