Re: scripting languages...

[ Available lists | Index of freebsd-questions | Month of Apr 2006 | Week of 28 Apr 2006 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Igor Robul <igorr@speechpro.com>
Date
28 Apr 2006 10:54:45
Subject
Re: scripting languages...
Message-ID
20060428105401.GB31251@sysadm.stc

In reply to
Referenced by

[ Hide this part ]
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 :-)


Elapsed time: 0.154 seconds