You want to print the array ARGV and not the variable ARGV
For all command line arguments
print @ARVG
For the first command line argument,
print $ARGV[0]
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
> -Original Message-
> From: Booher Timothy B 1stLt AFRL/MNAC
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 12, 2002 7:37 PM
> To: [EMAIL PROTECTED]
> Subject: can't print input argument
>
>
> Hello - more trouble, I just can't seem to write a program
> that prints an
> argumen
Looking at the command-line thing more closely, something like this should
work...
C:\> perl -e "while(<>){s/good/bad/;print}" test.txt
but again, I don't use the command-line all that much.
-Original Message-
From: Booher Timothy B 1stLt AFRL/MNAC
[mailto:[EMAIL PROTECTED]]
Sent: Tues
TED]]
> 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
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 Me
To be honest, I never use the command-line functions, but as for the
arguments, I think your problem is that the argument/s are passed via the
@ARGV array. Try this:
print "$ARGV[0]\n"; #print first element of argument array
-Original Message-
From: Booher Timothy B 1stLt AFRL/MNAC
[