#!/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. BZOJ 4029 [HEOI2015]定价

    题解: !!!!!! 分类讨论,情况挺多 #include<iostream> #include<cstdio> #include<cstring> using n ...

  2. 菜鸟理解Lamdba表达式

    简单的说就是Java 1.8后给出个简化代码的方式, Java面向对象过分强调必须通过对象的形式来完成任务,而函数思想则尽量忽略面向对象的复杂语法,强调做什么,而不是以什么形式做. 举个栗子! 首先创 ...

  3. Aizu 2155 Magic Slayer 背包DP

    这是上上次对抗赛的题目了 其实现在发现整个代码从头到尾,都是用了背包,怪我们背包没深入学好. 比赛的时候,聪哥提出的一种思路是,预处理一下,背包出 ALL攻击 和 single攻击的 血量对应的最小花 ...

  4. 吴裕雄--天生自然JAVA SPRING框架开发学习笔记:Spring IoC容器BeanFactory和ApplicationContext

    IoC 是指在程序开发中,实例的创建不再由调用者管理,而是由 Spring 容器创建.Spring 容器会负责控制程序之间的关系,而不是由程序代码直接控制,因此,控制权由程序代码转移到了 Spring ...

  5. 《Thinking in Java》中讲到了final,发现自己有部分地方迷糊

    1.1当给全局的静态字段加上final时,系统是不会给其赋默认值的,若不手动初始化,会编译时错误——Variable 'xxx' might not have been initialized. 1. ...

  6. NoSQL:

    NoSQL:NoSQL(NoSQL = Not Only SQL ),意即"不仅仅是SQL". 在现代的计算系统上每天网络上都会产生庞大的数据量. 这些数据有很大一部分是由关系数据 ...

  7. ArchLinux安装(BIOS)

    ArchLinux安装(BIOS) 说在前头:在经历过无数次的失败尝试过后总结出的可用的安装过程(比官方的简单一点) 官方安装指导 一.连接网络 1.连接 # wifi-menu 2.检查是否联通 ( ...

  8. part7 vuex实现数据共享

    vuex 是数据框架(一个插件)(单项数据的改变流程,组件改数据必须先调Action用dispatch方法) 大型项目vue只能承担视图层的主要内容 大量数据传递的时候,往往需要一个数据框架辅助 例子 ...

  9. VS2013的工程移植到VS2008

    VS2013的工程完成后,用VS2008创建一个名称一样的工程(大小写也一样). 具体过程参考http://blog.csdn.net/sz76211822/article/details/42775 ...

  10. Java编程知识点梳理

    1. elementAt()   temp.elementAt(0) 返回temp这个vector里面存放的第一个元素--->也是一个vector类型. 2. 字符串空格分割 String [] ...