Odd, both
system("echo hello > tmp.log");
and
system("echo hello");
work for me, as they should.
As for creating a file, opening it for write-append does the trick:
{ local *FH; open(FH, '>>', $file) or die("...: $!\n"); }
In reply to Re^3: redirecting output in perl
by ikegami
in thread redirecting output in perl
by sparkel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |