From 01a98fd6911a01160a5d6830397363a60417c540 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 28 Apr 2022 19:23:35 -0600 Subject: [PATCH] os390 isn't necessarily EBCDIC --- lib/Net/Cmd.pm | 4 ++-- lib/Net/FTP.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Net/Cmd.pm b/lib/Net/Cmd.pm index af4d08d..6d2e812 100644 --- a/lib/Net/Cmd.pm +++ b/lib/Net/Cmd.pm @@ -19,7 +19,7 @@ use Symbol 'gensym'; use Errno 'EINTR'; BEGIN { - if ($^O eq 'os390') { + if (ord "A" == 193) { require Convert::EBCDIC; # Convert::EBCDIC->import; @@ -41,7 +41,7 @@ use constant DEF_REPLY_CODE => 421; my %debug = (); -my $tr = $^O eq 'os390' ? Convert::EBCDIC->new() : undef; +my $tr = ord "A" == 193 ? Convert::EBCDIC->new() : undef; sub toebcdic { my $cmd = shift; diff --git a/lib/Net/FTP.pm b/lib/Net/FTP.pm index bc789cd..a2782a5 100644 --- a/lib/Net/FTP.pm +++ b/lib/Net/FTP.pm @@ -66,7 +66,7 @@ use constant TELNET_IAC => 255; use constant TELNET_IP => 244; use constant TELNET_DM => 242; -use constant EBCDIC => $^O eq 'os390'; +use constant EBCDIC => ord 'A' == 193; sub new { my $pkg = shift;