HDTenEightyP/NetNews huggingface dataset:
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: Variable interpolation in formats
Keywords: eval bug in formats
Date: 14 Aug 92 00:57:48 GMT
Distribution: usa
Organization: NetLabs, Inc.

In article <bmarlowe.713124273@ka> bmarlowe@ka.reg.uci.edu (Brett Marlowe) writes:
: 
: There seems to be a bug (feature?) in argument evaluation of formats
: in perl 4.019.  Variables are interpolated from the caller's package
: but the same variable not in a string get evaluated in the format's
: package.  Seems to me it should be more consistent. Here's a
: demonstration program:
: 
: $main'foo = "bug!";
: $test'foo = "demo";
: 
: $~="test'a";
: write;
: 
: $~="test'b";
: write;
: 
: package test;
: 
: format a=
: This prints demo: @<<<<
: $foo
: .
: 
: format b=
: This prints bug: @<<<<
: "$foo"
: .

Yep, it's a bug.  Fixed in 5.0, if not sooner.

Larry
From: jdh@bu-pub.bu.edu (Jason Heirtzler)
Newsgroups: comp.lang.perl
Subject: Re: perl sort bug on Irix?
Date: 14 Aug 92 19:32:16 GMT
Organization: Boston University, Information Technology

In article <93641@bu.edu>, I wrote:
>Perl's sort seems to behave oddly on Irix.  What I would like
>to do is an inverse sort based on the length.  Is this program
>correct perl (ie. not some implementation dependant thing?)
>
>  #!/usr/local/bin/perl --    # -*-Perl-*-
>
>  push( @dirs, "usr" );
>  push( @dirs, "usr/bin" );
>  push( @dirs, "usr/bin/X11" );
>  push( @dirs, "usr/lib" );
>
>  @crud =  sort {length($a) < length($b);} @dirs;
>
>  foreach $p ( @crud ) {
>      print "$p\n";
>  }

Thanks to all the people who responded, and said to use:

  @crud =  sort {length($b) <=> length($a);} @dirs;

One interesting response came from pomeranz@nas.nasa.gov
(Hal R. Pomeranz) who suggested:

  By the way, if @dirs or whatever you're sorting is going to be a long
  list and if you were using some more CPU intensive function than
  length(), you could speed up your code:
 
  #!/usr/local/bin/perl

  @dirs = ("usr", "usr/bin", "usr/bin/X11", "usr/lib", ... );	# whatever
  grep(($lengths{$_} = length($_)), @dirs);
  @crud =  sort {$lengths{$a} <=> $lengths{$b};} @dirs;
  print join("\n", @crud), "\n";

  The grep() statement is a little mysterious here, but it's really just
  a tight loop through the @dirs list which sets the values of an
  associative array to the lengths of the strings in your list.  Then
  you can compare the lengths by doing table lookups instead of
  recomputing the function in the sort clause each time.  This way you
  do O(n) function calls instead of O(n*log(n)).

Thanks, folks..
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: Local variable assignment bug in 4.035?
Date: 12 Aug 92 23:17:38 GMT
Organization: NetLabs, Inc.

In article <1992Aug11.171836.20143@reed.edu> mjeffery@reed.edu (Mark Jefferys) writes:
: In article <1992Aug11.025222.26759@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes:
: 
: _% $num = 5;
: _% 
: _% &foo($num);
: 
: _% sub foo {
: _%     local($num);
: _% 
: _%     ($num) = @_;
: _% 
: _%     print "foo: $num\n";
: _% }
: 
: _% foo:
: 
: Maybe Larry can tell us whether this is [will be treated as] a bug or
: a feature.

Perl 5 will handle this by introducing static scoping of some sort or
other.  Perl 4 handles this by blessing only the "local($num) = @_"
form for use by anyone who doesn't understand dynamic scoping.
Assignment to a local() takes specific pains to copy the value of the
right-hand side before localizing the variables on the left.  This
is the sense in which "variable suicide" was fixed.  It has not
been fixed in any other sense--the general way to fix dynamic scoping
is with static scoping.

Just to satisfy your curiosity, I suspect that static scoping will
be done with "my":

    my($arg1,$arg2) = @_;	# list context for right-hand side
    my $foo = <>;		# scalar context for right-hand side!

Larry
From: merlyn@romulus.reed.edu (Randal L. Schwartz)
Newsgroups: comp.lang.perl
Subject: Re: comp.lang.perl.scripts (?)
Date: 22 Aug 92 19:33:01 GMT
Article-I.D.: romulus.MERLYN.92Aug22123258
Organization: Reed College

Uh, that can probably be just done here, until the traffic warrants a
separate group.

At most maybe a keyword or something in the subject line so that
people can set their phasers on KILL if they choose not to see
something.

Really... has skipping past source code been a problem for people
here?

It'd also mess up the mail-reflector (at virginia.edu) to have a new
group... we'd have to have a parallel mail reflector or some bizarre
convoluted (Perl? :-) script to decide which was source and which was
discussion.

print unpack('@2a@15a@13a@14a@0a@4a@10a@11a@14a@7a@6a@12a@0a@3a@6a@12a@9a@0a@7a@4a@5a@8a@6a@12a@1a', ' ,JPacehklnorstu')

--
Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
merlyn@reed.edu (guest account) merlyn@ora.com (better for permanent record)
cute quote: "Welcome to Portland, Oregon -- home of the California Raisins!"
From: merlyn@romulus.reed.edu (Randal L. Schwartz)
Newsgroups: comp.lang.perl
Subject: Re: Filename expansion ("~user")
Date: 21 Aug 92 16:23:01 GMT
Article-I.D.: romulus.MERLYN.92Aug21092257
Distribution: usa
Organization: Reed College

In article <1992Aug20.153727.167@cbnews.cb.att.com> daleske@cbnews.cb.att.com (John D. Daleske) writes:
   If I set $tst1 to the full pathname it works fine.  I'd like to use the common
   facility of ~user to avoid needing to know the full path name.  (User home
   directories do get moved around.)

There's nothing in the Unix kernel that understands the tilde hack
(introduced by the C-shell, and copied to half a dozen other bezerkley
utilities).

Fetching the home directory is easy enough though:

	$file = "~merlyn/.newsrc";
	$file =~ s#^~([a-z0-9]+)(/.*)?$#(getpwnam($1))[7].$2#e;


