Kevin Viel wrote:
> I call a perl script from SAS using a pipe.  The file on which the
> script acts changes.  Is there a way to provide the file name to the
> script using STDIN on the command line?  The SAS call looks like:
> 
> filename ABI pipe "perl C:/base.ps" ;
> 
> For now, I altered the script to read a text file containing the file
> name, but this is wasteful.  I appreciate any comments.
>

I'm not exactly sure what you're asking but try this:

my $filename = <STDIN>;
chomp $filename;
@ARGV = ( $filename );
while(<>){
  ...
}


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by
doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to