$0 returns a relative path. Since it works in OS X, I'm inclined to think it works in BSD just fine. You might also try __FILE__. Then look into File::Path, File::Spec->rel2abs, Cwd, FindBin, and Path::Class.
This has come up here a bit so don't hesitate to Google or super search for any of that stuff for wider discussions and samples.
In reply to Re: Location reference - programming style
by Your Mother
in thread Location reference - programming style
by willymacoy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |