in reply to Is there a better way to automate file creation?
Consider using a "here document"
use strict; use warnings; my @names = qw(file1 file2); for my $name (@names) { my $fil; open $fil, '>', "$name.ini"; print $fil <<END [main] left_hand_side=$name.html right_hand_side=$name.php file_regex_pattern=\\.php\$ dir_regex_pattern=(?!^svn\$) END }
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)
|
|---|