On 06/08/2018 01:11 PM, [email protected] wrote:
I would prefer to use Perl to create the files with the desired headers.
Once I know how to do that, I can make use of Perl to add additional
file-specific material to each file, and save much time in manual editing.
File::Slurp is your friend here. it can't be easier than this:
use File::Slurp ;
write_file( 'filename', "header text\n" ) ;
that will work even on a 0 length file if it is writeable. touch should
leave the files writeable. but with that call, you don't even need to
have a file there in advance.
and this will add more text to the end of the file:
append_file( 'filename', "more text\nand even more\n" ) ;
uri
_______________________________________________
Houston mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/