I wrote the following piece of code.
I want to modify it such that i can give the new_msg from outside the file,changing everytime , something like an argument.
how to do this?
i am new to perl
tia
tinku
Code:
#!/usr/bin/perl
$new_msg = "My msg text here";
open (msg, ">>msg.txt") || die ("Could not open file. $!");
print msg ($new_msg);
close (msg);