Using s/// to substitute single characters is woefully inefficient. It is much better to use tr, the transliteration operator:
$dir =~ tr{/}{\\};But, as has already been pointed out, even bothering to do so in this context is redundant. Another redundant operation you are performing is interpolating $dir into a string that contains nothing else "$dir". Just say $dir.
...And i'm not using strict or anything.
Well, you should be.
--In reply to Re: Can't seem to see the problem here...
by grinder
in thread Can't seem to see the problem here...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |