Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人能告诉我如何在执行的 Raku 脚本本身中找到脚本的路径吗?
我正在 Raku 中寻找与此 Perl 代码等效的代码:
$path=abs_path($0);
利用$*PROGRAM
$*PROGRAM
见:https ://docs.raku.org/language/variables#index-entry-$*PROGRAM
$*程序 包含正在执行的 Raku 程序的位置(以 IO::Path 对象的形式)。
$*程序
包含正在执行的 Raku 程序的位置(以 IO::Path 对象的形式)。