beh, buone notizie...cmq ormai avevo risolto così:
codice:
my $OS = $^O;
if ($OS =~ /^MSWin/i) {
$OS = 'WINDOWS';
} elsif ($OS =~ /^VMS/i) {
$OS = 'VMS';
} elsif ($OS =~ /^dos/i) {
$OS = 'DOS';
} elsif ($OS =~ /^MacOS/i) {
$OS = 'MACINTOSH';
} elsif ($OS =~ /^os2/i) {
$OS = 'OS2';
} elsif ($OS =~ /^epoc/i) {
$OS = 'EPOC';
} elsif ($OS =~ /^cygwin/i) {
$OS = 'CYGWIN';
} else {
$OS = 'UNIX';
}
if ($OS ne 'WINDOWS')
{
$SIG{"PIPE"} = $SIG{"KILL"} = $SIG{"QUIT"} = $SIG{"ABRT"} =
$SIG{"INT"} = sub { print "-> Connection closed\n"; exit; };
}
grazie lo stesso