From: Richard Jones Date: Wed, 29 Jul 2009 14:33:22 +0000 (+0100) Subject: Lib.pm: Use Perl backtick instead of slurp (Aron Griffis). X-Git-Tag: 1.0.65~6 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;ds=inline;h=8b854734bd13b7f68b72422932de3bf24c84ca15;hp=25c4b0190c22e3bdc5594aff994c8e8f99db5ab3;p=libguestfs.git Lib.pm: Use Perl backtick instead of slurp (Aron Griffis). --- diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 1e5638e..7a734aa 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -440,9 +440,7 @@ sub file_architecture foreach my $bin (@_initrd_binaries) { if (-f "$dir/bin/$bin") { - open PIPE, "file $dir/bin/$bin |"; - local $/ = undef; - $_ = ; + $_ = `file $dir/bin/$bin`; if (/ELF.*executable, (.+?),/) { return _elf_arch_to_canonical ($1); }