#!/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. 十九、CI框架之数据库操作delete用法

    一.代码如下: 二.执行f访问 三.查看数据库,已经id=15的数据已经被删掉了 不忘初心,如果您认为这篇文章有价值,认同作者的付出,可以微信二维码打赏任意金额给作者(微信号:382477247)哦, ...

  2. C# 添加Log文件、记录Log

    其实在平时的开发过程中都是不怎么写log的,觉得在debug中能看得一清二楚.同事小姐姐前辈,一直就我不写log进行批判,但是我从来不改,哈哈.也算是遇到报应了,在最近一个工程里,本地调试一切正常,到 ...

  3. MySQL数据类型使用总结,浮点使用注意事项

    1.对于精度要求较高的应用中,建议使用定点数来存储数值,以保证结果的准确性. 2.对于字符类型,要根据存储引擎进行相应的选择 3.对含有TEXT和BOLB字段的表,如果经常做删除和修改记录的操作要定时 ...

  4. axios基础介绍

    axios基础介绍 get请求要在params中定义,post要在data中定义.

  5. Codeforces 1296E1 - String Coloring (easy version)

    题目大意: 给定一段长度为n的字符串s 你需要给每个字符进行涂色,然后相邻的不同色的字符可以进行交换 需要保证涂色后能通过相邻交换把这个字符串按照字典序排序(a~z) 你只有两种颜色可以用来涂 问是否 ...

  6. 51nod 1393:0和1相等串

    1393 0和1相等串 基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题  收藏  关注 给定一个0-1串,请找到一个尽可能长的子串,其中包含的0与1的个数相等. I ...

  7. faster RCNN(keras版本)代码讲解(3)-训练流程详情

    转载:https://blog.csdn.net/u011311291/article/details/81121519 https://blog.csdn.net/qq_34564612/artic ...

  8. linux上大文件切割成小文件传输

    使用tar命令进行压缩,使用split进行切割 压缩并分割: tar -zcvf - admin- |split -b 100m -d admin-.tar.gz 解压: 先合并成tar包在解压 ca ...

  9. node,npm,webpack,vue-cli模块化编程安装流程

    首先什么都不要管,先装环境. pip是万能的!!! 安装node: pip3 install node 安装npm:   pip3 install npm 安装webpack: npm install ...

  10. python 2.7编译安装

    一 官网下载python2.7源码: python安装pip python -m ensurepip --default-pip