10 $PROGRAM_DIR =~ s/[^\/\\]+$//;
11 $PROGRAM_DIR = "./" unless($PROGRAM_DIR);
13 map "$PROGRAM_DIR$_",qw{modules lib
../modules
..lib
};
17 my @OPTIONS = qw
/help|h|? version|ver edit-me manual|man/;
22 require MyPlace
::Usage
;
23 Getopt
::Long
::GetOptions
(\
%OPTS,@OPTIONS);
24 MyPlace
::Usage
::Process
(\
%OPTS,$VERSION);
28 require MyPlace
::Usage
;
29 MyPlace
::Usage
::PrintHelp
();
32 my($start_exp,$end_exp,@files) = @ARGV;
33 die("Usage:$0 start_exp end_exp files...\n") unless(@files);
34 foreach my $org_file (@files) {
39 if(open FI
,"<",$org_file) {
47 $between=0 if(m/$end_exp/);
60 print STDERR
"Backup $org_file ...\n";
61 system("cp","-av",$org_file,$org_file . ".org");
62 print STDERR
"Modify $org_file ...\n";
63 if(open FO
,">",$org_file)
81 print STDERR
"File not accessible : $org_file\n";
93 strip_lines_between - strip lines from text files using regextp
97 strip_lines_between start_exp end_exp file1 [file2 ...]
105 Print version infomation.
107 =item B<-h>,B<--help>
109 Print a brief help message and exits.
111 =item B<--manual>,B<--man>
113 View application manual
117 Invoke 'editor' against the source
123 Strip lines between START_EXP and END_EXP from text files
127 2010-06-08 xiaoranzzz <xiaoranzzz@myplace.hell>
133 xiaoranzzz <xiaoranzzz@myplace.hell>