博客
关于我
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+Selenium自动化测试项目实战
    查看>>
    Python+Selenium自动化测试项目实战【建议收藏】
    查看>>
    Python+Selenium自动化测试:Page Object模式
    查看>>
    python+selenium进行cnblog的自动化登录测试
    查看>>
    Python函数只返回第一个值而不是数据框
    查看>>
    Python+SQL实战:京东用户行为数据分析案例解析(上)
    查看>>
    Python+SQL实战:京东用户行为数据分析案例解析(下)
    查看>>
    PYTHON+Twisted+sqlanydb=ABORT()
    查看>>
    Python函数之返回值、作用域和局部变量
    查看>>
    Python+统计学 | 探索常用的数据分析统计分布
    查看>>
    python, selenium中用于切换帧的函数
    查看>>
    python函数
    查看>>
    python----线程、进程、协程的区别及多线程详解
    查看>>
    python---5
    查看>>
    python---使用celery分布式系统异步发送短信(云通讯)来验证登录
    查看>>
    python--003--百分号字符串拼接、format
    查看>>
    Python--10、线程
    查看>>
    Python--Redis实战:第四章:数据安全与性能保障:第4节:复制
    查看>>
    python--基本代码规范
    查看>>
    Python--抽象类接口类
    查看>>