in reply to Function over all letters in a string
What can be done with foreach can usually be done on fewer lines with map...
$string=join'',map{$_ x rand 8}split//,$string;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Function over all letters in a string
by Roger (Parson) on Dec 01, 2003 at 06:04 UTC | |
by jonadab (Parson) on Dec 01, 2003 at 16:10 UTC |