#!/usr/bin/perl use strict; use warnings; use diagnostics; use IPC::Cmd 0.84 qw[can_run run run_forked QUOTE]; # Achtung: Cmd.pm Zeile 235 muss auf Win 32Bit so lauten: my $abs = File::Spec->catfile( IS_WIN32 ? Win32::GetShortPathName( $dir ) : Win32::GetANSIPathName($dir), $command); use Data::Dumper; my %conf = ( exe => 'gpg2.exe', ); my $full_path = can_run($conf{exe}); if (defined $full_path) { print "verwende Pfad '$full_path'\n"; my $cmd = $full_path .'' ; my @return = run( command => $cmd, # verbose => 0, buffer =>\my $buffer, timeout => 20, ); # print Dumper(\@return); if ($buffer =~ /gpg: Go ahead and type your message/i) { print WOHIN? "Test"; } # if (defined $buffer) { # print "\n\nErgebnis:\n$buffer"; # } # else { # print "Programmstart gescheitert\n"; # } } else { print "Nicht installiert oder nicht im path\n"; }