Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2006 14:54:01 +0400
From:      Igor Robul <igorr@speechpro.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: scripting languages...
Message-ID:  <20060428105401.GB31251@sysadm.stc>
In-Reply-To: <1146188104.7085.8.camel@bursar>
References:  <20060427024158.GA71123@thought.org> <20060427031043.GA69851@gothmog.pc> <20060427214854.GA2601@thought.org> <1146188104.7085.8.camel@bursar>

next in thread | previous in thread | raw e-mail | index | archive | help
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 :-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060428105401.GB31251>