use IPC::Run qw(start pump finish); my $location = "./test.txt"; my @prog = "kate"; start \@prog, \$location;