Hi,
when I run your script with strictures, I get
readline() on closed filehandle F at 698996.pl (please check
Why you should use strict). I'm not sure if a file handle can be eval'ed at all, but would seriously doubt that it will execute your external code (fellow monks - please correct me if I'm wrong).
Usually, when trying to catch outpout of an external command, you either use backticks, or - what I prefer - you use
open with a pipe (-|), then you can do something like this:
#!/usr/bin/perl
use strict;
use warnings;
open(F, '-|', "cat file | /usr/bin/mycommand") or die "Something nasty
+ happened with my command";
while (<F>) {
# do something with each line of your output
}
close F;
Regards,
svenXY