tr/// or y/// gives better performance than a substitution, also using () captures the match as assigns it to $1 but you don't require it for anything so you should use either:
Or better would be to use a character class...
Code:
$read_write =~ s,(?:/| |:),_,g;Or better would be to use a character class...
Code:
$read_write =~ s,[ /:],_,g;