HDTenEightyP/NetNews huggingface dataset:
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Problem with order of precedence, maybe
Originator: tchrist@convex.convex.com
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: CONVEX Realtime Development, Colorado Springs, CO
Date: Thu, 30 Jul 1992 15:05:00 GMT
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 sherman@unx.sas.com (Chris Sherman):
:Consider the following code:
:
:-----------------------------------------------
:#!/usr/local/bin/perl
:if (1 & 0 != 0) { print "1\n";}
:if (0 & 1 != 0) { print "2\n";}
:if (1 & 0 != 1) { print "3\n";}
:if (0 & 1 != 1) { print "4\n";}
:
:if ((1 & 0) != 0) { print "and 1\n";}
:if ((0 & 1) != 0) { print "and 2\n";}
:if ((1 & 0) != 1) { print "and 3\n";}
:if ((0 & 1) != 1) { print "and 4\n";}
:-----------------------------------------------
:
:Besides the output, both sets of statements are similar, except for the
:()'s on the bottom set. 

Check K&R: == and != bind more tightly than &.  Unfortunately,
they bind less tightly than &&, which is why people want get
confused.  I just tracked down a dozen cases of this in our
kernel and utils source (in C).

--tom
-- 
"GUIs normally make it simple to accomplish simple actions and impossible
to accomplish complex actions."   --Doug Gwyn  (22/Jun/91 in comp.unix.wizards)

     Tom Christiansen           tchrist@convex.com      convex!tchrist
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: write
Date: 24 Jul 92 19:30:56 GMT
Organization: NetLabs, Inc.

In article <1992Jul23.155101.22025@noose.ecn.purdue.edu> newlin@purcell.ecn.purdue.edu (Johnny N.) writes:
: Is there any way to make write send its output to a buffer instead
: of a filehandle?

Not yet.

Larry
From: tchrist@convex.COM (Tom Christiansen)
Newsgroups: comp.lang.perl
Subject: Re: open - Does it use the shell?
Keywords: open, shell
Date: 27 Jul 92 14:53:08 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: CONVEX Realtime Development, 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 weingart@inf.ethz.ch:
:Yo, perl dudes and dudettes!
:
:I have a small perl script, which amounts to roughly:
:
:$args = join(' ', @ARGV);
:$prog = './someperlprog';
:open(FOOBAR, "$prog $args -xxx -xxx |");
:chop( @DATA = <FOOBAR> );
:foreach $i (@DATA){
:...
:}
:
:Ok, the prob is this, the open seems to invoke the
:shell.  Yes, there are meta-chars in $args, but $prog
:exists.  Does open always invoke the shell on meta chars?
:
:There has got to be a better way than to doubly escape,
:or quote everything.

Indeed.

If $args contains metacharacters, and you don't want
the shell intervening for the above command, do this:

    open(FOOBAR, "-|") || exec $prog, $args, ("-xxx") x 2;

And don't forget your error checking.    


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


    "We don't care.  We don't have to.  We're the Phone Company."
From: rburns@key.COM (Randy Burns)
Newsgroups: comp.lang.perl
Subject: Are there any forms tools that work with perl?
Date: 22 Jul 92 19:01:38 GMT
Organization: Amdahl Corporation, Advanced Systems, Fremont CA


I'm looking for a forms tools that would be able to work with
Sybperl. I've heard that Hyperlook can provide such funcatinality,
but I'd prefer something that has source code availability even if
it means it much be character mode based. Thanks!
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: "b subname" doesn't work in "perl -d" (v. 4.019) ?
Keywords: nn
Date: 28 Jul 92 17:06:56 GMT
Organization: NetLabs, Inc.

In article <22058@venera.isi.edu> sondeen@isi.edu (Jeff Sondeen) writes:
: In article <1992Jul23.191956.9796@netlabs.com> lwall@netlabs.com (Larry Wall) writes:
: >Your subject line answers your question.  Upgrade to 4.035.
: >
: 						^^^^^^^^^^^
: 					getting there, so far at 4.034
: 
: I'm happy to report that the "break subname"'s are working in 4.034,
: but now I'm getting "Malformed cmd links" from perl, although
: "Configure" and "make" seemed to have gone fine.  It was the same for
: 4.033.  Is this indicative of an obvious mistake?
: 
:    perl edifi.p bigmult.edn 
: Malformed cmd links
:    toplibrary: BIGMULT
:    topview: view_1
:    ...

Try to reduce it to a small test case if possible. 

: By the way, where can I find the patch 35 -- I missed it and it isn't
: on ftp.uu.net and certainly not on jpl-devvax.jpl.nasa.gov (details
: follow)

Patches and kits can be ftp'ed from ftp.netlabs.com:pub/outgoing/perl4.0.
You can also get patches from my mailagent, as documented in other patches.

Larry
From: jaf@jupiter.sun.csd.unb.ca (J Anthony Fitzgerald)
Newsgroups: comp.lang.perl
Subject: print and write display different results
Date: 26 Jul 92 15:55:23 GMT
Distribution: na
Organization: University of New Brunswick

Running perl 4.035 on SunOS 4.1.2,  I am trying to extract the name of
the system from which a user last logged in and print it in a report.
The script and a sample output are enclosed below.  The script seems to
be able to extract the value that I want and will print it out when I
use a print statement, however, when I use a write statement, the value
is not printed.  Any suggestions?

============================ start enclosure
#!/usr/local/bin/perl
#  Process list of compromised accounts and lock same

require "getopts.pl";
&Getopts( "tld:P:" );
	$test=defined $opt_t;

open( PWD, "ypcat passwd |" ) || die "can't ypcat passwd: $!\n";
while( <PWD> ) { $pass{(split(/:/))[0]}= $_; }
close( PWD );

open( LOG, "< /var/adm/lastlog" ) || die "can't open lastlog: $!\n";
foreach $lid ( @ARGV ) {
	if( $lid=~ /^\d+$/ ) {
		$uid= $lid;
	} else {
		( $uid,$gcos )= ( split( ':', $pass{$lid} ) )[ 2,4 ];
	}
	if( seek( LOG, $uid*28, 0 ) ){}
	sysread( LOG, $lastlog, 28 );
	( $ltime, $lport, $llfrom )= unpack( "la5A*", $lastlog );
	( $ly, $lmo, $lda )= (localtime($ltime))[ 5,4,3 ];
	if( $ltime ) {
		( $llda= sprintf( "%2d%2d%2d", $ly, 1+$lmo, $lda ) )=~ tr/ /0/;
		$llog= $llda;
		$llog.= "@${llfrom}"	if $llfrom;
	} else { $llog= ""; }
	write;
		print "test: $llfrom  $lport $llog\n";
}
close( LOG );

format STDOUT_TOP =
loginid   lastlog                       Name, etc.
========  ===========================   =============================
.
format STDOUT =
@<<<<<<<  @<<<<<<<<<<<<<<<<<<<<<<<<<<   @<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$lid,     $llog,                        $gcos
.
================================  sample output of script
loginid   lastlog                       Name, etc.
========  ===========================   =============================
mikes     920725@                       Mike Sprague Dept. Environmen
test: milton.u.washing  ttyp0 920725@milton.u.washing
================================  end enclosures
-- 
J. Anthony Fitzgerald    jaf@UNB.ca	(506) 453-4573
Computing Services  UofNB  Box 4400	(506) 453-3590  (FAX)
Fredericton, NB,  CANADA,  E3B 5A3
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: Commercial support for perl?
Date: 23 Jul 92 19:32:07 GMT
Organization: NetLabs, Inc.

In article <1840@ltb.ltb.bso.nl> wierda@ltb.ltb.bso.nl (Gerben Wierda) writes:
: If I sell support for perl etc and use the net for help if I do not know the
: answer am I just acting as a combined "interested programmer with net access"
: for those companies or am I misusing the net for personal gain?

We all misuse the net for personal gain, one way or another.

Larry
From: tchrist@convex.COM (Tom Christiansen)
Newsgroups: comp.lang.perl
Subject: Re: write
Date: 24 Jul 92 16:13:33 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: CONVEX Realtime Development, 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 newlin@purcell.ecn.purdue.edu (Johnny N.):
:Is there any way to make write send its output to a buffer instead
:of a filehandle?  The only way that I could figure out to do this
:is to send the output to a temporary file and then read it back in.
:Needless to say, this is less than efficient.

The workaround way is to fork a child of yourself with open to "|-"
to do that kind of thing for you

    die "can't fork: $!" unless defined ($pid = open(KID, "|-"));
    if ($pid) {
	select(KID);
	# now write() to KID
    } else {
	while (<STDIN>) {
	    # now do what you want
	} 
	exit;
    } 


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


    It's all magic.  :-)        --Larry Wall in <7282@jpl-devvax.JPL.NASA.GOV>
Newsgroups: comp.lang.perl
From: shishir@chpcchpc.org (Shishir Gundavaram)
Subject: # of files in directory
Keywords: Files, Perl, Directory, ls
Organization: Center For High Perf. Computing of WPI; Marlboro Ma
Date: Wed, 22 Jul 1992 18:29:40 GMT

Hi,

Can anyone please tell me if there an easy way in Perl to determine
the number of files in a particular directory.

One way I can think of to do this is:

	opendir (FILE, "/usr/bin");
	@some_array = grep (!/^\./, readdir (FILE));
	$number = $#some_array + 1;
	print "There are $number of files!";

But this is messy. 


Thanks,

--Shishir
From: sondeen@isi.edu (Jeff Sondeen)
Newsgroups: comp.lang.perl
Subject: "b subname" doesn't work in "perl -d" (v. 4.019) ?
Date: 22 Jul 92 20:30:56 GMT
Organization: USC-Information Sciences Institute

When I run the perl debugger (ala "perl -d"), and say "b subname" and
"c", I expect the debugger to break on the first line of the
subroutine, however it doesn't.  If I explicitely say "b <some line #
in subname>", then it does break there.  Here's the details:

194% perl -d ~/bin/edifi.p bigmult.edn

Loading DB routines from $RCSfile: perldb.pl,v $$Revision: 4.0.1.2 $$Date: 91/11/05 17:55:58 $
Emacs support available.

Enter h for help.

main'(/sondeen/bin/edifi.p:11):  $rename = 1;
  DB<1> b legal
  DB<2> b 664
  DB<3> L
