in reply to Re: Tell if arch is HP or HPIA64
in thread Tell if arch is HP or HPIA64

$ perl -v |ack "built for" This is perl 5, version 14, subversion 1 (v5.14.1) built for MSWin32-x +86-multi-thread $ perl -V:archname archname='MSWin32-x86-multi-thread'; $ perl -MConfig -le " print $Config{archname} " MSWin32-x86-multi-thread

Replies are listed 'Best First'.
Re^3: Tell if arch is HP or HPIA64
by tmurnane (Novice) on Aug 30, 2012 at 15:47 UTC

    Thanks all

    Since I'm doing this from within a script and only have the issue on HP, I have the following:

    my $os = $^O; my $OS = "Win32"; SWITCH: { $os =~ /^s/i && do { $OS = "SunOS"; last SWITCH; }; $os =~ /^l/i && do { $OS = "Linux"; last SWITCH; }; $os =~ /^a/i && do { $OS = "AIX"; last SWITCH; }; $os =~ /^h/i && do { $OS = $Config{'archname'} =~ /64/ ? "HPIA64" : + "HP"; last SWITCH; }; }

    Thanks

Re^3: Tell if arch is HP or HPIA64
by choroba (Cardinal) on Aug 30, 2012 at 15:08 UTC
    Thanks for the enlightenment! I knew it should be possible, but was not able to find it faster than typing the code.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