in reply to Massage the driving directions (in USA)

That's an interesting use for Perl.

I tried it, and only have two suggestions -- you may want to reconsider the way the program changes "drive" to "DR", and "s" to "SOUTH", since it adversely affects things like:

Drive for 12 miles, and turn left on Rodeo Drive. (Becomes "DR for 12 MILES, & turn LEFT on RODEO DR") Take a right just past the Drive-Through Wendy's. (Becomes "take a RIGHT JUST PAST DR-THROUGH WENDY'SOUTH.")

And there may be other "gotchas" waiting to be discovered.

But it's neat idea, and one I'm sure you can develop further.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/