11:     $rename = 1;
654:    sub legal {
  break if (1)
664:            return 0 if ($name =~ /^\d/ && $name !~ /^\d+$/);
  break if (1)
  DB<3> c
main'legal(/sondeen/bin/edifi.p:664):            return 0 if ($name =~ /^\d/ && $name !~ /^\d+$/);
  DB<3> 


The problem is that the break was on line 664, not the first line of sub
"legal" which is 662:


654:    sub legal {
655:            local($name) = @_;
656:            local($i);
657:
658:    #       note: we must make names legal to the Hspice netlist generator
659:    #       in cadence, which limits names to 7 chars, and generates names
660:    #       of format I or N followed by int.
661:
662:            return 0 if (length($name) > $max_name_length);
663:
664:            return 0 if ($name =~ /^\d/ && $name !~ /^\d+$/);
665:
666:            for ($i = 0; $i <= $#bad_chars; $i++) {
667:                    return 0 if index($name,$bad_chars[$i]) >= 0;
668:            }
669:            1;
670:    }


Thanks for any help.
--
/jeff.  "A sloppy, ungroomed appearance or inappropriate dress may be of
great diagnostic significance, suggesting intellectual subnormality, a
serious psychiatric disturbance, or a psychopathic disregard for
social conventions."  -- Robert Gregory, Adult Intellectual Assessment
From: fingerhu@ircam.fr (Michel Fingerhut)
Newsgroups: comp.lang.perl
Subject: Patch to versions 2.1
Date: 22 Jul 92 07:19:56 GMT
Organization: Inst. de Recherche et Coordination Acoustique/Musique, Paris

A small-but-significant undetected typo (which still allowed the program to work
in most cases) occurred.  Please apply this patch...

------- versions.sh -------
*** Standard Input	Wed Jul 22 09:14:19 1992
--- versions.sh	Wed Jul 22 09:09:02 1992
***************
*** 7,13 ****
  #                              manager@ircam.fr
  
  #
! # versions	2.1 IRCAM 7/21/92
  #
  # Modification history
  #
--- 7,13 ----
  #                              manager@ircam.fr
  
  #
! # versions	2.2 IRCAM 7/22/92
  #
  # Modification history
  #
***************
*** 58,64 ****
  
  # if -v, print version and exit
  if ($v) {
!     print "2.1 IRCAM 7/21/92";
      exit;
  }
  
--- 58,64 ----
  
  # if -v, print version and exit
  if ($v) {
!     print "2.2 IRCAM 7/22/92";
      exit;
  }
  
***************
*** 94,100 ****
      } else {				# if tab, description section
  
  	# perform macro substitution on all the line
! 	foreach $key (%macro) { 
  	    s/\%$key/$macro{$key}/g;
  	}
  
--- 94,100 ----
      } else {				# if tab, description section
  
  	# perform macro substitution on all the line
! 	foreach $key (keys %macro) { 
  	    s/\%$key/$macro{$key}/g;
  	}
  
Newsgroups: comp.lang.perl
From: roehrich@cray.com (Dean Roehrich)
Subject: Re: # of files in directory
Keywords: Files, Perl, Directory, ls
Organization: Cray Research, Inc.
Date: 22 Jul 92 15:06:13 CDT

In article <1992Jul22.182940.1248@chpc.org> shishir@chpcchpc.org (Shishir Gundavaram) writes:
>Can anyone please tell me if there an easy way in Perl to determine
>the number of files in a particular directory.
>
>One way I can think of to do this is:
>
>	opendir (FILE, "/usr/bin");
>	@some_array = grep (!/^\./, readdir (FILE));
>	$number = $#some_array + 1;
>	print "There are $number of files!";


You can throw out the $number stuff.  Remember that $#array gives you the
subscript of the last element while scalar( @array ) gives you the length of
the array.  (Also, you did not compensate for $[.)

Replace your last 2 lines with:
	print "There are ", scalar @some_array, " files!\n";

If you're looking for speed, use 'while' rather than 'grep'.  The code may
look more mundane but on a large directory it'll probably blow your grep
away.


Dean Roehrich
roehrich@cray.com
From: buzz@toxicavenger.bear.com (Buzz Moschetti)
Newsgroups: comp.lang.perl
Subject: Re: oraperl
Date: 21 Jul 92 12:34:13 GMT
Reply-To: buzz@fsrg.bear.com
Organization: Bear, Stearns & Co. Inc.
In-reply-to: leeh7@fel.tno.nl's message of 21 Jul 92 07:05:36 GMT

I hate to say it, but oraperl sounds like a denture cleaner.  

:-)
Xref: sparky comp.lang.perl:4856 comp.emacs:2663
From: joshi@m.cs.uiuc.edu (Anil Joshi)
Newsgroups: comp.lang.perl,comp.emacs,comp.emacs.misc
Subject: Re: Perl/Nroff mode for GNU Emacs ??
Keywords: perl GNUemacs nroff
Date: 21 Jul 92 22:20:24 GMT
Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL

dltest@castle.ed.ac.uk (Kevin Davidson) writes:


>What I'm asking is...
>has anyone merged perl-mode and nroff mode such that a couple of keypresses
>will narrow the file to the perl part and switch to perl-mode, and
>a couple more will narrow to the manual page part and switch to nroff-mode.

>I don't trust my elisp enough to do this myself...

By clever usage of the package posted under the heading 'multiple named
regions' or some such thing you may be able to do this.

The following is really wish list. All follow-ups to comp.emacs.misc please.

The lack really is in the base emacs which should have 

- Multiple named regions
- A region made up of blocks that are unconnected

Uses of the former : Ability to apply filters or other emacs commands
without narrow/widen to individual regions by name. mapcar external filters/
perl scripts or anything else on the regions.

Uses of the latter : Ability to apply filters on text which is conceptually
contiguous but physically separate.

IMHO, these two features make any folding editor out there completely
irrelevant at the same satisfying the needs of xedit/ispf editor exclude fans.

>dltest@castle.ed.ac.uk

Anil Joshi
joshi@cs.uiuc.edu


-- 
"Tiviri isumuna tailambu teeyavacchu, tavili mrigatrishnalo neeru traagavacchu
tirigi kundeti kommu saadhipma vacchu, cheri muurkhula manasu ranjimpa raadhu"
- An ancient "Telugu" "Padyam"
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: # of files in directory
Originator: tchrist@pixel.convex.com
Keywords: Files, Perl, Directory, ls
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: CONVEX Realtime Development, Colorado Springs, CO
Date: Thu, 23 Jul 1992 20:15:39 GMT
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 bobd@magnus.acs.ohio-state.edu (Bob DeBula):
:To reduce it still further (this *is* PERL after all):
:
:opendir (FILE, "/usr/bin");
:print "There are ", scalar(grep (!/^\./, readdir (FILE))), " files!\n";
:
:Now if I could just figure out how to embed the open in the print
:statement.....

print "There are ", scalar grep(1,`ls /usr/bin/`), " files in /usr/bin.\n";

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
    I already have too much problem with people thinking the efficiency of
    a perl construct is related to its length.  On the other hand, I'm
    perfectly capable of changing my mind next week...  :-) --lwall
