use Win32::TieRegistry( Delimiter=>'/' ); my $key = 'Classes/Applications/AcroRd32.exe/shell/open/command'; my $command = $Registry->{$key}{'/'} or die "Can't read '$key': $^E\n"; $command =~ s{ "%1"$}{} or warn; print $command;