(If you mess with $[, you deserve what you get. :-)

for('a'..'z','A'..'Z'){*XX=$_;$XX=$_;}print"$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $h$a$c$k$e$r,"
--
Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
merlyn@reed.edu (guest account) merlyn@ora.com (better for permanent record)
cute quote: "Welcome to Portland, Oregon -- home of the California Raisins!"
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: Defined behavior?
Date: 15 Aug 92 18:45:23 GMT
Organization: NetLabs, Inc.

In article <BszuD5.515.1@cs.cmu.edu> jfriedl@cs.cmu.edu writes:
: Excuse the pun, but is the following defined behavior?
: 
: The two-line program
: 	$foo = 1; defined($foo,$foo);
: 	print $foo;
: when executed with 'perl -w' (v4.035)  produces
: 	Use of uninitialized variable at file line 2.
: 
: It seems that the odd usage of 'defined' (having more than one "argument")
: undefines the "arguments" (I'm guess they're not really arguments, but
: expressoins linked by the comma operator).

The code that analyzes lvalues is rather, um, ad hoc.  It's getting
confused somehow and generating an assignment where the left side is
the list ($foo,$foo) and the right side doesn't exist.

: I stumbled across this due to some dyslexic typing on my part.

More like "lysdexic", which if you don't mind a bit of Greek would
mean that the right side is rotting away.  Appropriate...

Since that code is going to be revised for perl 5 anyway, I'm not gonna
worry about it for the moment.

Larry
From: tchrist@convex.COM (Tom Christiansen)
Newsgroups: comp.lang.perl
Subject: Re: Avoiding intermediate variable
Date: 21 Aug 92 00:14:12 GMT
Article-I.D.: news.1992Aug21.001412.22695
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
Originator: tchrist@pixel.convex.com
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 Mark.McIntosh@engr.UVic.CA (Mark  McIntosh):
:Someone out my location would like to avoid the intermediate variable
:in the following piece of code, assuming $y has been set to some value:
:
:       $tmp = $y;
:       $tmp =~ s/xy/zz/;
:       print $tmp;
	
:He wants to retain the value of $y for later use but use a modified
:version of it once - he won't need it later.  Is there a way to do
:this in Perl without using an intermediate variable?

You can always use

    ($tmp = $y) =~ s/xy/zz/;
    print $tmp;

But there's still a temporary.  If you tried quite hard, you 
could do 

    print $y =~ /xy/ && "$`zz$'";

but that seems too obfuscating.

:If not, then we suggest having another form of the "=~" operator (or a
:function?) which returns the modified value instead of replacing the
:value in the "operated on" variable.  Maybe a "~" operator.
:
:eg.
:      print $y ~ s/xy/zz/;
:
:Are we crazy?  I think this would be useful.  Or are we missing something?

Therein lies the awk fallacy.  Tilde already has a legimate meaning. 
Usurp it not.

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

    I dunno, I dream in Perl sometimes...
                    --Larry Wall in  <8538@jpl-devvax.JPL.NASA.GOV>
Newsgroups: comp.lang.perl
Subject: questions
From: steiner@jupiter.cse.utoledo.edu (jason "Think!" steiner)
Date: 22 Aug 92 16:39:10 EST

i discovered pearl last week, printed out the man pages & have been
experimenting a bit. it's a great language, but being such a newbie
i tend to make some mistakes/assumptions that i should be able to
avoid...

here's one of many questions:

i have a search line like

		$line =~ /^(.{0,$limit}[${spacechars}])(.*)$/;

which grabs as many words as can fit in $limit space + the next separator
into $1 and puts the rest in $2. just in case there isn't a separator
in the limit the next line is

		$line =~ /^(.{0,$limit})(.*)$/ unless $1;

(just grab $limit characters, don't worry about separators.)
this is assuming that the first match will set $1 to null or undefined
if it doesn't get anything. can i do that? it seemed reasonable to
me, but then the second case kept failing. i printed $1 between the
two statements & it had the value of a $1 from earlier in the script.
does match just ignore the $[1-9] values if they're not found?

the script works now, (i clear $1 before doing the matches) i'm just kinda
curious.

jason, who can now hit * in vi and wordwrap everything while maintaining
followup quotes and trimming attribution lines.

--
`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,
`, "Get off the cross. We need the wood." steiner@jupiter.cse.utoledo.edu `,
`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: array bug
Date: 17 Aug 92 00:31:05 GMT
Organization: NetLabs, Inc.

In article <Bt1rC8.E6J.1@cs.cmu.edu> jfriedl@cs.cmu.edu writes:
: The following (contrived) program dumps core with 4.035
: 
: 	&foo;
: 	sub foo {
: 	    ($a, $b) = &foo('fi','b');
: 	}
: 
: I've run it (and had the problem) on Sun 3, Sun 4, IBM-RT,
: Pmax, Vax, and Luna/88k.
: 
: Any ideas?

Yes, don't do infinite recursion.  It's a bit hard on the virtual
memory system to grow the stack without limit.  You won't find a
machine in the world that can do it, only machines that appear to let
you get away with it for a while.  Every time you call &foo from within
&foo, you force the run-time system to remember to schedule another
assignment to ($a, $b) when the function call returns, and it has to
remember this by pushing its context onto a stack.

[Yes, there are certain smart compilers that can optimize certain kinds
of stateless recursion into mere iteration and thus spare the stack,
but unless you give a terminating condition it'll still run forever...]

It would be nice if Perl could detect infinite regression and give 
you a meaningful message, but in general an OS tells you that you've
blown it by refusing to give you access to Yet Another Page of Virtual
Memory, and there's nothing much left to do but dump core.  Note however
that if you run the above with a -w switch it should say

    Possible typo: "a" at - line 3.
    Possible typo: "b" at - line 3.
    Deep recursion on subroutine "foo" at - line 3.

It says that when it discovers it's 100 levels deep in unreturned calls.

Larry
Newsgroups: comp.lang.perl
From: tate@faxcsl.dcrt.nih.gov
Subject: AtoP Translator/More Docs for the Novice
Organization: National Institutes of Health
Date: Tue, 18 Aug 1992 19:10:58 GMT

Hello out there in Perl-land...
I'm posting this for a new Perl user who wants desperately to locate how-to
info on Perl in general and AtoP specifically (including where to get the
latter). Any help would be greatly appreciated, and thanks in advance.
From: per@oslace.NOHOST.NODOMAIN (Per Soderlind)
Newsgroups: comp.lang.perl
Subject: Re: X thing to get string?
Date: 19 Aug 92 09:13:02 GMT
Reply-To: per@oslace.NOHOST.NODOMAIN (Per Soderlind)
Organization: Digital Equipment Corp.


If you have motif 1.1.3 , you should have a program called mgti (MotifGeTInput),
or gti, it should be in your /usr/bin/X11 directory. In the same directory,
you also have myni (MotifYesNoInput) and mfyi (MotifForYourIntrest).

rgds,
Per
Newsgroups: comp.lang.perl
From: neil@salmon.demon.co.uk ("Neil S. Briscoe")
Subject: Where is patch?
Date: Thu, 20 Aug 1992 08:03:31 +0000

I asked archie to tell me where to find patch and it gave me quite a
long list with various program names.  patch1 was the most common name
but it had varying sizes even on the same site.  Can someone give me a
defacto site and directory for this please?

Regards
Neil

Neil S. Briscoe				Telephone: +44 252 376737
System Administrator			Fax:       +44 252 376644
                                        Email: neil@salmon.demon.co.uk
                                               nbriscoe@cix.compulink.co.uk
Bartec Medical Systems Ltd.
Impression House
Invincible Road				"!##@!** Listen who swears
Farnborough				 Christopher Robin has fallen downstairs"
Hants GU14 7NP				-- The Goodies Book of Criminal Records
England
"A man is incomplete until he's married -- then he's finished!"
-- seen on a desktop calendar
From: george@ache.mad.adelaide.edu.au (George Travan)
Newsgroups: comp.lang.perl
Subject: pwbitch
Date: 18 Aug 92 07:20:28 GMT
Organization: University of Adelaide, South Australia
Originator: george@ache.mad.adelaide.edu.au

Anyone got 'pwbitch' to work. i tried it on a dummy passwd file and it 
didnt complain at all. Anyone indicate how I should run this program?
I have little info and understanding of perl.

Sorry if this appears trivial to some, but its not to me.

btw. Any other sysadmin type tools around??

/Geo

-- 
                  George Travan "A Rebel Without A Clue!"                   
                  E-mail: george@ache.mad.adelaide.edu.au                       
     Phone: (Australia) +61 08 228 5968   Fax: (Australia) +61 08 224 0464  
        University of Adelaide,G.P.O Box 498 Adelaide, AUSTRALIA 5001       
Newsgroups: comp.lang.perl
From: jboeske@namao.uucp (John Boeske)
Subject: Re: #! Emulation in MSDOS
Organization: University Of Alberta, Edmonton Canada
Date: Thu, 13 Aug 1992 21:20:43 GMT

>In a recent posting, I saw a reference to #! emulation in MSDOS.  The
>posting showed a code fragment which was to be place at the front of the
>file:
>@REM=(qq!
>@echo off
>perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
>@goto end :) if 0;
>After trying this, it became obvious that a line or two is required at
>the end of the file after the Perl code.  I'm not versed enough in Perl
>to figure out the lines at the end. 

I have the following file, _.bat in my path:
----------------------- _.bat -----------------------
@echo off
if not "%1"=="#" goto EXIT
shift
shift
shift
perl -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
:EXIT

and I start my perl scripts with
---------------------- hello.bat ---------------------
@_; # perl %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
print "JADPH\n";


This seems simpler to me, but I can't easily put -w's and the like in
the perl script.  And I haven't yet explicitly put . in my PATH, so I
have to make sure that my scripts are in my PATH.  But I'm happy anyway.

John Boeske                 System Software, CNS, University of Alberta
jboeske@namao.ucs.ualberta.ca
Newsgroups: comp.lang.perl
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: write/format bug
Date: 14 Aug 92 00:11:47 GMT
Distribution: comp
Organization: NetLabs, Inc.

In article <RICKB.92Aug12173851@farfle.farfle.asd.sgi.com> rickb@farfle.farfle.asd.sgi.com (Rick Braumoeller) writes:
: A Perl script that I use goes into several directories and
: collects information about the files in them.  It then summarizes
: using "write".  Sometimes the information can be multi-lined,
: so I'd like to get output like this:
: 
: Directory  |  Comments
: -----------+----------------------------------
: dir1       |  This and that
: foo        |  A longer comment, that spans two
:            |  lines
: 
: For this, I am using the following format:
: 
: format STDOUT =
: @<<<<<<<<< |  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
: $dir,         $results{$dir}
: ~~         |  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
:               $results{$dir}
: .
: 
: However, when I run with this format, Perl goes into some kind
: of infinite loop when I do the first 'write' - slowly
: consuming memory.  If I get rid of the | from the continuation
: line, like this,
: 
: format STDOUT =
: @<<<<<<<<< |  ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
: $dir,         $results{$dir}
: ~~            ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
:               $results{$dir}
: .
: 
: everything works fine, but my output isn't as nice.
: 
: Have I stumbled on something?  If you can't reproduce this
: behavior, I'll gladly forward my script to you.

The current implementation detects blank lines by checking to see
if the line is blank after inserting all the fields.  In Perl 5
this will be revised so that a line is considered blank if none
of its @ or ^ fields interpolated anything (expect whitespace).
If I manage to put out another patch for version 4 it'll include
that change.

Larry
Newsgroups: comp.lang.perl
From: mhelgren@cat3.cs.wisc.edu (Matt Helgren)
Subject: Perl compiled for NeXT 
Organization: University of Wisconsin, Madison -- Computer Sciences Dept.
	
	Anyone have or know where I can find a _compiled_ version of Perl
Date: Thu, 13 Aug 1992 18:47:38 GMT

Matt Helgren
mhelgren@cs.wisc.edu



Newsgroups: comp.lang.perl
From: farnham@spot.Colorado.EDU (Farnham Dave)
Subject: Bug with $number variables ???
Organization: University of Colorado, Boulder
Date: Wed, 19 Aug 1992 04:07:08 GMT


Consider the small code fragment below:

    ---------------------------------------------
    $search_str = "^farnham:";

    open (PASS, "/etc/passwd");

    while ($line = <PASS>) {
        if ($line =~ /($search_str).*:.*:.*:.*:.*:(.*)$/) {
            ($login = $1) =~ s/:$//;  # remove ':'
            $shell = $2;
            print "Name <$login>   Shell <$shell>\n";
        }
    }
    ---------------------------------------------

The two lines I'm referring to are:
    ($login = $1) =~ s/:$//;  # remove ':'
    $shell = $2;

In PL-35 "$2" has vanished.  It appears that after a
substitute all the $number variables get reset to null
even if I don't do another capture.

This wasn't the case in PL-19.  Was I abusing PL-19 or
did something break?


Thanks,


Dave

================================================================
Dave Farnham
Ball Aerospace
Electro-Optical/Cryogenics Division  "Why is my office so cold?"
P.O. Box 1062
Boulder, CO  80306    (303) 939-5515
{ farnham@spot.colorado.edu, farnham@handel.cs.colostate.edu }
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: Assoc array indirection
Date: 17 Aug 92 17:08:50 GMT
Organization: NetLabs, Inc.

In article <1992Aug17.100513.9649@nuscc.nus.sg> ccechk@nuscc.nus.sg (Heng Kek) writes:
: #!/usr/bin/perl
:   %ipaddr = ('nusunix1','137.132.73.11',
:              'nusunix2','137.132.10.11',
:              'nusunix3','137.132.91.12'
:             );
:   @host   = ('nusunix1',
:              'nusunix2',
:              'nusunix3'
:             );
: print eval "\@ipaddr{@host[0..1]}";              # no go
: print eval "\@ipaddr{join(',', @host[0..1])}";  # no go
: print eval "\@ipaddr{$host[0], $host[1]}";      # okay

This only works accidentally because all your host names happen to
be identifiers, which when parsed are interpreted as unquoted strings.

: Why doesn't the 1st 2 print()s do what I expect?

Because you aren't interpolating a comma between the two host names.

: How do I achieve my goal, given my intentions in:
: 
: print eval "\@ipaddr{join(',', @host[0..1])}";  # no go

Why do you quote the first @ and not the second?  Try

    print eval "\@ipaddr{\@host[0..1]}";

or better

    print eval '@ipaddr{@host[0..1]}';

or even better

    print @ipaddr{@host[0..1]};

Why do you need the eval?

Larry
Newsgroups: comp.lang.perl
From: adam@franz.com (Adam T. Dingle)
Subject: Is any company offering Perl support?
Organization: Franz Incorporated, Berkeley CA
Date: Thu, 20 Aug 1992 18:12:33 GMT

Does anyone know of any company which offers commercial support for
Perl?  I would be interested in hearing about any company which
distributes Perl executables for various platforms, answers questions
about the language, distributes patches, and so on.  I would
also like to know about any company which can be paid to port
Perl to new platforms or to integrate Perl with existing applications.
I am particularly interested in MS/DOS perl support.

Thanks for any information.

Adam Dingle
adam@franz.com
Newsgroups: comp.lang.perl
From: Studentbladet <stbl@otax.tky.hut.fi>
Subject: Re: #! Emulation in MSDOS
Reply-To: stbl@otax.tky.hut.fi
Organization: The Internet
Date: Fri, 14 Aug 1992 16:36:41 GMT

*** Quoting Mark C. DiVecchio (K3FWT) in Digest #497: 
 > In a recent posting, I saw a reference to #! emulation in MSDOS.  The
 > posting showed a code fragment which was to be place at the front of the
 > file:
 > @REM=(qq!
 > @echo off
 > perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
 > @goto end :) if 0;
<rest omitted> 

As a general tip, using DOS without 4DOS seems like a braindead thing to
do. This is an unsponsored plug. 

In 4dos, you just need declare 

SET .PL=c:\bin\perl.exe 

and wallah, all files with the .PL extension will be invoked via your
Perl interpreter. You won't need the #! stuff (but it won't hurt if you
have it). 

Go on, flame me. :-)

/* era */

--
era is actually Robin "era" Eriksson, B}tsmansgatan 19 B 32, 00150 H:fors
Finger stbl@otax.tky.hut.fi for info about deadlines, addresses & such 
.ObDiscl: I rarely know what I'm doing  .ObQuote: <none>  .ObHack: (bool) 1
Newsgroups: comp.lang.perl
From: eburk@sfsuvax1.sfsu.edu (Eli Burk)
Subject: system & exec questions
Originator: eburk@sfsuvax1.sfsu.edu
Organization: San Francisco State University
Date: Thu, 20 Aug 1992 23:48:26 GMT

I am having some difficulty understanding how to use perl
system & exec functions. As an example if I have @list
and I want to send this out to my system (unix) what is
the best wa? As an example I want to use unix "pr"
the following is from memory - but it shows the basic idea...
csh script fragment (cal 9 1992; cal 10 1992) | pr -t -2
How do I acomplish the same thing in perl? If I pass the 
"cal"s to @list how can I then pipe @list to "pr"?

-- 
..out in the street, with your cheap fur on, or maybe your plastic raincoat
and your plastic shoes, they look good too, standing in the snow you're young-
er than you look, {fall in love with me} 2X, how i wish you would...[Iggy Pop]
eburk@futon.sfsu.edu -or- eburk@sutro.sfsu.edu -or- eburk@sfsuvax1.sfsu.edu