dallen16++ for your question. Only a little though about your's
".. specify the directory path and filename in a portable manner": in my little experience (no CPAN contribution, till now) about path portability i saw that Perl works very well in Win32 OSs with linux styled paths. So if you need to interpolate too in the path, instead of having to
"c:\\a_lot_\\of\\$backslashes" you can safely use / and you'll
"c:/fewer/$keystrokes" (pronounce c:/ like 'see')
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.