August 31, 2005 TRM Corporation 5208 NE 122nd Avenue Portland, OR 97230-1074 Re: TRM Corporation 2005 Omnibus Stock Incentive Plan TRM Corporation 2001 Nonqualified Stock Option Plan TRM Corporation 1996 Restated 1996 Stock Incentive Plan Ladies and Gentlemen: We have acted as special Oregon counsel to TRM Corporation (the"Company") in connection with the authorization of the issuance of up to 715,000 shares of the Company's Common Stock, with no par value (the "Shares"), pursuant to the TRM Corporation 2005 Omnibus Stock Incentive Plan (the "2005 Plan"), the TRM Corporation 2001 Nonqualified Stock Option Plan (the "2001 Plan") and the TRM Corporation Restated 1996 Stock Incentive Plan (the "1996 Plan"). The 2005 Plan, the 2001 Plan and the 1996 Plan are hereinafter collectively referred to as the "Plans." We understand that you have prepared a Registration Statement on Form S-8 (the "Registration Statement") under the Securities Act of 1933, as amended (the "Act"), which you are filing with the Securities and Exchange Commission (the "SEC") with respect to the Shares to be issued under the Plans. Our opinion is limited solely to matters of Oregon law and we were not asked to nor have we participated in the preparation of the Registration Statement. We have examined the Plans and such other documents and records of the Company and other documents as we have deemed necessary for the purpose of this opinion. In giving this opinion, we are assuming the authenticity of all instruments presented to us as originals, the conformity with originals of all instruments presented to us as copies and the genuineness of all signatures. Based upon and subject to the foregoing, we are of the opinion that upon issuance thereof by the Company in accordance with the terms of the Plans, and the receipt of consideration in accordance with the terms of the Plans, any Shares issued under the Plans will be validly issued, fully paid and nonassessable. TRM Corporation August 31, 2005 Page 2 We hereby consent to the use of this opinion as Exhibit 5.1 to the Registration Statement. In giving such consent, we do not hereby admit that we are acting within the category of persons whose consent is required under Section 7 of the Act or the rules or regulations of the SEC thereunder. Very truly yours, /s/ PERKINS COIE LLP ----------------------------- PERKINS COIE LLP