graff,
Thanks for your input. I tried decode but I'm still error-ridden; I've included the updates below. Any other ideas or encoding tricks where I can see what's going on under the hood?
Command Line Output:
06_Protection_de_la_tête.xml: No such file or directory
No such file or directory
Assuming 'require Tk::ExecuteCommand;' at ./tmp.pl line 24
Tk Output:
06_Protection_de_la_tête.xml: No such file or directory
Code:
#!/usr/local/bin/perl
use warnings;
use strict;
use Tk;
use File::Find::Rule;
use Encode qw(decode);
#my $file = '06_Protection_de_la_tête.xml';
my @files = File::Find::Rule->file->name('*.xml')->in('.');
my $file = shift @files;
$file = decode('iso-8859-1', $file);
my $cmd = "ls -l $file";
### Try ls.
print qx($cmd);
### Try reading the first line.
open my $F, '<', $file;
print $! ? "$!\n" : scalar <$F> ;
### Try ls via Tk.
my $mw = MainWindow->new;
my $exec = $mw->ExecuteCommand(
-command => $cmd,
)->pack;
$exec->execute_command;
$exec->update;
MainLoop;