View .cdifrc
option default --mecab
View file0.txt
$_ = do { local $/; <> };
if (open(CHLD, '|-') == 0) {
print <>;
exit;
}
print CHLD $_;
View file0.txt
tir -rGRc10
View file0.txt
while (/pattern/g) {
my($s, $e) = ($-[0], $+[0]);
...
View cdif.el
;;; cdif.el --- cdif and ansi-color interface
;;; Code:
(autoload 'ansi-color-apply-on-region "ansi-color" nil t)
(defun cdif-buffer (&optional prefix)
"Execute cdif command on current buffer and apply ansi-color."
(interactive "P")
(if prefix
View very-simple-battle-monster.pl
#!/usr/bin/perl -CSD
use strict;
use warnings;
use utf8;
my %モンスター = (
0 => "ゼクロム",
1 => "ワンリキー",
2 => "ニョロモ",
View print_wdiff.pl
sub print_wdiff {
my %arg = @_;
my @matched = @{$arg{matched}};
for (my $i = $#matched; $i >= 0; $i--) {
my($s, $e) = @{$matched[$i]};
my $t = substr($_, $s, $e - $s);
if ($t =~ s/\A (?:\{\+|\[\-) (.*) (?:\+\}|\-\]) \Z/$1/sx) {
substr($_, $s, $e - $s) = $t;
$matched[$i][0] = $s - $i * 4;
View App::Greple::diff.pm
package App::Greple::diff;
1;
=head1 NAME
diff - greple module for diff command output
=head1 SYNOPSIS
View temp var declaration
## なんとなく嫌だ
my %seen;
@opt_icode = grep { not $seen{$_}++ } @opt_icode;
## ダサい
{
my %seen;
@opt_icode = grep { not $seen{$_}++ } @opt_icode;
}
View App::Greple::perl.pm
=head1 NAME
perl - Greple module for perl script
=head1 SYNOPSIS
greple -Mperl [ options ]
=head1 SAMPLES