HDTenEightyP/NetNews huggingface dataset:
From: pat@news.gsfc.nasa.gov (patrick m. ryan)
Subject: Perl on Cray
Organization: Goddard Space Flight Center
X-Newsreader: TIN [version 1.1 PL6]
Date: Wed, 30 Sep 1992 14:47:17 GMT


Has anyone successfully compiled perl 4.035 on a Cray YMP?
The config file would seem to indicate that it is possible.
We have a Cray YMP running Unicos 6.1.  I get lots of
"not enough stack space" errors when I try to compile it.

Any clues?

thanks,
pat

--
"I have a cunning plan." -- Baldric
                                                             patrick m. ryan
     nasa / goddard space flight center / oceans and ice branch / hughes stx
                     pat@jaameri.gsfc.nasa.gov / zmpmr@charney.gsfc.nasa.gov
From: nigelm@ohm.york.ac.uk (Nigel Metheringham)
Newsgroups: comp.lang.perl
Subject: Re: Docs for PERL Needed.
Date: 28 Sep 92 14:57:42 GMT
Organization: Electronics Department, University of York, UK

In <1992Sep28.085802.21410@rdg.dec.com> jamie@heavy.enet.dec.com (Jamie.) writes:


>Not much help, I'm afraid, but I'm in much the same position as yourself;
>trying
>to find out about Perl without much in the way of documentation...

>In the UK, there are no Perl textbooks in print, so I can't get anything 
>"official" so I've gathered what I can.

The Perl book is available in the UK - I have a copy in my stickly
little hand!  (I'm lying - I put it down to type :-) ).  Contact
O'Reilly's international distributor - Addison Wesley who can be
contacted on UK phone number 0734 79400 or FAX 0734 794035.  They
will happily separate you from your money and send you a copy (they
take credit card orders over the phone).

Alternatively several US bookstores reputedly take email credit card
orders.  Contact info@clbooks.com for information on their method -
which requires an account to be set up by FAX beforehand but
afterwards they will take orders by email and charge to the credit
card mentioned on the FAX authorisation.  They are reputedly
relatively expensive (ie full price).

The trade shows (Unix, networks etc) have piles of Perl books at the
book stands there.  Any half decent bookshop in this country can get
the thing for you (and unlike direct orders from AW you don't get
charged postage!).


>If there's anything else that's publicly available on the net that I can
>learn from, I'd appreciate a pointer.

There was a perl TeXinfo document around - basically a rehashed man
page.  I expect its rather out of date now.

>Also, is there a source repository that I might access to learn by example
>from?

Book examples are on ftp.uu.net.  Tom Christenson's huge archive of
stuff is on convex.com (from memory).  There are loads of Perl
applications out there now.

	Nigel.
-- 
#   Nigel Metheringham  -- (NeXT) EMail: nigelm@ohm.york.ac.uk    #
#   System Administrator, Electronics Dept, University of York    #
#   York YO1 5DD. Phone: +44 904 432374, Fax: +44 904 432335      #
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: Bus Error (is that a bug ;-)
Date: 28 Sep 92 19:39:44 GMT
Organization: NetLabs, Inc.

In article <ASHERMAN.92Sep25165710@gunwale.fmrco.com> asherman@fmrco.com writes:
: 
: A few points that I should make. This program seems to be able to crash
: perl in all sorts of interesting ways. Also, the stack trace and other
: info from gdb in the previous message are on an optimized version of
: perl, so the general location of the error is accurate, but may be
: misleading if it is taken too literally.
: 
: Also, here is the info about my system:
: 
: perl compiled by gcc 2.2.2 on a Sparc IPX (run on a Sparc2) both 
: systems running SunOS 4.1.2.
: perl -v yields: "[...] version 4.0 [...] Patch level: 35 [...]"
: 
: I'm getting sort of frustrated, since I seem to be able to break perl
: at will (poor Will, he didn't mean to do anything wrong ;). Not that I
: don't appreciate perl, but I seem to have started relying on it's 
: solidity just a bit too much :-(

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

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

Larry
Newsgroups: comp.lang.perl
From: chip@tct.com (Chip Salzenberg)
Subject: Re: ? possible (de)reference nested data types syntax ?
Date: Mon, 28 Sep 1992 20:59:21 GMT
Organization: TC Telemanagement, Clearwater, FL

According to ram@eiffel.com (Raphael Manfredi):
>Another alternative would be to use a named function, like:
>	$array_ref = ref(@array);	# For purists :-)
>	$assoc_ref = ref %array;	# For others...

Yes, please!  It could even return an array for:

    ref(@a, $b, %c)

-- 
Chip Salzenberg at Teltronics/TCT  <chip@tct.com>, <73717.366@compuserve.com>
    "My favorite phenomenon is when someone mails me or posts to this
     group, either calling me a newbie or telling me that my postings
     are not relevant to alt.non.sequitur."           -- Matt Welsh
Newsgroups: comp.lang.perl
From: boone@psc.edu (Jon Boone)
Subject: More headers in mail2news
Organization: Pittsburgh SuperComputing Center, Pittsburgh, PA, USA
Date: Thu, 1 Oct 1992 20:21:46 GMT

   I have installed the mail2news script and am successfully
forwarding mailing lists to (local) newsgroups.  I need help changing
the script so that it will allow for followups or replys to go to the
right place (ie, the list) instead of to the local group.  Any help
would be much appreciated.


/*****************************************************************************/
/* Jon Boone  Network Systems Administrator Pittsburgh Supercomputing Center */
/* boone@psc.edu  iain+@cmu.edu  I'm a member of the LPF, how 'bout you?     */
/*    I don't speak for anyone other than myself, unless otherwise stated.   */
/*****************************************************************************/
Newsgroups: comp.lang.perl
From: crabb@chaos.nas.nasa.gov (Michele D. Crabb)
Subject:  Perl on UTS 2.1.4 580
Organization: Numerical Aerodynamic Simulation Facility NASA
Date: Mon, 28 Sep 92 18:12:05 GMT
Reply-To: crabb@chaos.nas.nasa.gov (Michele D. Crabb)

Hi -
I just finished installing Perl 4.34 on an Amdahl 580 running 2.1.4.
In addition to needing the "-eft" flag on the compile, the following
source changes were necessary. Without these changes io/tell.t and
op/read failed miserably.  Of course, as I have made the changes,
the "-DUTS" flag is also needed...

From config.sh:
ccflags='-DUTS -eft -I/usr/netinclude'


# diff -c ../src/doio.c doio.c
*** ../src/doio.c       Wed Jul  8 11:35:12 1992
--- doio.c      Fri Sep 25 13:43:31 1992
***************
*** 646,653 ****
      }
      return TRUE;
  }
!
  long
  do_tell(stab)
  STAB *stab;
  {
--- 646,656 ----
      }
      return TRUE;
  }
