in reply to Re^4: Football formation
in thread Football formation
Hey eminempark,
As GrandFather said in the first reply of this thread, you haven't shown any code or even a description of what you've tried. I made the quick change you're looking for, but am hoping to see you run the ball the rest of the way into the endzone from here:
use autodie; my (%used, %player); open $player{$_}, '<', "$_.txt" for qw( DR DL DC SW ); open my $formation, '<', 'formation.txt'; for my $position (<$formation>) { chomp $position; while (readline $player{$position}) { my ($name) = split; next if $used{$name}; $used{$name} = 1; last; } print $position, ' ', $_ // "No Player\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Football formation
by eminempark (Initiate) on Oct 28, 2014 at 08:12 UTC | |
by eminempark (Initiate) on Oct 28, 2014 at 08:31 UTC |