use File::Spec;
하고
print File::Spec->catdir(dirname, filename);
하면 됨
예
use File::Spec;
print File::Spec->catdir('dir1/dir2/dir3', '../filename'),"\n";
print File::Spec->catdir('dir1/dir2/dir3', '../../filename', ),"\n";
키워드 : file path, filepath, merge, append
출처 : How to concatenate pathname and relative pathname?
Saturday, February 21, 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment