in reply to Dynamically Create a file

I see a couple places you're going wrong. First and foremost, system() returns the exit status of the command, not the commands output. If you want the output of "lin --help", you should run it as qx/$command/. Of course, qx// doesn't pay attention to STDERR, so if you're interested in capturing that, you should re-write the command as $command = "lin --help 2> $test";

2> is the shells way of redirecting STDERR to someplace else.

Try this on for size...

use strict; use warnings; $testCase = "testing"; my $test = "./$testCase.txt"; $command = "lin --help 2> $test"; my $result = `$command`; print $result;
Note the use strict; and use warnings; directives. Those are your friend. EDIT: I should probably mention that I used qx// rather than system() because the former will return a program's output, and the latter only returns the return status.