Leser: 2
10 Einträge, 1 Seite |
perl -wnl -e '$line = $_; $len = length($line); if( $len > 1) {for ($len..100) {$line =~ s/\r/X\r/g}; print $line }' test
$hundert_x="x"x100;
splice $hundert_x,0,@str,@str;
1
2
3
4
5
6
7
$ perl -wl
$str = 'abc';
$str =~ s/^(.+)$/sprintf("%s%s", $1, 'X'x(10-length($1)))/e;
print $str;
abcXXXXXXX
1
2
3
4
5
6
7
8
9
10
$ perl -wl
my $x = 'X'x10;
my $a = 'abc';
substr( $x, 0, length($a), $a );
print $x;
abcXXXXXXX
1 2 3 4
$length=100; $string="abc123"; $string=substr($string.'X' x $length, 0, $length);
1 2 3 4 5 6 7
#!/usr/bin/perl -wlni s/\n//; $/="\r"; chomp; if (length($_)>1) { print substr($_."X" x 100, 0, 100) }
1 2 3 4 5 6
#!/usr/bin/perl -wln $/="\r"; chomp; if (length($_)>1) { print substr($_."X" x 100, 0, 100) }
1 2 3 4 5 6
#!/usr/bin/perl -wln $/="\r\n"; chomp; if (length($_)>1) { print substr($_."X" x 100, 0, 100) }
1 2 3 4 5
#!/usr/bin/perl -wni s/\r\n//; if (length>1) { print substr($_." " x 100, 0, 100)."\n" }
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/perl use strict; while (<>) { # see perldoc perlvar local $/ = local $\ = "\015\012"; # work and modify $_ # print $_ print; }
$ perl modDOS.pl < dostext.txt > modified_dos.txt
10 Einträge, 1 Seite |