博客
关于我
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/

    你可能感兴趣的文章
    Python双版本下创建一个Scrapy(西瓜皮)项目
    查看>>
    Python双版本下No module named 'requests'
    查看>>
    python及pycharm2018软件安装教程
    查看>>
    python去重txt文本_Python实现的txt文件去重功能示例
    查看>>
    python去掉列表的逗号,从Python列表项中删除标点符号
    查看>>
    Python卸载所有包
    查看>>
    python单线程下实现多个socket并发
    查看>>
    Python单元测试框架介绍(超详细~)
    查看>>
    Python单元测试框架
    查看>>
    python单元测试之unittest
    查看>>
    Python单元测试unittest实战
    查看>>
    Python单元测试-模拟VS补丁
    查看>>
    python协程实时输出_Python 协程以及事件循环的问题,怎么知道 IO 读取结束了呢?...
    查看>>
    Python十进制&;包提供错误的结果
    查看>>
    Python化身“安全老中医”:一键搞定工控系统漏洞,从零基础到精通,收藏这篇就够了!
    查看>>
    Python加速运行技巧
    查看>>
    python办公自动化基础遍历文件夹
    查看>>
    python办公自动化基础输出文件和文件夹
    查看>>
    python办公自动化基础搜索文件
    查看>>
    python知识:@classmethod和@staticmethod的异同
    查看>>