zoukankan      html  css  js  c++  java
  • IO 双引号 输出 输入

    #! /usr/bin/perl
    use strict;
    use warnings;

    print " ---------<STDIN>_store_into_an_array_and_then_chomp()---------- ";
    my @lines = <STDIN>;
    chomp(@lines);
    print " ---------Input_complete---------- ";
    print "@lines";
    print " ---------<STDIN>_store_into_an_array_and_then_chomp()---------- ";

    print " ----------while_$line__defined_check_EOF--------- ";
    my $line;
    while (defined($line = <STDIN>)){
        print "I saw $line. ";
    }
    print " ----------while_$line__defined_check_EOF--------- ";

    print " --------while_(<STDIN>)----------- ";
    while(<STDIN>){
        print "I saw $_";
    }
    print " --------while_(<STDIN>)----------- ";

    print " -------------------------------while(define($_ = <STDIN>))----------------------------- ";
    while(defined($_ = <STDIN>)){
        print "I saw $_";
    }
    print " -------------------------------while(define($_ = <STDIN>))----------------------------- ";

    print " -------------------------------foreach(<STDIN>)----------------------------- ";
    foreach(<STDIN>){
        print "Input line is: $_.";
    }
    print " -------------------------------foreach(<STDIN>)----------------------------- ";





    print " ------------------------------------------------------------ ";
    print " ------------------------------------------------------------ ";
    print " ------------------------------------------------------------ ";
    print " ------------------------------------------------------------ ";




  • 相关阅读:
    实用工具---制作试卷
    RDP Client 参数含义调查
    xenserver 虚拟机定时开关机实现
    xenserver 脚本学习之/opt/xensource/bin/xapi-autostart-vms
    最佳的前端监听事件触发方式
    前端之Angularjs
    网页分享
    面试题之事务
    Spring Security安全访问控制解决方案的安全框架
    docker部署
  • 原文地址:https://www.cnblogs.com/books2read/p/11004055.html
Copyright © 2011-2022 走看看