Board logo

标题: [原创代码] 【练习-011】按要求将字符串分段输出 [打印本页]

作者: sxw    时间: 2011-10-9 15:41     标题: 【练习-011】按要求将字符串分段输出

  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. my $string='xh45q3ma+remgofm54sevhrna4g5r8pl9cjardezqjwj3m8itamh0a4itzd6jz8cmrfmibmhr0wmccyb8qnp2qh4rvlwff6yr2ez4eo063u6viy7ppw+nzxaxe8vrm190eei_0dwx5e2kxbds-ae6e96c9_i9glw8mz+uf6uienx9od8bktfnjlwlqu-e1rcj33_+4bz';
  5. my @s=$string=~m/.{10}/g;
  6. print join "\n",@s;
复制代码





欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2