博客
关于我
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 存入数据库bigint_python基础_MySQL的bigint类型
    查看>>
    python 学习 面向对象编程
    查看>>
    Python 学习日记第三篇 -- 字典
    查看>>
    Python 学习笔记(一)Data type
    查看>>
    python 安装echarts
    查看>>
    python 安装opencv及问题解决
    查看>>
    Python 安装程序:“写入文件 C:\Python27\pythonw.exe 时出错“
    查看>>
    Python 安装避坑指南:从入门到进阶
    查看>>
    Python 安装配置详解
    查看>>
    Python 常见的错误类型和继承关系
    查看>>
    python 常量_零基础学Python系列之一:Python的变量与常量
    查看>>
    Python 并发编程
    查看>>
    python 微信扫码登录_python实现微信第三方网站扫码登录(Django)
    查看>>
    Python 快速下载依赖
    查看>>
    Python 接口并发测试详解
    查看>>
    Python 接口自动化 —— requests框架
    查看>>
    Python 无法安装包
    查看>>
    python 日历小部件 - 返回用户选择的日期
    查看>>
    Python 日志管理封装
    查看>>
    Python 是否优化尾递归?
    查看>>