in reply to Strip filename

Another idea is specify only allowed characters, like ascii letters and numbers dash and underscore
s![^abcdefghijklmnopqrstuvwxyz0123456789_\-]!!gi
or create sha1 hash of the file and use that as the filename
$ perl -MDigest -le " $sha256 = Digest->new(q!SHA-256!); $sha256->add +file( *STDIN ); print $sha256->hexdigest " < test a505e6720df306ab46a6b24c458b8b77b60bffa18d831f4796ba1b736bb44c6c