I know that for sake of brevity, you're likely omitting large portions of code. But I'm having trouble seeing where
$file and
$value come from, what you do with your matches, etc. Further, the poor formatting/indentation (that it appears an attempt was made by the janitorial staff to clean up a bit) doesn't help matters, either .
$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ }
+ sig
map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu
+" );