Hi all,

I am using the diamond operator to redirect input to my perl script.  I want to 
copy all of the input on to a single variable using the following subroutine:

sub getfile  # Copies the file redirected to this perl script to the varialbe $x
{
  my $x;
  local $/ = undef;
  $x = <>;
  return $x;
}

The problem is that when I try to print what the above subroutine returns, the 
program kindof hangs.  That is, it doesn't just print the output and then send 
me back to the command line, instead I have to press Ctrl-c to break out of it, 
like it is expecting input from the keyboard.  

Any help is appreciated, 

Robert

       
---------------------------------
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.

Reply via email to