develooper Front page | perl.beginners | Postings from February 2002

RE: Module call/stdin

Thread Previous
Timothy Johnson
February 22, 2002 22:11
RE: Module call/stdin
Message ID:
     If I understand your question correctly, then all you want to do is
iterate through a list, performing some action on each item.  You can just
use a foreach loop for this:

foreach $file(@files){
      do something...

unless you actually want to do something to the file, in which case it would
look more like this:

foreach $file(@files){

or are you saying that the module normally gets its parameters from <STDIN>,
and you want to redirect the output of one part of the script so that the
module thinks it's actually coming from user input?

-----Original Message-----
From: Chip Dunning
Sent: 2/22/02 9:58 PM
Subject: Module call/stdin

I am definitely new to Perl - so here is my basic question.

I have a module called from a script. I want the script to call the
and pass it a filename. The module will use that filename in the same
as if it came from the command like (ex.  while (<>) { .... } ).


To unsubscribe, e-mail:
For additional commands, e-mail:

This email may contain confidential and privileged 
material for the sole use of the intended recipient. 
If you are not the intended recipient, please contact 
the sender and delete all copies.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About