! #ifdef UTS
! off_t
! #else
  long
+ #endif
  do_tell(stab)
  STAB *stab;
  {
***************
*** 677,683 ****
--- 680,690 ----
  bool
  do_seek(stab, pos, whence)
  STAB *stab;
+ #ifdef UTS
+ off_t pos;
+ #else
  long pos;
+ #endif
  int whence;
  {

# diff -c ../src/eval.c eval.c
*** ../src/eval.c       Wed Jul  8 11:33:17 1992
--- eval.c      Fri Sep 25 13:55:27 1992
***************
*** 1562,1568 ****
--- 1562,1572 ----
            stab = stabent(str_get(st[1]),TRUE);
        value = str_gnum(st[2]);
        str_set(str, do_seek(stab,
+ #ifdef UTS
+         (off_t)value, (int)str_gnum(st[3]) ) ? Yes : No);
+ #else
          (long)value, (int)str_gnum(st[3]) ) ? Yes : No);
+ #endif
        STABSET(str);
        break;
      case O_RETURN:
#


------------
Michele Crabb, crabb@nas.nasa.gov
Computer Security Analyst/Common Software Support/Postmaster Support
Computer Science Corporation/ NASA-Ames Research Center
Mail Stop 258-6
Moffett Field, CA 94035
(415) 604-4337
From: ram@eiffel.com (Raphael Manfredi)
Newsgroups: comp.lang.perl
Subject: Re: math functions
Date: 29 Sep 92 21:56:28 GMT
Distribution: usa
Organization: Interactive Software Engineering, Santa Barbara CA

Quoting tchrist@convex.COM (Tom Christiansen) from comp.lang.perl:
>From the keyboard of hdnea@usho0e.hou281.chevron.com (David Neal):
>:Atan2 is included in perl but asin is not?
>:
>:What am I missing?  Did I do something really stupid (configuring
>:perl, that is)?
>
>Given sin(), cos(), and atan2(), the other trig functions are
>derivable, or so I dimly recall.  But I don't have the formulae.

	tan(a) = sin(a) / cos(a)

