Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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


Comment on Re: Running an external command
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (16)
As of 2014-09-16 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (24 votes), past polls