Newsgroups: comp.lang.perl
From: sbo@vlsi.polymtl.ca (Stephane Boucher)
Subject: Re: # of files in directory
Organization: Ecole Polytechnique de Montreal
	<1992Jul23.201539.4416@news.eng.convex.com>
	<1992Jul23.211249.21744@magnus.acs.ohio-state.edu>
	<1992Jul23.225715.21531@news.eng.convex.com>
Date: Fri, 24 Jul 1992 14:57:59 GMT

>>>>> On Thu, 23 Jul 1992 22:57:15 GMT, Tom Christiansen <tchrist@convex.COM> said:

  >     print "There are ", 
  > 	    scalar(opendir(F,"/usr/bin"),scalar(grep(!/^\./,readdir(F)))), 
  > 	" files!\n"

Tom? How did you manage to miss this one? And I tought you
where one of the great :-)

with: 
	grep(!/^\./,readdir(F)) 

you will miss all the files that start with a dot. It should
read:

	grep(!/^\.{1,2}$/,readdir(F))
--
  ,                          ,                           ,
Stephane Boucher, ing. jr. | Ecole Polytechnique de Montreal
sbo@vlsi.polymtl.ca        | Tel: (514)340-5950
sbo@info.polymtl.ca        | Fax: (514)340-4078
Newsgroups: comp.lang.perl
From: ckd@eff.org (Christopher Davis)
Subject: Re: Commercial alternatives to perl?
Organization: Electronic Frontier Foundation Tech Central
	<CKD.92Jul15213524@loiosh.eff.org> <136@quark.ansto.gov.au>
Date: Wed, 22 Jul 1992 15:21:52 GMT

Frank> == Frank Crawford <frank@iris.ansto.gov.au> 

 Frank> Consider how much time you would have to spend reading news if
 Frank> your organisation's computing was based entirely GNU products
 Frank> including PERL.

Well, hm, a large proportion of our computing (nearly all the Unix-based
stuff) is being done with redistributable-source software.  Our mailers,
news software, windowing system, editor, scripting language,
conferencing software, ftp server, text search system, AppleTalk
protocol stack, and information retrieval clients are all from the net.
We have a *lot* of perl code for stuff, too.

Even a fair amount of our non-Unix (Mac) "critical" stuff is freeware, like
Disinfectant and Eudora; we get much faster updates of the (free!)
Disinfectant than of the ($$/yr) Virex.

Yes, I have to spend a lot of time reading news as part of my job, both
for support/information reasons and because I help field queries in our
newsgroups.  It is deemed worth it.
--
Christopher Davis * ckd@eff.org * System Administrator, EFF * +1 617 864 0665
   ``The First Amendment is often inconvenient.  But that is besides the
  point.  Inconvenience does not absolve the government of its obligation
         to tolerate speech.'' --Justice Anthony Kennedy, in 91-155
