I'm running linklint from a perl program on Win XP and I want to capture its output in a variable like so:
That doesn't work. $result is always empty despite the fact that the call to linklint works and displays output to the screen.my $result = `perl D:\\Perl\\bin\\linklint-2.3.5 http://www.perlmonks. +org `; print "result: $result\n";
This does work:
$test contains the output of `perl -v`, so I assumed it would work the same way with linklint.my $test = `perl -v `; print "this is test: $test\n";
I also tried this:
That didn't work either with linklint (but it does work with perl -v).my @result = (); open (TEST, "perl D:\\Perl\\bin\\linklint-2.3.5 http://www.perlmonks.o +rg |"); while (<TEST>){ push(@result, $_); } close TEST; print "This is result: @result\n";
So, it *appears* that this is something related to linklint, but I'm not sure what that is.
Any ideas?
Thanks
In reply to Capturing output of linklint on Win32 by zod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |