小编boz*_*ser的帖子

如何在Perl中检索整数的序数后缀(如st,nd,rd,th)

我有数字,需要添加后缀:'st','nd','rd','th'.例如:如果数字为42,则后缀为'nd',521为'st',113为'th',依此类推.我需要在perl中执行此操作.任何指针.

regex perl perl-module perl-data-structures

14
推荐指数
3
解决办法
2051
查看次数

perl命令'=>'和'='之间的区别

以下perl/mason命令之间的区别是什么.

$ test = $ test1; $ test => $ test1;

具体如何实例化在这里工作?

perl mason

1
推荐指数
1
解决办法
578
查看次数

使用perl中的正则表达式匹配检查perl中的空格

我有一个变量如何在perl中使用正则表达式来检查字符串是否包含空格?例如:

$test = "abc small ThisIsAVeryLongUnbreakableStringWhichIsBiggerThan20Characters";
Run Code Online (Sandbox Code Playgroud)

因此,对于此字符串,它应检查字符串中的任何单词是否不大于某些x字符.

perl perl-module

0
推荐指数
1
解决办法
1万
查看次数

Java按位运算符^ - 位如何随机播放

这是一个小例子.

    int a = 11; //1 0 1 1 is bit representation
    System.out.println(~a);

    Output: -12
Run Code Online (Sandbox Code Playgroud)

据我所知,'〜'运算符反转位 - 即1 0 1 1现在应该是0 1 0 0因此输出应该是4.我缺少什么?

java int bit-manipulation

0
推荐指数
1
解决办法
291
查看次数