On 06/08/2018 02:55 PM, [email protected] wrote:
On Fri, June 8, 2018 1:01 pm, Uri Guttman wrote:
my @files = qw( foobar-01.tex foobar-02.tex foobar-03.tex) ;

foreach my $tex_file ( @files ) {

         write_file( $tex_file, "tex header\n" ) ;
}
I may have as many as a thousand "foobar-xx.tex" files.  There must be
a way to give "my @files" the name of a file containing target
filenames.  Is this something covered in "Learning Perl" ?
_______________________________________________

File::Slurp to the rescue again!

my @lex_files = read_file( 'file_with_tex_names' ) ;
chomp @lex_files ;

done!

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

Reply via email to