in reply to Football formation
Hi there. Seems you just want to alternate reading between files, in the order given by the formation file, printing as you go?:
use autodie qw( :all ); my %player; open $player{$_}, '<', $_.'.txt' for qw( DR DL DC ); open my $formation, '<', 'formation.txt'; for (<$formation>) { chomp; print "$_ ", readline($player{$_}) // "No Player\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Football formation
by eminempark (Initiate) on Oct 28, 2014 at 04:17 UTC | |
by Loops (Curate) on Oct 28, 2014 at 04:18 UTC | |
by 2teez (Vicar) on Oct 28, 2014 at 05:51 UTC | |
by eminempark (Initiate) on Oct 28, 2014 at 04:45 UTC | |
by 2teez (Vicar) on Oct 28, 2014 at 05:36 UTC | |
by eminempark (Initiate) on Oct 28, 2014 at 05:52 UTC | |
by Loops (Curate) on Oct 28, 2014 at 06:47 UTC | |
by eminempark (Initiate) on Oct 28, 2014 at 08:12 UTC | |
|