You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Written with the help of GotToBTru, RonW, and toolic of Perl Monks.
# Rewritten by Tux on Perl Monks. 2020-07-09
sub fancy_map {
my ($opt, $list) = @_;
map { ref $_
? fancy_map ($opt, $_)
: do {
my $before = $opt->{'before'} ? $opt->{'before'}.' ' : '';
my $after = $opt->{'after'} ? ' '.$opt->{'after'} : '';
$before.$_.$after;
}
} @{$list};
}
# This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See https://dev.perl.org/licenses/artistic.html.