Just realized what was wrong.. setting the locale correctly in the first script fixes the problem. The script now looks like:
use strict;
use warnings;
use locale;
use POSIX qw(locale_h);
+
binmode( STDOUT, ":utf8" );
+
setlocale(LC_CTYPE, "german");
+
my $accented_char = "\x{00dc}"; #Upper case U with DIAERESIS
print "accented char=$accented_char\n";
+
my $lowercased = lc( $accented_char );
+
print "lowercased=$lowercased\n";
The question I have now however is why I need to set the locale in one case (the script above) but not the other (the second script that reads from stdin in my first post).
According to http://perldoc.perl.org/functions/lc.html, my best guess is that the UTF-8 flag is set on the string when it is read from stdin, but not when the string is instantiated in the code itself. Is there a way to confirm this?