title: What exactly does -x option mean in Perl if
body: <p>I know no Perl, so please be patient!
  This is a bit from the script, that generates the error:</p>
  
  <pre><code>    if (-x '/usr/bin/gcc') {
          $gcc = Fink::Services::enforce_gcc(&lt;&lt;GCC_MSG);
  Under CURRENT_SYSTEM, Fink must be bootstrapped or updated with gcc
  EXPECTED_GCC, however, you currently have gcc INSTALLED_GCC selected.
  This typically is due to alteration of symlinks which were
  installed by Xcode. To correct this problem, you will need
  to restore the compiler symlinks to the configuration that
  Apple provides.
  GCC_MSG
          $gcc = "-gcc" . $gcc;
      }
  </code></pre>
  
  <p>This script installs fink package manager on Macs. (I'm not a Mac user, trying to help out my friend to install a program that is originally a GNU program and needs to be compiled from sources).</p>
  
  <p>The install script complains about the version of GCC being not what it expects. I suspect that this is the place that fails, but don't quite understand what is it doing.</p>
  
  <p>I've tried creating a symlink to the installed GCC, which is version 4.2.1, while fink wants version 4.2.</p>
  
  <p>This message is displayed if I put a symlink to GCC into /usr/bin. Otherwise it identifies the version of GCC properly and refuses to install.</p>
  
  <p>I thought that <code>-x</code> switch is similar to Bash and means that it is checking that the file is an executable, but I'm not sure what exactly does it do in Perl and would it treat a link to an executable as executable?</p>
  
  <p>Thanks!</p>