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 " ---------------------------------_--------------------------- ";

  • 相关阅读:
    多视点视频的分类和技术标准
    判断任意控制台输入十进制数是否为水仙花数(C++)
    mysql创建新用户并授权限
    Linux下使用sqlplus查询数据时乱行显示问题
    读Strarling有感
    Starling性能优化技巧
    如何在Django Rest Framework中过滤嵌套的序列化器?
    sql 高级教程
    小技巧字符串比较
    WPF MVVM DataGrid数据直更新
  • 原文地址:https://www.cnblogs.com/books2read/p/11004037.html
Copyright © 2011-2022 走看看