/[kvake]/add.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /add.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Thu Jun 15 10:04:23 2000 UTC (23 years, 9 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -0 lines
File MIME type: text/plain
fix

1 #!/usr/local/bin/perl
2
3 # Kreira replacement stringkove za kvake.pl
4 #
5 # kori¹tenje: ./add.pl rijec1 rijec2 rijec3 [...] >> kvake.pl
6
7 open(KVAKE,">> zamjene.pl") || die "ne mogu otvoriti zamjene.pl";
8
9 my @words = @ARGV;
10 undef @ARGV;
11 while (<>) {
12 chomp;
13 push @words,"$_";
14 }
15
16 print "Dodajem ",$#words+1," rijeèi...\n";
17 foreach $word (@words) {
18 print KVAKE "s/".replace($word)."/$word/g;\n";
19 }
20
21 close(KVAKE);
22
23 sub replace {
24
25 my $foo=$_[0];
26
27 $foo=~s/ch/è/g; $foo=~s/CH/È/g;
28 $foo=~s/cc/æ/g; $foo=~s/CC/Æ/g;
29 $foo=~s/zh/¾/g; $foo=~s/ZH/®/g;
30 $foo=~s/sh/¹/g; $foo=~s/SH/©/g;
31 $foo=~s/dh/ð/g; $foo=~s/DH/Ð/g;
32
33 return $foo;
34
35 }

  ViewVC Help
Powered by ViewVC 1.1.26