zoukankan      html  css  js  c++  java
  • 钻石操作符

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

    =pod
    print " -----------------------------while(defined($equal_sign = <>))------------------------------- ";
    my $forwar_slash;
    while(defined($forwar_slash = <>)){
        chomp($forwar_slash);
        print "$forwar_slash "
    }
    print " -----------------------------while(defined($equal_sign = <>))------------------------------- ";
    =cut

    =head1
    print " ---------------------------while(<>)--------------------------------- ";
    while(<>){
        chomp;
        print "$_ ";
    }
    print " ---------------------------while(<>)--------------------------------- ";
    =cut

    =head1
    print " ----------------------------@ARGV-------------------------------- ";
    foreach(@ARGV){
        print $_;
    }
    print "foreach_end. ";
    my $metacharacter = shift(@ARGV);
    $metacharacter = shift(@ARGV);
    print $metacharacter;
    print " ----------------------------@ARGV-------------------------------- ";
    =cut

    =head1
    print " ---------------------------------_mannually_mod_@ARGV--------------------------- ";
    @ARGV = qw{pl.pl pl.pl};
    while(<>){
        chomp;
        print "$_ ";
    }
    print " ---------------------------------_mannually_mod_@ARGV--------------------------- ";
    =cut1

    print " ---------------------------------array_element_with_carriage_return_--------------------------- ";
    my @minus_sign = qw{ notation angle_brackets at_sign };
    print @minus_sign;
    print " ";
    print "@minus_sign";
    print " ---------------------------------array_element_with_carriage_return_--------------------------- ";

    print " ---------------------------------print_as_func_call_with_parentheses--------------------------- ";
    print (2+3)*4;
    print " ---------------------------------print_as_func_call_with_parentheses--------------------------- ";

    print " ---------------------------------printf_--------------------------- ";
    printf "username:%s.   password:%s.", $minus_sign[0], $minus_sign[1];
    print " ---------------------------------printf_--------------------------- ";

    print " ---------------------------------printf_%g_aoto_select_num_format_--------------------------- ";
    printf "NO 1: %g, NO 2: %g, NO 3: %g.", 5/2, 51/17, 51 ** 17 ;
    print " ---------------------------------printf_%g_aoto_select_num_format_--------------------------- ";

    print " ---------------------------------_percent_sign--------------------------- ";
    printf "Monthly interest rate: %.2f%% ", 5.25/12;
    print " ---------------------------------_percent_sign--------------------------- ";

    print " ---------------------------------store_format_string_2_scala_--------------------------- ";
    my @dollar_underscore = qw { wilma dino pebbles };
    my $semicolons = "The items are: ".("%10s " x @dollar_underscore);
    printf $semicolons, @dollar_underscore;
    print " ---------------------------------store_format_string_2_scala_--------------------------- ";

    print " ---------------------------------cooleset_--------------------------- ";
    printf"The items are: ".("%10s " x @dollar_underscore), @dollar_underscore;
    print " ---------------------------------cooleset_--------------------------- ";

    print " ---------------------------------backslash_percent_sigh_--------------------------- ";
    print "\%";
    print " ---------------------------------backslash_percent_sigh_--------------------------- ";

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

  • 相关阅读:
    睡眠错误
    Linux中安装Mysql授权远程访问
    lamp安装
    MySQL 数据类型(Day41)
    MySQL 表操作 (Day40)
    MySQL之存储引擎(Day39)
    MySQL下载安装
    python并发编程之IO模型(Day38)
    同步锁,死锁现象与递归锁,信息量Semaphore.....(Day36)
    多线程并发练习(Day35)
  • 原文地址:https://www.cnblogs.com/books2read/p/11004037.html
Copyright © 2011-2022 走看看