Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Running an external command

by 2teez (Vicar)
on Apr 26, 2012 at 04:29 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-19 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found