in reply to Read file contents
I'm not entirely sure what your rendition would do - though it's highly likely that it won't do what you want. OTOH, it's also likely that you don't need to do that substitution - so simply removing that line of code might fix your problem.$path=~s/\//\\/g;
(Note that you've just specified a / as the path separator - yet earlier on you deemed it necessary to use \ as the path separator.)open(FH,"$path/$file") or die $!;
|
|---|