in reply to Porting code between NT/Unix

I suppose you really man 'operating system' rather than 'system architecture', but just in case, you can find the latter with Config.pm

  use Config;

  if ( $Config{archname} eq whatever ) {
    ...
  }

This'll allow to differentiate between linux on alpha and linux on sgi or Dreamcast or whatever.

Of course see the Config perldoc for more details.