#!/usr/bin/perl

 use strict;
use warnings; $_ = 'oireqo````'; unless($_ =~ /^a/m){print "no match to a\n"} #no match to a if(!($_ =~ /^a/m)){print "no match to a\n"} #no match to a unless($_ =~ /^o/m){print "no match to a"}else{print "match!\n"} my $number = ; while($number<)
{
$number++;print "$number\n";
} #2
#3
#4
#5
#6
#7
#8
#9
#10
#11
#12 until($number<)
{
$number--;print "$number\n"
} #11
#10
#9
#8
#7
#6
#5
#4
#3
#2
#1 print "match!\n"if($_ =~ /^o/m); #match! my @arr=(,,,,,,);print foreach(@arr);print"\n"; #1234567 #my @arr_1=(1,2,3,4,5,6,7);print"$k" foreach my $k($#arr_1);print"\n";
#Global symbol "$k" requires explicit package name (did you forget to declare "my $k"?) at t.pl line 62.
#syntax error at t.pl line 62, near "$k("
#Execution of t.pl aborted due to compilation errors. {
my $k = "good";
}
#print "$k\n"; #Global symbol "$k" requires explicit package name (did you forget to declare "my $k"?) at t.pl line 70.
#Execution of t.pl aborted due to compilation errors. my @fruit = ('apple','banana','peach','apple','apple');my %match;$match{$_}++ foreach(@fruit);print "$match{$_}\n"foreach(keys %match); #1
#1
#3 my $five_1= ;my $six_1 = $five_1++;print "$six_1\t$five_1\n";
my $five_2= ;my $six_2 = ++$five_2;print "$six_2\t$five_2\n"; #5 6
#6 6 my %seen;foreach(@fruit) {print "i 've get $_!\n" if $seen{$_}++;} #i 've get apple!
#i 've get apple! for($_ = "abcdefg";s/(.)//;){print "$1\n";if($ eq "f"){last;}} #a
#b
#c
#d
#e
#f
my %seen; READ:while(<>)
{
foreach(split)
{
next READ if /\W/;$seen{$_}++;
}
} foreach (keys %seen){print "last:$_ is $seen{$_}\n";last if /dewm/;}
foreach (keys %seen){print "next:$_ is $seen{$_}\n";next if /dewm/;}
#foreach (keys %seen){print "redo:$_ is $seen{$_}\n";redo if /dewm/;} # cat 1.txt
# shsjsk 123
# dewm
# shsjsk 123
# shsjsk 123
# shsjsk 123
# cat 1.txt |perl t.pl
#last:shsjsk is 4
#next:shsjsk is 4
#next:123 is 4
#next:dewm is 1
#redo:dewm is 1
#…… my $zero = ;my $one = ;
if (($zero != )&&($one%$zero==)){print "get!\n"} # my %zoo;$zoo{'fish'}='cat',$zoo{'mouse'} ='dog';$zoo{'dog'}="";
my $animal=$zoo{'dog'}||'nobody';print "$animal\n";
my $animal_1=$zoo{'panda'}||'nobody';print "$animal_1\n";
my $animal_2=defined $zoo{'dog'}? '1':'nobody';print "$animal_2\n";
my $animal_3=$zoo{'dog'}//'nobody';print "$animal_3\n"; #nobody
#nobody
#1
# printf "%s\n",$animal_3//'nobody'; # my $m =;($m>)||print "$m\n"; # $m> or die "wrong judgement"; #wrong judgement at t.pl line 152, <> line 5.

