Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2006 16:23:08 +0200
From:      Arne Skjaerholt <arnsholt@broadpark.no>
To:        freebsd-questions@freebsd.org
Subject:   Re: scripting languages...
Message-ID:  <1146234188.7085.17.camel@bursar>
In-Reply-To: <20060428105401.GB31251@sysadm.stc>
References:  <20060427024158.GA71123@thought.org> <20060427031043.GA69851@gothmog.pc> <20060427214854.GA2601@thought.org> <1146188104.7085.8.camel@bursar>  <20060428105401.GB31251@sysadm.stc>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2006-04-28 at 14:54 +0400, Igor Robul wrote:
> 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 :-)
Not quite. If you use the special ``$line = <>;'' construct Perl will
indeed interpret the args on the command line as file names and read
from those. However if you explicitly say that you want to read from
STDIN like so: ``my $line = <STDIN>;'' you will not read from a file,
but from whatever your STDIN is connected to.

Arne
:wq




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