decode_utf8が気になって今ググってるのですが、decode_utf8の使い方は
utf8の文字コードがあった場合、utf8フラグを付け、すでにフラグがついてればそのまま返す。

というもので、文字コードがsjisとかだと使えないということでしょうか?↓

use utf8;

my $str_utf8 = encode('utf8', 'あああ');
my $str = encode('utf8', $str_utf8);
my $str_test = encode('sjis', $str_utf8);

my $hoge1 = decode_utf8($str_utf8); #そのまま返すのでutf8フラグあり
my $hoge2 = decode_utf8($str); #utf8フラグ付きで返す
my $hoge3 = decode_utf8($str_test); #sjisなのでエラー??