Use File::Spec.
In reply to Re: How to write a perl script to work on many OS(s) by GrandFather in thread How to write a perl script to work on many OS(s) by jesuashok