Newsgroups: comp.lang.perl
From: pas@kepler.unh.edu (Paul A Sand)
Subject: Re: getting started
Organization: University of New Hampshire
Date: Wed, 22 Jul 1992 23:37:26 GMT

In article <1992Jul22.212350.12051@tamsun.tamu.edu> rse8135@dewie.tamu.edu (R.S. Etheredge) writes:
>Howdee,
>Anybody have experiences to help accellerate the learning curve?

In the Humble Opinion of someone who's trying to climb up that sucker
himself: the quickest and best way to learn a programming language is
to use it to write the kind of programs that interest you. After
getting semi-familiar with the kind of things Perl is good for, try
rewriting some of your previously-written small C programs or shell
scripts in Perl.
-- 
-- Paul A. Sand           | I learned to put the [toilet] seat down...it
-- Univ. of New Hampshire | makes you look like a warm, caring, sensitive
-- pas@kepler.unh.edu     | human being. (Prof. R. Noble, from r.h.f.)
Newsgroups: comp.lang.perl
From: andy@homebase.vistachrome.com (Andy Finkenstadt)
Subject: Need: Perl Tutorial or FAQ
Reply-To: andy@homebase.vistachrome.com
Organization: Vista-Chrome Incorporated
Distribution: usa
Date: Sun, 26 Jul 1992 19:54:12 GMT

I'm looking for a Perl tutorial in online form, a reference
manual, or a copy of the FAQ which I can't find in comp.lang.perl
or news.answers.

I am attempting to develop some database reporting tools for
(potentially) 6-way groupings.  I'll be taking two different
tools for this:  one to convert a file into a database separated
by tabs or spaces, and then one to report on the resulting database
file.  Usually I would load this into a local Oracle database
and use SQL to do the reporting - I want to do this in Perl for
the learning experience.

-Andy

-- 
Andrew Finkenstadt       | Vista-Chrome, Inc.   |    NIC Handle: AF136
GEnie Unix Sysop/Manager | The Printing House   |   ...!uunet!rde!andy
+1 904 222 2639 home     | 1600 Capital Cir SW  |  andy@GEnie.geis.com
+1 904 575 0189 work     | Tallahassee FL 32310 | andy@vistachrome.com
From: bobd@magnus.acs.ohio-state.edu (Bob DeBula)
Newsgroups: comp.lang.perl
Subject: Re: # of files in directory
Keywords: Files, Perl, Directory, ls
Date: 23 Jul 92 19:59:31 GMT
Organization: The Ohio State University

In article <1992Jul22.150613.26006@hemlock.cray.com> roehrich@cray.com (Dean Roehrich) writes:
>
>You can throw out the $number stuff.  Remember that $#array gives you the
>subscript of the last element while scalar( @array ) gives you the length of
>the array.  (Also, you did not compensate for $[.)
>
>Replace your last 2 lines with:
>	print "There are ", scalar @some_array, " files!\n";
>

To reduce it still further (this *is* PERL after all):


opendir (FILE, "/usr/bin");
print "There are ", scalar(grep (!/^\./, readdir (FILE))), " files!\n";


Now if I could just figure out how to embed the open in the print
statement.....
-- 
==========================================================================
              Disclaimer: These are my views, not the U's

        "If it's in the paper it must be true!" --- D. Doright 
Newsgroups: comp.lang.perl
From: weingart@inf.ethz.ch (Tobias Weingartner)
Subject: open - Does it use the shell?
Followup-To: comp.lang.perl
Keywords: open, shell
Reply-To: weingart@inf.ethz.ch
Organization: ETH - Switzerland
Date: Mon, 27 Jul 1992 10:01:34 GMT

Yo, perl dudes and dudettes!

I have a small perl script, which amounts to roughly:

$args = join(' ', @ARGV);
$prog = './someperlprog';
open(FOOBAR, "$prog $args -xxx -xxx |");
chop( @DATA = <FOOBAR> );
foreach $i (@DATA){
...
}

Ok, the prob is this, the open seems to invoke the
shell.  Yes, there are meta-chars in $args, but $prog
exists.  Does open always invoke the shell on meta chars?

There has got to be a better way than to doubly escape,
or quote everything.

--Toby.

Newsgroups: comp.lang.perl