Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Batch to Perl translation (just 1 line, not the whole script)

by aitap (Deacon)
on Aug 07, 2012 at 20:50 UTC ( #986083=note: print w/ replies, xml ) Need Help??


in reply to Batch to Perl translation (just 1 line, not the whole script)

open my $fh, ">>", $ARGV[0] || die "$0: $ARGV[0]: $!\n"; # open the file specified in the first argument in append mode print $fh q{BAYES; bayesClass=nameOfClassVariable; END}; # write the text; close $fh; # close the file;
See open, print, Quote and Quote like Operators, close for more information.
Sorry if my advice was wrong.


Comment on Re: Batch to Perl translation (just 1 line, not the whole script)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-07-31 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls