You may want a file with source file and target file names, two on each line, separated by a tab.
Read that in, then go through a loop which reads from the source and writes (as appropriate) to the targets. On Fri, Jun 8, 2018 at 2:31 PM, Uri Guttman <[email protected]> wrote: > 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/ -- http://www.dionysius.com/ _______________________________________________ Houston mailing list [email protected] http://mail.pm.org/mailman/listinfo/houston Website: http://houston.pm.org/
