| 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 "utf8", decode $e, $options->{'p'} . $_ . $options->{'s'}; | ||
| 23 | } | ||
| 24 | |||
| 25 | |||
| 26 | __END__ |