`

perl usage of bare blocks, example 1

    博客分类:
  • perl
阅读更多
# file:
#   bare_blocks.pl
# description:
#   this is the file to test semantic of bare blocks
#
# conclusion:
#    bare blocks is like a loop which execute only once
#    you can use last;next;redo as you can do on loops.
#
use strict;

my $i = 85;
if ($i > 0 and $i < 100) {
	{
		print "Excellent" and last if $i >= 90;
		print "Good"      and last if $i >= 80;
		print "Fair"      and last if $i >= 70;
		print "Pass"      and last if $i >= 60;
		print "Fail"      and last if $i < 60;
	}
}
 
分享到:
评论

相关推荐

    Perl.6.Essentials

    Written by members of the Perl 6 core development team, the book offers an explanation of the various stages of the project, with reference material for programmers who are interested in what changes...

    Practical Mod Perl

    Command Interpreter Program (Shell) Conventions Installing Perl Modules How to Contact Us Acknowledgments Part I: mod_perl Administration Chapter 1. Introducing CGI and ...

    Templates for the Solution of Linear Systems - Building Blocks for Iterative Methods.ps

    Templates for the Solution of Linear Systems - Building Blocks for Iterative Methods.ps

    perl获取文件修改时间

    - `[7]`:块数量(Number of Blocks) - `[8]`:最后访问时间(Access Time) - `[9]`:最后修改时间(Modification Time) - `[10]`:最后状态更改时间(Change Time) - `[11]`:文件系统ID(File System ID...

    Perl语言的编译

    ### Perl语言的编译 #### 引言 Perl是一种广泛使用的高级编程语言,以其灵活性和高效性著称。与其他编程语言不同的是,Perl程序的执行过程中包含了编译和解释两个阶段。这种特性使得Perl能够更好地适应不同的应用...

    Eight Building Blocks of CRM: A Framework for Success

    ### 八大构建模块打造成功的客户关系管理框架 在当今高度竞争的市场环境中,企业越来越意识到客户关系管理(CRM)的重要性。一个成功的CRM计划不仅能够帮助企业更好地了解客户需求、提高客户满意度,还能通过优化...

    scratch-blocks-develop.zip

    1. **自定义编程块**:如果你希望添加新的功能或者调整现有块的行为,可以直接修改源码。 2. **本地化**:如果你想让Scratch支持更多语言,可以在源码中添加或修改翻译文件。 3. **扩展集成**:可以将`scratch-...

    Building Blocks.dotx

    Building Blocks.dotx为word2007的页码模板,亲测有效,安装方法百度下即可

    code blocks for Novice

    ### Code::Blocks:初学者的理想选择 #### 一、概览与重要性 Code::Blocks是一款功能强大且用户友好的开源集成开发环境(IDE),专为C和C++程序员设计,尤其是初学者。其跨平台特性使其在Windows、Linux和macOS上...

    scratch-blocks源码编译1

    ### Scratch-Blocks源码编译指南 #### 一、前言 本文将详细介绍如何从源码编译Scratch-Blocks的过程。Scratch-Blocks是一款基于Google的Blockly项目的可视化编程库,用于构建像Scratch这样的图形化编程环境。通过...

    code blocks汉化包

    1. 首先,下载名为"code blocks汉化包"的压缩文件,确保文件完整无损。 2. 解压缩文件,会看到一个名为"locale"的文件夹和一个"tips.txt"的文本文件。 3. "locale"文件夹内包含汉化资源,这些资源是按照Code::Blocks...

    cuda_by_example

    - They are executed by blocks of threads, where each thread performs a unique task. - Blocks can be organized into grids, allowing for flexible control over parallel execution. 5. **Memory ...

    Code::Blocks

    Code::Blocks是一款强大的开源集成开发环境(IDE),它支持多种编程语言,包括Frotran、C++和Python等。在本文中,我们将深入探讨Code::Blocks的特性、用途以及如何利用它来编辑、修改和应用Frotran语言。 首先,让...

    Building Blocks.dotx office 2007页码模板

    Building Blocks.dotx office 2007页码模板

    Word 2007 Building Blocks

    Word 2007 无法插入页码,请下载Building Blocks进行更新模板。具体更新模板方法可以查看此链接http://www.360doc.com/content/11/0102/10/3731941_83304659.shtml

    code blocks

    code blocks

    Microsoft.ApplicationBlocks.Data.dll

    Microsoft.ApplicationBlocks.Data.dll

    Built-In Building Blocks.dotx

    Built-In Building Blocks.dotx office2016 .

Global site tag (gtag.js) - Google Analytics