]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/perl | |
2 | ||
3 | if (! @ARGV) { | |
4 | @ARGV=qw(linus git linux rebase merge cherry-pick branch); | |
5 | } | |
6 | ||
7 | my $coolstuff=join("|", map { "\Q$_\E" } @ARGV); | |
8 | ||
9 | my $len=0; | |
10 | while (<STDIN>) { | |
11 | while(/(($coolstuff)[.?!]*)/ig) { | |
12 | $len+=length($1)+1; | |
13 | if ($len > 70) { | |
14 | print "\n"; | |
15 | $len=0; | |
16 | } | |
17 | print $1." "; | |
18 | } | |
19 | } | |
20 | print "\n" if $len; |