Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!uc!cs.umn.edu!cybrspc!roy From: cybrspc!roy@cs.umn.edu (Roy M. Silvernail) Newsgroups: comp.lang.perl Subject: Re: Recent patches Message-ID: <18PBo1w162w@cybrspc> Date: 22 Aug 90 21:15:11 GMT References: <1990Aug22.062517.25360@iwarp.intel.com> Organization: Villa CyberSpace, Minneapolis, MN Lines: 33 merlyn@iwarp.intel.com (Randal Schwartz) writes: > Larry's trying to keep you from using grep, knowing that Perl will do > the job. Use: > > perl -ne 'print "$ARGV: $_" if /^Subject:/; close(ARGV) if /^$/' * > > instead. It's probably faster anyway, since you don't have to look > all the way through each file. OK, I'm a Perl novice (MS-DOS version, PL18, 4dos), but this line gives me a problem. Perl hands me Can't open perl script "$ARGV: $_": No such file or directory when I try it. I have also tried under command.com, and I diddled with whitespace and paramaters (-n -e, and so on), but no dice. Is this just the DOS curse? Placing it in a script file, ala while (<>) { print "$ARGV: $_" if /^Subject:/; close(ARGV) if /^$/; } works just fine when I invoke 'perl myscript *'. Why is the command line version blowing up? -- Roy M. Silvernail | #include | Does virtual now available at: | main(){ | reality need cybrspc!roy@cs.umn.edu | float x=1; | swap space? (cyberspace... be here!)| printf("Just my $%.2f.\n",x/50);} | -- me