Mr. Shawn H. Corey wrote:
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(<>){
  ...
}


Shawn,

That should work, but I cannot use the keyboard to provide the STDIN. Instead I was hoping for something like:

filename ABI pipe "perl C:/base.ps >file.ab1" ;
                                   ^^^^^^^^^

Thanks,

Kevin


--
Kevin Viel
Department of Genetics                       [EMAIL PROTECTED]
Southwest Foundation for Biomedical Research phone:  (210)258-9884
P.O. Box 760549                              fax:    (210)258-9444
San Antonio, TX 78245-0549

Kevin Viel
PhD Candidate
Department of Epidemiology
Rollins School of Public Health
Emory University
Atlanta, GA 30322

--
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