in reply to
How to write a perl script to work on many OS(s)
As well as File::Spec you might also want to take a look at Path::Class. It's not core, but has a much saner API in my opinion.
Results (222 votes),