isgood 发表于 2018-9-1 07:47:31

perl 语言入门第三章习题答案

  自己有点懒,为了便于记忆,就都贴出来啦。如果有需要的话,就直接从附件里下载
  #!/usr/bin/perl
  ######第三章第一题答案#####
  #print " input the number for a:\n";
  #$a=;
  #print " input the number for b:\n";
  #$b=;
  #print "you put the num is :\n";
  #@lines=("$a","$b");
  #print @lines;
  #@lines_reverse=reverse@lines;
  #print "the reverse num is :\n";
  #print @lines_reverse;
  #########第三章习题第二题的答案###########################
  #@lines=qw(fred betty barney dino wilma pebbles bamm-bamm);
  #$index=;
  #print "$lines[$index-1]\n";
  ##########第三章第三题答案##################
  $a=;
  $b=;
  $c=;
  $d=;
  @line=("$a","$b","$c","$d");
  @sort_line=sort(@line);
  print @sort_line;

页: [1]
查看完整版本: perl 语言入门第三章习题答案