test.pl
来自「perl tester to steam character sequence.」· PL 代码 · 共 37 行
PL
37 行
#!/usr/local/bin/perl
$file = 'Input.txt';
$file2 = 'Output.txt';
open(INPUT, $file);
open(OUTPUT, ">$file2");
while ($line = <INPUT>)
{
chomp($line);
$newline = trim($line);
@array = split(//,$newline);
while(@array)
{
$diget =shift(@array);
chomp($diget);
print OUTPUT "$diget\n";
}
chomp($line);
}
close(INPUT);
close (OUTPUT);
sub trim($)
{
my $string = shift;
$string =~ s/^\s+//;
$string =~ s/\s+$//;
return $string;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?