#!/usr/bin/perl -wl $encoding = shift @ARGV; $word = shift @ARGV; defined $encoding and defined $word or die 'give me an encoding and a word to convert'; use Encode; use Data::Dumper q(Dumper); print Dumper( decode $encoding, $word );