Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Running an external command

by 2teez (Priest)
on Apr 26, 2012 at 04:29 UTC ( #967231=note: print w/replies, xml ) Need Help??

in reply to Running an external command

If your program output a file, why use a backtick? simply use a open function in Perl, like this:

use warnings; use strict; my $output_file="output.bam"; open my $fh,'>',$output_file or die "can't open $output_file:$!"; print $fh " ... hello world into my file..."; close $fh or die "can close file: $!";
Please, check perldoc perlopentut
or perldoc -f open for more ...
Hope this helps

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://967231]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2016-10-26 16:30 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (344 votes). Check out past polls.