unless|until|LABEL|{}|last|next|redo| || |//|i++|++i的更多相关文章

  1. electron 开发记录

    判断是否开发环境 安装 electron-is-dev npm install electron-is-dev // main.js const isDev = require('electron-i ...

  2. Perl学习之四:语句(续)

    循环控制:1.last 退出标签的语句块2.next 3.redo不推荐,循环次数不可控 4.goto不推荐.***************************************标签: 先 ...

  3. Electron结合React和TypeScript进行开发

    目录 结合React+TypeScript进行Electron开发 1. electron基本简介 为什么选择electron? 2. 快速上手 2.1 安装React(template为ts) 2. ...

  4. Undo/Redo for Qt Tree Model

    Undo/Redo for Qt Tree Model eryar@163.com Abstract. Qt contains a set of item view classes that use ...

  5. InnoDB On-Disk Structures(五)-- Redo Log & Undo Logs (转载)

    1.Redo Log The redo log is a disk-based data structure used during crash recovery to correct data wr ...

  6. ios label 自动计算行高详解

    在OC当中自动计算行高主要调用系统的 p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #ffffff } span ...

  7. Android studio使用gradle动态构建APP(不同的包,不同的icon、label)

    最近有个需求,需要做两个功能相似的APP,大部分代码是一样的,只是界面不一样,以前要维护两套代码,比较麻烦,最近在网上找资料,发现可以用gradle使用同一套代码构建两个APP.下面介绍使用方法: 首 ...

  8. MySQL,MariaDB:Undo | Redo [转]

    本文是介绍MySQL数据库InnoDB存储引擎重做日志漫游 00 – Undo LogUndo Log 是为了实现事务的原子性,在MySQL数据库InnoDB存储引擎中,还用Undo Log来实现多版 ...

  9. WPF自定义控件与样式(3)-TextBox & RichTextBox & PasswordBox样式、水印、Label标签、功能扩展

    一.前言.预览 申明:WPF自定义控件与样式是一个系列文章,前后是有些关联的,但大多是按照由简到繁的顺序逐步发布的等,若有不明白的地方可以参考本系列前面的文章,文末附有部分文章链接. 本文主要是对文本 ...

随机推荐

  1. Python学习——enumerate

    enumerate(seq, start) seq -- 可遍历的序列      start -- 下标起始位置 seq = [11,22,33,44,55] for i in seq: print( ...

  2. 二十二、CI框架之模型别名

    一.在控制器中调用模型时,可以给模型取别名,之后调用时,调用别名就可以了 二.界面显示如下: 不忘初心,如果您认为这篇文章有价值,认同作者的付出,可以微信二维码打赏任意金额给作者(微信号:382477 ...

  3. SQL注入类型

    本文转自:https://www.cnblogs.com/cui0x01/p/6322826.html Sql注入_类型 1.sql注入 通过把SQL命令插入到Web表单提交或输入域名或页面请求的查询 ...

  4. SQL约束攻击

    本文转载自https://blog.csdn.net/kkr3584/article/details/69223010 目前值得高兴的是,开发者在建立网站时,已经开始关注安全问题了--几乎每个开发者都 ...

  5. day23(023-递归练习)

    23.01_File类递归练习(统计该文件夹大小) * 需求:1,从键盘接收一个文件夹路径,统计该文件夹大小(字节?) * * 从键盘接收一个文件夹路径 * 1,创建键盘录入对象 * 2,定义一个无限 ...

  6. python3 sort list

    1. 对元素指定的某一部分进行排序,关键字排序 s = ['release.10.txt','release.1.txt','release.2.txt','release.14.txt','rele ...

  7. 理解python中的'*','*args','**','**kwargs'

    本文来源:http://blog.csdn.net/callinglove/article/details/45483097 让我们通过以下6步来理解: 1. 通过一个函数调用来理解’*’的作用 2. ...

  8. JZOJ-2019-11-8 A组

    T1 给定\(n\)个点的坐标(\(0 \leq xi,yi \leq 10000\))求选出任意三个点能组成的三角形的总面积. Input 第一行\(n\)表示点数.接下来每行两个数\(x_i\), ...

  9. Java 语言特性【一】——JUC(Java 并发工具包)

    引言 JUC即java.util.concurrent,是java提供的用于多线程处理的工具类库.重点关注 ConcurrentXXX.AtomicXXX.Executor.Caller&&a ...

  10. GRUB&MBR引导

    (ubuntu下搜索gnome-disk可以打开磁盘管理) 简单开机过程 : ①按下电源后,计算机自检(POST),如果硬件设备(CPU.内存.硬盘.光驱.各种卡)都没有问题,BIOS会检查各个硬盘的 ...