Computing arccos() and arcsin() is straightforward:

	a = arctan(y/x)
	with y = sin(a) and x = cos(a)

	By definition, arccos(x) = a and arcsin(y) = a.

	But we also have x*x + y*y = 1, and therefore:

	arccos(x) = arctan(sqrt(1 - x*x) / x)
	arcsin(y) = arctan(y / sqrt(1 - y*y))

However, I don't think the math library uses those formulae, since it is
certainly faster to compute their value using their integer serie development
(or whatever it is called in English math vocabulary).
-- 
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: rick@mel1.geg.mot.com (Rick Rankin)
Subject: "Camel" book
Organization: Motorola, Mech. Eng. Lab.
Date: Tue, 29 Sep 1992 23:44:20 GMT

I just recently began monitoring this group, and I've seen a number of references to
"the Camel book".  I assume from the context that this is some sort of a
tutorial/reference manual for Perl.  Would anyone care to comment on how useful it is
and perhaps tell me what the entire title is, and who the publisher and author are.


Rick Rankin
Motorola
Government Electronics Group
8220 E. Roosevelt St.
Scottsdale, AZ 85252
Mail Drop R4246

602-441-5726
rick@mel1.geg.mot.com
From: cwilson@toast.wpd.sgi.com (Chan Wilson)
Newsgroups: comp.lang.perl
Subject: Re: question of building array of arrays
Date: 2 Oct 92 22:49:40 GMT
Organization: Silicon Graphics, Inc.  Mountain View, CA
NNTP-Posting-Host: toast.wpd.sgi.com


While we're near the subject, can someone tell me if using the * idea
will make this easier to understand:

#!/usr/local/bin/perl

$Con{'phyloxia', 0} = 7;
$Dbg{'phyloxia', 0} = 8;
$Con{'phyloxia', 1} = 9;
$Dbg{'phyloxia', 1} = 10;

print  &Keys('Con', 'phyloxia') ;
print  &Values('Con', 'phyloxia');

sub Keys {
    local ($sub) = $_[1];
    local (@keys) = eval "keys %$_[0]";
    local (@return);
    foreach (@keys) {
	push (@return, $1) if /$sub$;(\S+)/;
    }
    @return;
}

sub Values {	
    local ($sub) = $_[1];
    local (@keys) = &Keys($_[0], $sub);
    local (@return);
    foreach (@keys) {
	eval "push (\@return, \$$_[0]{$sub, $_})";
    }
    @return;
}

sub Defined {
    local ($sub) = $_[1];
    local (@keys) = &Keys($_[0], $sub);
    foreach (@keys) {
	return 1 if eval "defined \$$_[0]{$sub, $_}";
    }
    return 0;
}


--Chan
       Chan Wilson  ---  cwilson@sgi.com  ---  415/390-5006
	      Silicon Graphics, Inc.   Mountain View, CA
       -> The only stupid question is the one not asked. <-
From: rstory@Elegant.COM (Robert Story)
Newsgroups: comp.lang.perl
Subject: Perl and sco unix (??)
Summary: perl install core dumps on sco unix
Date: 2 Oct 92 19:56:25 GMT
Organization: Elegant Communications Inc.

I have attempted, with no success, to make make perl on a sco unix 3.2.2 
system.  At present perl core dumps on installation.  'make test' turns
up the attached errors. 

  comp/cpp........16618.c(35) : error C2018: unknown character '0x60'
  .16618.c(35) : error C2018: unknown character '0x60'
  .16618.c(37) : error C2018: unknown character '0x60'
  .16618.c(37) : error C2018: unknown character '0x60'
  syntax error in file comp/cpp.t at line 38, next 2 tokens "= ."
  Search pattern not terminated in file comp/cpp.t at line 38, next char ^?
  Execution of comp/cpp.t aborted due to compilation errors.
  op/dbm..........FAILED on test 0
  op/push.........panic: cmd_exec at op/push.t line 35.
  op/s............FAILED on test 0
  op/sprintf......panic: cmd_exec at op/srintf.t line 7.


Additionally, 'make depend' sucks in dependencies for include files not on my 
system.  ie: it ignores the directives to not include certain files. 

Would someone with a similar system please e-mail me a copy of their 
config.sh.  Thanks.


