How do I get a Perl program to accept input from STDIN as well as
command line input.
I have a program (foo.pl) that is designed to read the contents of
@ARGV and process each item in the array. Tastes great. Less filling.
So, when I do something like this, things work just fine:
%foo.pl a
On Mon, Apr 26, 2004 at 10:14:51AM -0500, Eric Lease Morgan ([EMAIL PROTECTED]) wrote:
What should I do to my first program (foo.pl) so it can accept command
line input as well as input from STDIN?
How are you reading from the files? Opening them yourself one at a time?
Don't. Use the magic
On Mon, Apr 26, 2004 at 10:14:51AM -0500, Eric Lease Morgan wrote:
%bar.pl | foo.pl
But alas, foo.pl never seems to get the input sent from bar.pl. It does
not seem to read from STDIN.
What should I do to my first program (foo.pl) so it can accept command
line input as well as input
Eric Lease Morgan wrote:
How do I get a Perl program to accept input from STDIN as well as
command line input.
I have a program (foo.pl) that is designed to read the contents of
@ARGV and process each item in the array. Tastes great. Less filling.
So, when I do something like this, things
On Apr 26, 2004, at 10:43 AM, Andy Lester wrote:
How are you reading from the files? Opening them yourself one at a
time?
Don't. Use the magic filehandle.
On Apr 26, 2004, at 10:44 AM, Dennis Boone wrote:
If your perl script is structured like this:
while ()
{
On Apr 26, 2004, at 10:53 AM, Michael McDonnell wrote:
This sort of situation can be dealt with with back ticks:
foo.pl `bar.pl`
This is nice in that you can probably do this too:
foo.pl a b c `bar.pl` d e f g h `bar.pl x y z` i j k
A popular GNUism might be helpful here as well. Many GNU
Hi All,
I'm developing a script for an application that uses Zeta Perl for
Z39.50 connections. I'm hoping those of you familiar with Zeta Perl can
help me with this.
When I specify the record syntax as MARC or SUTRS everything works fine.
But when I specify the record syntax as OPAC, using the
Michael McDonnell wrote:
A popular GNUism might be helpful here as well. Many GNU programs use
an option command line argument of -- to indicate that input should be
taken from STDIN instead of from other command line arguments.
'--' is usually used to mean that anything that follows is a