博客
关于我
perl智能匹配
阅读量:210 次
发布时间:2019-02-28

本文共 1044 字,大约阅读时间需要 3 分钟。

Perl???????????????????????????????????????????????????????????

??????????????????????????????????????????????????????????????

my $x = 2;my @array = (1, 2, 3);my $flag = 0;for (@array) {    if ($x == $_) {        $flag = 1;    }}if ($flag == 1) {    print "$x is in the array;";} else {    print "$x is not in the array;";}

?????????????????

my $x = 2;my @array;if (@array~~$x) {    print "$x is in the array;";} else {    print "$x is in the array;";}

???????????????????????????????

'hello'~~{hello => 1, world => 2}

??? true?????????????

???????????Perl????????????????????????????

  • Hash???Hash?????????????????
  • Hash???Array????????????????????
  • Hash???Regex????????????????????
  • Hash???Any??????????????????
  • Array???Array????????????????
  • Array???Regex?????????????????
  • Array???Num????????????????
  • Array???Any?????????????????
  • undef???Any???????????
  • Regex???Regex?????????????
  • Code()???Code()????????????
  • Any???Code()???????????????????????
  • Num???Num???????????????
  • Str???Str????????????????
  • Any???Any???????????????
  • ???????????????????????????

    转载地址:http://bqwp.baihongyu.com/

    你可能感兴趣的文章
    redis事务操作
    查看>>
    php中0,空,null和false的区别
    查看>>
    PHP中array_merge和array相加的区别分析
    查看>>
    PHP中Closure::bindTo的用法分析
    查看>>
    php中curl得使用
    查看>>
    PHP中curl特性
    查看>>
    PHP中date时间不对
    查看>>
    PHP中dirname(__FILE__)的意思
    查看>>
    PHP中extract()函数的妙用
    查看>>
    PHP中fileinfo的作用以及怎么开启fileinfo
    查看>>
    PHP中file_get_contents如何带上cookies
    查看>>
    PHP中header的作用
    查看>>
    PHP中implode()和explode()
    查看>>
    PHP中ob系列函数讲解(浏览器缓存技术)
    查看>>
    PHP中serialize和json序列化与反序列化的区别
    查看>>
    Redis事务处理
    查看>>
    php中传值与传引用的区别是什么
    查看>>
    php中使用ajax进行前后端json数据交互
    查看>>
    Redis事务和锁操作
    查看>>
    Redis事务中的watch机制-从实例入手学习
    查看>>