-Robert.
-- 
 _________________________________________________________________________
 Robert.Story@Elegant.COM                      Elegant Communications Inc.
 Tel: +1 416 362 9772                        4 King Street West Suite 1101
 Fax: +1 416 362 8324                     Toronto, Ontario; CANADA M5H 1B6
From: fhd@panix.com (Frank Deutschmann)
Newsgroups: comp.lang.perl
Subject: Need help with regexp problem
Date: 6 Oct 92 20:40:46 GMT
Organization: PANIX Public Access Unix & Internet, NYC


I am trying to use Perl to parse an SGML file, but have encountered
some problems!

For those of you not familiar with SGML, the following is a crash
course on the relevant points:
	A document is a plain ASCII file, and is made up of text
enclosed in tags. Tags may also be enclosed in tags, and the entire
document is enclosed in a tag pair which indicates a markup system to
use (this is a gross over-simplification...).  Tags have the format of
being surrounded by <>, with the tag name appearing immediately after
the < (again a simplification, but sufficient for my needs).
following the tag name, but before the >, optional modifiers may be
added to the tag; modifiers are of the form name="value" -- if " must
appear in value, it is doubled. Tags may, of course, appear in
value....  Names are made up of the characters a-zA-Z0-9._- . 
Ending tags (for my application, tags are always in pairs) are
indicated simply by </tagname>.

So, for example, the following is an SGML sampling:
===================
<par>How about a small graphic:</par>

<figure-block >

<graphic Filename="testing"><?Pub Lcl Res="39" ProcType="Built In"
BuiltIn="IslandDraw">
</graphic>

</figure-block>
==================================
As tags can span lines, I undef the record sep char, but that is not
the problem.

