script/encode.pl untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/local/bin/perl -w
2  
3 use Encode::Arabic::Buckwalter ':xml';
4 use Encode::Arabic;
5  
6 our $VERSION = $Encode::Arabic::VERSION;
7  
8 use Getopt::Std;
9  
10 $Getopt::Std::STANDARD_HELP_VERSION = 1;
11  
12 $options = { 'p' => '', 's' => '' };
13  
14 getopts('p:s:v', $options);
15  
16 die $Encode::Arabic::VERSION . "\n" if exists $options->{'v'};
17  
18 $e = shift @ARGV;
19  
20 while (<>) {
21  
22 print encode $e, decode "utf8", $options->{'p'} . $_ . $options->{'s'};
23 }
24  
25  
26 __END__