Take a look at File::Spec - it does exactly what you're looking for. You may also find File::Basename and the other File::* modules interesting. Take a walk through CPAN when you have time - it's a great way to find existing solutions to problems you may not have even run into yet.
Secondly, see perlport for a more general discussion on writing portable Perl.
In reply to Re: How to write a perl script to work on many OS(s)
by bobf
in thread How to write a perl script to work on many OS(s)
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |