#!/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. Vulkan SDK 之 Depth Buffer

    深度缓冲是可选的,比如渲染一个3D的立方体的时候,就需要用到深度缓冲.Swapchain就算有多个images,此时深度缓冲区也只需要一个.vkCreateSwapchainKHR 会创建所有需要的i ...

  2. Thread.currentThread()和this的区别

    1. Thread.currentThread()可以获取当前线程的引用,一般都是在没有线程对象又需要获得线程信息时通过Thread.currentThread()获取当前代码段所在线程的引用. 2. ...

  3. web应用中并发控制的实现,各种锁的集合

    参考:http://blog.csdn.net/xiangwanpeng/article/details/55106732 B/S构架的应用越来越普及,但由于它有别于C/S构架的特殊性,并发控制始终没 ...

  4. Essay写作关键:严谨的逻辑关系

    一篇好的文章并不是句子的机械堆砌,而是一个有机整体,句子和句子之间是存在严谨的逻辑关系的,要注意句子和句子之间,段落和段落之间的衔接和连贯(Coherence and Cohesion). 要写出逻辑 ...

  5. [极客大挑战 2019]FinalSQL

    0x00 知识点 盲注 0x01 解题 根据题目提示盲注,随便点几下找到注入点 发现我们输入^符号成功跳转页面,证明存在注入 1^(ord(substr((select(group_concat(sc ...

  6. 改变UILable里面文字的大小和颜色

    UILabel *lb = [[UILabel alloc]init]; NSMutableAttributedString *attriStr = [[NSMutableAttributedStri ...

  7. php://filter(文件包含漏洞利用)及php://input

    1. php://filter 文件包含漏洞:https://blog.csdn.net/fageweiketang/article/details/80699051 筛选过滤应用: 1. 字符串过滤 ...

  8. Linux 常用命令全拼

    pwd: print work directory 打印当前目录 显示出当前工作目录的绝对路径 ps: process status(进程状态,类似于windows的任务管理器) 常用参数:-auxf ...

  9. 从Evernote大批顶尖高管离职,看处于漩涡中的笔记应用未来前景

    无论是巨头,还是独角兽,甚至是小而美的某些企业,在发生高管离职.裁员等情况时,总会引起业界的广泛关注.究其原因,就在于高管离职.裁员等往往意味着企业内部发生了动荡,甚至还会直接反映出所在行业的发展趋势 ...

  10. Vue.js——3.增删改查

    vue  写假后台  bootstrap 做的样式 代码 <!DOCTYPE html> <html lang="en"> <head> < ...