in reply to How do I change .. to the real filename?
$filename =~ s/\/\w+\/\.\.//g; [download]
Originally posted as a Categorized Answer.