[ale] Really OFFTOPIC but I give up.

Robert L Harris nomad at rocky.orci.com
Wed Oct 1 11:48:28 EDT 1997


Ok,
  I have the following code:


#!/usr/local/bin/perl
   
open(BADINFILE,"/bin/su - addalias -c \"/usr/local/bin/badalias < /usr/local/MoveUser/MoveMail.Bad\" |") or die "Can't execute $BadAliasCmd :$!:\n";
while(<BADINFILE>)
{
  chop;
  print "\$_ :$_:\n";
}

It is supposed to read input from MoveMail.Bad into badalias.  This works great.
My problem is that this is a fragment from a larger program.  When I put this
exact code into the larger program, it doesn't get the input from MoveMail.Bad.
It acts like the file's empty.  If I put a fragment of code into the Larger
program to run the smaller code, it also doesn't correctly re-direct the
input.  I'm at a complete loss and so is another perl GURU I know.  Anyone
got an Idea?  There are NO error messages.  It runs perfectly happy, except
it doesn't do the redirection.  Doing the command as a system() produces
the exact same thing.

If I change it to "cat MoveMail.Bad | badalias" I get exactly the same
thing also.

Robert

---------------------------------------------------------------------------
Robert L. Harris          |    If NT is the answer,
System Engineer For Hire. \_     you don't understand the question.
 
Email:
Robert at ast.lmco.com
http://www.orci.com/~nomad
  
DISCLAIMER:
  These are MY OPINIONS ALONE.  I speak for no-one else.
   
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'






More information about the Ale mailing list