Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- best way to build an absolute spec
June 1, 2014, 5:34 pm
rate this thread
$my_dir is user defined.
I want to build the file spec "$my_dir . $my_fn", but $my_dir may be
constructed as either /one/two or /one/two/.
I could test for the trailing path separator and act accordingly, but is
there a better way, a "standard" or best practice way, of doing this?
How do you pros build the absolute paths?
I find that in Windows "/one/two//my_file" will work, but I'd rather not.
Thanks in advance.
Re: best way to build an absolute spec
By using one of the several modules that do that job, e.g.
or several others