perl - "$<"& "$>"在 Perl 中是什么意思

标签 perl variables

一个例子将不胜感激。以下是我阅读它的示例:

$self->parameter(
    name => 'real_user',
    xpath => undef, 
    default => scalar(getpwuid($<))
);
$self->parameter(
    name => 'production',
    xpath => '/config/production', 
    default => $self->get('user_uid') == $>
);

最佳答案

一个 $后跟符号?致 perlvar !

$<
The real uid of this process.

$>
The effective uid of this process.



使用它们找出运行程序的用户。

关于perl - "$<"& "$>"在 Perl 中是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17102158/

相关文章:

c - 这个c代码行是做什么的? (const VAR = "string";)

perl - 调用安装在不同路径/目录中的 Perl 模块

perl - 在 CentOS 8.1 上编译 perl Net::Interface 模块失败

bash - 如何删除字符串中的最后一个分号?

javascript - 如何在 JavaScript 中引用表示变量?

C++编程效率

swift - 如何在另一个函数中使用枚举 switch 语句

perl - 下载 CPAN 存储库。没有可以上网的 Linux 系统

Perl 网络爬虫框架

Php变量不保存数据