try:

perl program.pl file.txt

and then check $ARGV[0]

It should contain "file.txt".  I've dealt with this before using Windows and
line args.  Anyone more experienced (Jenda?) can help out more.

J

> -----Original Message-----
> From: Wagner-David [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 12, 2002 4:58 PM
> To: 'Booher Timothy B 1stLt AFRL/MNAC'; [EMAIL PROTECTED]
> Subject: RE: can't print input argument
> 
> 
>       If you don't know how many there will be you can try 
> something like:
> 
> printf "%-s "x scalar(@ARGV), @ARGV;
>       # @ARGV is what you check when seeking arguments from 
> the commnad line
>       # in passing to a subroutine the @_ has the same 
> connotation as @ARGV
> 
> Wags ;)
> 
> -----Original Message-----
> From: Booher Timothy B 1stLt AFRL/MNAC
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 12, 2002 16:37
> To: [EMAIL PROTECTED]
> Subject: can't print input argument
> 
> 
> Hello - more trouble, I just can't seem to write a program 
> that prints an
> argument it's passed:
>  
> My script contains:
>  
> #not working
> print "$ARGV\n";
>  
> when I run this I get:
>  
> c:\work.pl "this"
>  
> c:\
>  
> confused by this but also confused that I can't run anything from the
> command line in windows. Like
>  
> c:\perl -e "s/Bad/Good/" test.txt
> or
> c:\perl -e 's/Bad/Good/" test.txt
>  
> I have activePerl installed and my file attributes are fine  . . .
>  
> tim
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to