To find tags, I came up with the following regexp:
@testTag = /<([-\w\.]+)((\b([-\w\.]+)=\"(([^\"]|\"\")*)\")*)\b?>/;
 **Note thate the reason for the seemingly undue complication is the
SGML capability to have tags inside of optional modifier values, as
well as quotes.

My logic to explain the above:
<([-\w\.]+)((\b([-\w\.]+)=\"(([^\"]|\"\")*)\")*)\b?>
< -- find opening character
 ([-\w\.]+) -- find the tag name
           ((\b([-\w\.]+)=\"(([^\"]|\"\")*)\")*)\b?>
             \b -- white space if there are optional modifiers
               ([-\w\.]+)=   --- modifier name (never space between name and = 
                          \"               \"  -- values are in ""
                             ([^\"]|\"\")*   -- any char but " OR "",repeat 0+
                            (             )  -- get modifier value
            (                                )*  -- 0+ opt modifiers
           (                                   )  -- get the modifier string
                                                \b?>  -- opt space before >


Now, this all looks real good, but it doesn't work!  In particular, it
will only match tags that have no optional modifiers; if a tag has an
optional modifier, it won't match, and I can't figure why (not)!!!

One little problem this example brings to light is the problem of
using parens as both storage ops, as well as grouping ops; while not a
big deal, it does make life slightly confusing.

If this is a bug, I'm simply SOL; but more likely it is simply Drain
Bammage on my part, and I would really appreciate being enlightened...

Thanks in andvane for any enlightenment...
-- 
-frank
(fhd@panix.com)
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Beginner question
Originator: tchrist@pixel.convex.com
Date: Sun, 4 Oct 1992 23:36:28 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 tanaka@til.til.com (Yokichi Tanaka):
:I have a simple question.  If I use the -i switch, is there
:any way to direct output to the target file outside of the
:<> loop?
:
:    #!/usr/bin/perl -i.bak
:    while (<>) {
:       ... do something here ...
:    }
:    print "\n";
:
:In the above case, I want an extra \n to be appended to the
:end of the file.
:
:If it can be done, is there any way to do it (append at end
:of file) if I use a -pi switch?

This works:

    perl -pi -e '$_ .= "\n" if eof' foo bar and another file

You have to check "eof" (not "eof()"!) to see when you're
at the end of each file.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
    "...this does not mean that some of us should not want, in a rather
    dispassionate sort of way, to put a bullet through csh's head."
		Larry Wall in <1992Aug6.221512.5963@netlabs.com>
From: mjeffery@reed.edu (Mark Jefferys)
Newsgroups: comp.lang.perl
Subject: Re: ? possible (de)reference nested data types syntax ?
Date: 29 Sep 92 21:19:30 GMT
Article-I.D.: reed.1992Sep29.211930.26738
Organization: Reed College, Portland, OR

In article <2AC77229.9104@tct.com> chip@tct.com (Chip Salzenberg) writes:
% According to ram@eiffel.com (Raphael Manfredi):
% >Another alternative would be to use a named function, like:
% >	$array_ref = ref(@array);	# For purists :-)
% >	$assoc_ref = ref %array;	# For others...
% 
% Yes, please!  It could even return an array for:
% 
%     ref(@a, $b, %c)

Or even:

    ref { local ($x) = @_; ... }

Poof!  Instant anonymous functions.


    ref /(\w+)/

could be equivalent to

    ref { /(\w+)/ }

so we would have a nice shorthand for passing pattern
matches/substitutions without repeatedly evaling a string.


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.



Mark
From: knechod@stacc.med.utah.edu (Kevin Nechodom)
Newsgroups: comp.lang.perl
Subject: Flat memory OS/2 perl executables?
Date: 6 Oct 92 17:35:02 GMT
Article-I.D.: fcom.1992Oct6.173502.21300
Organization: University of Utah STACC

I am looking for a version of perl for OS/2 that does not have a 640K
limit.  Unfortunately, I don't have any way to compile it, so I need
an executable.  Is there some archive site that would have that?
-- 
Kevin Nechodom UofU STACC        | Great minds talk about ideas.
 UofU doesn't even know I exist; | Good minds talk about things.
 how would they care what I say? | Little minds talk about other people.
knechod@stacc.med.utah.edu       | Which are you? (paraphrased from old RD)
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: reset woes?
Originator: tchrist@pixel.convex.com
Date: Tue, 6 Oct 1992 14:40:23 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
Keywords: reset, DBM
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 weingart@inf.ethz.ch:
: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});
:}
:

: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?

You're using "reset" when what you really mean is "delete".

The reset operator is an archaic piece of magic that takes
a bunch of characters and undefs all the variables that start
with those characters.  reset('abc') finds all variables of
all types (in the current package) that whose names match 
/^[abc]/ and undefs them.  I used this "feature" five years
ago or so, but got over it.  I now dive into the symbol table
directly when I want that kind of action.

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

    Be consistent.
            --Larry Wall in the perl man page 
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Perl program grows in size
Originator: tchrist@pixel.convex.com
Date: Thu, 1 Oct 1992 00:33:44 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 jefftep@cs.utexas.edu (Jeffrey Grills):
:
: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.  

Look for any local()s.  For example:

    for (;;) {
	local(@foo) = `cmd`;
    } 

which as currently implemented will cause an apparent memory leak.

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

    Real Programmers don't write in PL/I.  PL/I is for programmers who
    can't decide whether to write in COBOL or FORTRAN.
Newsgroups: comp.lang.perl
From: pat@news.gsfc.nasa.gov (patrick m. ryan)
Subject: SUMMARY - Perl 4.035 on Cray
Summary: perl,ksh
Organization: Goddard Space Flight Center
X-Newsreader: TIN [version 1.1 PL6]
Date: Fri, 2 Oct 1992 12:18:29 GMT


Thanks to the several people who helped me fix my compilation
problems.  Here is what it boiled down to for me:

1.	/bin/sh doesn't normally have enough stack space.
	Several people told me I could increase it by
	using the -m+100000 option.  I found an even simpler
	solution: I used /bin/ksh rather than /bin/sh.
	The Korn shell doesn't seem to have these stack
	problems.

2.	Use the native Cray malloc routine.  "make test"
	failed miserably when using perl's malloc.

3.	Use strchr(), not index().  I don't know why this
	is but it's true.

4.	NPROC=1.  I had accidentaly set NPROC=4 in my
	environment and got multitudes of "INTERNAL
	COMPILER ERROR"s.  unsetting NPROC forced
	"make" to execute only one command at a time.

FYI, we have a Cray YMP 464 running Unicos 6.1.  My
shell is /bin/ksh.  [haven't gotten bash running on the
Cray yet.  grrrr...]

pat

--
"I have a cunning plan." -- Baldric
                                                             patrick m. ryan
     nasa / goddard space flight center / oceans and ice branch / hughes stx
                     pat@jaameri.gsfc.nasa.gov / zmpmr@charney.gsfc.nasa.gov
Newsgroups: comp.lang.perl