Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98659846
clean-case.pl
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jan 15, 09:17
Size
436 B
Mime Type
text/x-perl
Expires
Fri, Jan 17, 09:17 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
23618710
Attached To
R232 fabrepos2
clean-case.pl
View Options
#!/usr/bin/env perl
use strict;
$^W=1;
@ARGV == 2 or die "!!! Syntax: <input file> <output file>\n";
my $infile = $ARGV[0];
my $outfile = $ARGV[1];
open(IN, '<', $infile) or die "!!! Error: Cannot open `$infile'!\n";
open(OUT, '>', $outfile) or die "!!! Error: Cannot write `$outfile'!\n";
while (<IN>) {
s/^(=head[1] [A-Z])(.*)/$1\L$2\E/;
s/(L<"[A-Z])([^"]+)">/$1\L$2\E">/g;
print OUT;
}
close(IN);
close(OUT);
__END__
Event Timeline
Log In to Comment