#!/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;