There are two aspects to setting up FogBugz-Perforce integration:
The starting point for setting up source control integration is to create the repository in FogBugz. Start by logging into FogBugz as an administrator. If you will be using the Perforce Defect Tracking Gateway (DTG), install and enable the Perforce DTG Integration plugin (you can find it in the FogBugz Plugin Gallery).
To setup the repository in FogBugz, go to Admin | Source Control. Click Create New Repository. In the resulting dialog, select Perforce as the type and give the repository a display name. Click Next.
The resulting dialog contains a script for getting Perforce to transmit changes to FogBugz. Select the appropriate tab for the server Perforce runs on to use triggers, or DTG for the Perforce Defect Tracking Gateway (DTG). Download the script and follow the instructions below to set it up. Before you close the dialog, choose whether you want FogBugz to provide links to your check-ins. You can change this setting later by clicking the Edit icon next to the repository on the Admin | Source Control page.
In order to have FogBugz link to checked-in files directly from cases, you need to have P4Web installed. Once it is installed and working with your Perfoce repository, set the path to it in the New Repository dialog and click OK to complete the setup.
We provide trigger scripts for Perforce in Perl or VBScript, depending on whether your Perforce server is running on Unix, where Perl is probably installed, or Windows, where VBScript is probably installed.
If you have a Windows server which can access your Perforce server, you can use the Perforce Defect Tracking Gateway (DTG) instead of setting up trigger scripts. If you do this, FogBugz cases will appear in Perforce as Perforce Jobs and you can apply changelists to them directly.