in reply to The hills are alive...
Hello Lady_Aleena,
This is cool! I just have a couple of comments:
my @new_song = map { $_ = $_ =~ /^[a-g]$/ ? $notes{$_} : 'not a note'; + $_ } @song_notes;
This can be simplified by removing the assignment and the final $_:
my @new_song = map { /^[a-g]$/ ? $notes{$_} : 'not a note' } @song_not +es;
my @new_song = map { $_ = $$SoM{$_} ? $_.' '.$$SoM{$_} : 'not a note'; + $_ } @$notes;
The final $_ can again be omitted; also, I find the arrow notation clearer than double dollar signs (but that might just be me):
my @new_song = map { $_ = $SoM->{$_} ? $_ . ' ' . $SoM->{$_} : 'not a +note' } @$notes;
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: The hills are alive...
by Lady_Aleena (Priest) on Nov 27, 2014 at 21:21 UTC |