in reply to Haven't Scripted in a Decade, need help (gift is probably a better word)!
I'm guessing one can get awfully rusty in a decade ...
Here's a start.
#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11151867 use warnings; open my $fh, '<', 'config.file' or die; my $configlist = join '', <$fh>; close $fh; open $fh, '<', 'gamelist.txt' or die; while( <$fh> ) { chomp; (my $newfile = $configlist) =~ s/floppy0=\K/$_/; open my $outfh, '>', "$_.config" or die; print $outfh $newfile; close $outfh; } close $fh;
It's not complete, for example, the die messages need to be expanded to something reasonable.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Haven't Scripted in a Decade, need help (gift is probably a better word)!
by tybalt89 (Monsignor) on Apr 28, 2023 at 14:18 UTC | |
|
Re^2: Haven't Scripted in a Decade, need help (gift is probably a better word)!
by rickyboy (Novice) on Apr 26, 2023 at 22:19 UTC | |
by GrandFather (Saint) on Apr 27, 2023 at 03:28 UTC | |
by rickyboy (Novice) on Apr 27, 2023 at 07:47 UTC | |
by roho (Bishop) on Apr 27, 2023 at 05:47 UTC |