scripting languages...

Igor Robul igorr at speechpro.com
Fri Apr 28 10:54:45 UTC 2006


On Fri, Apr 28, 2006 at 03:35:03AM +0200, Arne Skjaerholt wrote:
> Getting at argv/argc is actually pretty simple in Perl. The global array
> @ARGV contains the arguments given on the command-line, but not the name
> of the file (this datum is contained in $0). Therefore your argv[1] in C
> is $ARGV[0] in Perl. The number of command-line arguments can be
> obtained in two ways, either you interpret the array in a scalar context
Except there is one big drawback for me (I'm not Perl-guru :-) ):
 If there are some file names on command line of perl-script, then perl
 redirects stdout to read from these files, which makes impossible to
 read from real stdout. At least for me :-)


More information about the freebsd-questions mailing list