On 06/08/2018 01:48 PM, [email protected] wrote:
On Fri, June 8, 2018 12:20 pm, Uri Guttman wrote:

use File::Slurp ;
write_file( 'filename', "header text\n" ) ;
append_file( 'filename', "more text\nand even more\n" ) ;
Thanks, Uri; this is what I hoped to find!

But my knowledge of Perl is rusty; I do not recall what structure is
needed to feed to this code a list of filenames, such as:

   foobar-01.tex
   foobar-02.tex
   foobar-03.tex
   ...

i am not sure what you want but here is my guess

my @files = qw( foobar-01.tex foobar-02.tex foobar-03.tex) ;

foreach my $tex_file ( @files ) {

        write_file( $tex_file, "tex header\n" ) ;
}

learning perl should cover that just fine

uri

  ...
_______________________________________________
Houston mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/houston
Website: http://houston.pm.org/

Reply via email to