use Carp;
use Symbol qw(gensym qualify);
-$VERSION = 1.0103;
+$VERSION = 1.0104;
@ISA = qw(Exporter);
@EXPORT = qw(open3);
close $_[0] or croak "$Me: close($_[0]) failed: $!";
}
-sub xfileno {
- my ($fh) = @_;
- return $1 if $fh =~ /^=?(\d+)$/; # deal with $fh just being an fd
- return fileno $fh;
+sub fh_is_fd {
+ return $_[0] =~ /\A=?(\d+)\z/;
}
-sub fh_is_fd {
- return $_[0] =~ /^=?\d+$/;
+sub xfileno {
+ return $1 if $_[0] =~ /\A=?(\d+)\z/; # deal with fh just being an fd
+ return fileno $_[0];
}
my $do_spawn = $^O eq 'os2' || $^O eq 'MSWin32';