From owner-freebsd-questions@FreeBSD.ORG Fri Apr 28 10:54:45 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D9F516A403 for ; Fri, 28 Apr 2006 10:54:45 +0000 (UTC) (envelope-from igorr@speechpro.com) Received: from speechpro.ru (speech-tech-2.ip.PeterStar.net [81.3.190.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC2D943D53 for ; Fri, 28 Apr 2006 10:54:44 +0000 (GMT) (envelope-from igorr@speechpro.com) Received: from [192.168.2.26] (helo=sysadm.stc) by s1.stc with esmtp (Exim 4.53 (FreeBSD)) id 1FZQcV-00063Z-A1 for freebsd-questions@freebsd.org; Fri, 28 Apr 2006 14:54:43 +0400 Received: from igorr by sysadm.stc with local (Exim 4.54 (FreeBSD)) id 1FZQbp-0008IQ-Do for freebsd-questions@freebsd.org; Fri, 28 Apr 2006 14:54:01 +0400 Date: Fri, 28 Apr 2006 14:54:01 +0400 From: Igor Robul To: freebsd-questions@freebsd.org Message-ID: <20060428105401.GB31251@sysadm.stc> References: <20060427024158.GA71123@thought.org> <20060427031043.GA69851@gothmog.pc> <20060427214854.GA2601@thought.org> <1146188104.7085.8.camel@bursar> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1146188104.7085.8.camel@bursar> User-Agent: Mutt/1.5.11 Sender: Igor Robul X-Archived: Yes Subject: Re: scripting languages... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 10:54:45 -0000 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 :-)