Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!newstop!sun!stef From: stef@zweig.sun (Stephane Payrard) Newsgroups: comp.lang.perl Subject: Re: perl -x take argument as a filename (bug or feature?) Message-ID: Date: 14 Aug 90 06:04:36 GMT References: Sender: news@sun.Eng.Sun.COM Distribution: comp.lang.perl Organization: Sun Microsystems -- Mountain View Lines: 32 In-reply-to: composer@bucsf.bu.edu's message of 14 Aug 90 04:12:32 GMT CC: lwall@jpl-devvax.JPL.NASA.GOV I made myself not very clear. Reading the documentation, one can expect 'argument' in 'perl -x argument' to be: 1/ the name of a directory or 2/ the first argument (ie: $ARGV[0] ) passed to the embedded executed shell-script ...but certainly not 3/ the name of a perl-script to be executed as suggested by the error message you get on piping this article (which has a perl-script embedded) to 'perl -x argument' with `argument' being the name an empty file in the current directory. #! /usr/bin/perl print $ARGV[0]; __END__ -- Stephane Payrard -- stef@sun.com -- (415) 336 3726 Sun Microsystems 2550 Garcia Avenue M/S 10-09 Mountain View CA 94043