Ajouté par BoboTiG le 28/01/2011 à 16:50
# ----------------------------------------------------------------------
# Fonction : _stdin
# Objectif : good replacement for to avoid perlcritic warn :
# ' Use "<>" or "" or a prompting module instead of
# "" '
# Entries : none
# Returns : (string)user input
# Update : 20100729
#
sub _stdin {
my $io;
my $string = q{};
$io = IO::Handle->new();
if ( $io->fdopen(fileno(STDIN), 'r') ) {
$string = $io->getline();
$io->close();
}
chomp $string;
return $string;
} #end _stdin ----------------------------------------------------------