Leser: 1
9 Einträge, 1 Seite |
my @string = split ' ', $string;
$string =~ s!\s!!g;
$string =~ s/[ \t]//g;
$string =~ tr/ \t//d;
Quotem Treat string as multiple lines.
s Treat string as single line.
1 2 3 4 5 6 7 8 9 10 11 12
my $x = qq(1st line\n2nd line\n3rd line\n); (my $y = $x) =~ s/^\d/_/g; # useless use of /g print qq("$y"); # output:"_st line\n2nd line\n3rd line\n" *) ($y = $x) =~ s/^\d/_/mg; print qq("$y"); # output:"_st line\n_nd line\n_rd line\n" ($y = $x) =~ s/.\d/_/sg; print qq("$y"); # output:"1st line_nd line_rd line\n" ($y = $x) =~ s/.\d/_/smg; # useless use of /m print qq("$y"); # output:"1st line_nd line_rd line\n"
Quotem Treat string as multiple lines.
s Treat string as single line.
9 Einträge, 1 Seite |