<Page>

                                                                    EXHIBIT 10.4


--------------------------------------------------------------------------------
                                 FIRST AMENDMENT
                                       TO
                  REVOLVING CREDIT AGREEMENT AND LIMITED WAIVER
--------------------------------------------------------------------------------

         First Amendment and Limited Waiver dated as of December 20, 2001 to
Revolving Credit Agreement (the "First Amendment"), by and among PEREGRINE
SYSTEMS, INC., a Delaware corporation (the "Borrower"), FLEET NATIONAL BANK and
the other lending institutions listed on SCHEDULE 1 to the Credit Agreement (as
hereinafter defined) (the "Lenders"), amending certain provisions of the
Revolving Credit Agreement dated as of October 29, 2001 (as amended and in
effect from time to time, the "Credit Agreement") by and among the Borrower, the
Lenders and FLEET NATIONAL BANK in its capacity as administrative agent for the
Lenders (the "Administrative Agent") and waiving certain other provisions of the
Credit Agreement as more fully set forth herein. Terms not otherwise defined
herein which are defined in the Credit Agreement shall have the same respective
meanings herein as therein.

         WHEREAS, the Borrower and the Lenders have agreed to modify certain
terms and conditions of the Credit Agreement as specifically set forth in this
First Amendment and waive certain other terms and conditions of the Credit
Agreement as specifically set forth in this First Amendment;

         NOW, THEREFORE, in consideration of the premises and the mutual
agreements contained herein and for other good and valuable consideration, the
receipt and sufficiency of which are hereby acknowledged, the parties hereto
hereby agree as follows:

         Section 1. AMENDMENT TO Section 1.1 OF THE CREDIT AGREEMENT. Section
1.1 of the Credit Agreement is hereby amended as follows:

         (a) the definition of "Material Domestic Subsidiary" is hereby amended
by deleting such definition in its entirety and restating it as follows:

                  MATERIAL DOMESTIC SUBSIDIARY. Each Domestic Subsidiary (a)
         whose assets exceed $10,000,000 in aggregate book value, or (b) has any
         right, title or interest in or to any patents, trademarks, copyrights
         or other similar intellectual property which has an aggregate value for
         all such intellectual property in excess of $2,000,000 or (c) which
         directly or indirectly owns the Capital Stock of any other Material
         Subsidiary.

         (b) the definition of "Material Foreign Subsidiary" is hereby amended
by deleting such definition in its entirety and restating it as follows:

                  MATERIAL FOREIGN SUBSIDIARY. Each Foreign Subsidiary (a) whose
         assets exceed $10,000,000 in aggregate book value, or (b) has any
         right, title or interest in or to any patents, trademarks, copyrights
         or other similar intellectual property which has an aggregate value for
         all such intellectual property in excess of


<Page>
                                      -2-



         $2,000,000 or (c) which directly or indirectly owns the Capital Stock
         of any other Material Subsidiary.

         Section 2. AMENDMENT TO Section 4 OF THE CREDIT AGREEMENT. Section
4.1.1 of the Credit Agreement is hereby amended by deleting the amount
"$10,000,000" which appears in Section 4.1.1 and substituting in place thereof
the amount "$25,000,000".

         Section 3. AMENDMENT TO Section 8 OF THE CREDIT AGREEMENT. Section 8 of
the Credit Agreement is hereby amended as follows:

         (a) Section 8.16 of the Credit Agreement is hereby amended by inserting
immediately at the end of the text of Section 8.16 the following sentence:
"Notwithstanding anything to the contrary contained in this Section 8.16, to the
extent any Material Domestic Subsidiary is created or otherwise acquired after
the Closing Date pursuant to, or in connection with, a Permitted Acquisition,
such Material Domestic Subsidiary shall not be required to become a Guarantor
hereunder and execute and deliver such Guaranty and Security Documents and
otherwise comply with the provisions of this Section 8.16 until a date which is
forty five (45) days after the date on which such Person becomes a Material
Domestic Subsidiary, PROVIDED, for purposes of Section Section 9.1 and 9.3 of
this Credit Agreement, if such Person does not comply with the provisions of
Section 8.16 within ten (10) days of such Person being formed or acquired, such
Person shall not be considered a Guarantor hereunder until the date which is
ninety (90) days after such Person otherwise complies with the provisions of
this Section 8.16.

         (b) Section 8.18 of the Credit Agreement is hereby amended by deleting
the words "by not later than sixty (60) days after the Closing Date" which
appear in the last sentence thereof and substituting in place thereof the words
"by not later than one hundred twenty (120) days after the Closing Date".

         Section 4. LIMITED WAIVER. The Borrower has informed the Administrative
Agent and the Banks that on November 30, 2001 the Borrower and certain other
parties thereto consummated the acquisition of certain assets of Xtra On-Line
Corporation pursuant to that certain Asset Purchase Agreement dated as of
November 30, 2001, a copy of which has been delivered to the Administrative
Agent (the "Ballgame Acquisition") and, in connection therewith, two (2)
Domestic Material Subsidiaries were formed and/or otherwise created, but the
Borrower failed to comply with the provisions of Section 8.16 of the Credit
Agreement as well as certain of the requirements of Section 9.5.1. of the Credit
Agreement in connection with the Ballgame Acquisition until December 20, 2001.
The Borrower's failure to so comply with such covenants for the period of
November 30, 2001 through December 20, 2001 constituted an Event of Default for
such period (which Event of Default has been subsequently cured by the
Borrower's compliance with each of Section 8.16 and Section 9.5.1 on December
20, 2001). The Borrower has requested that the Administrative Agent waive, to
the limited extent necessary to permit the noncompliance for the period of
November 30, 2001 through December 20, 2001, the requirements of Section 8.16
and Section 9.5.1 as it relates to the Ballgame Acquisition. Subject always to
compliance by the Borrower with the terms and conditions of the Credit Agreement
and the other Loan Documents and the terms and conditions contained herein, from
and after the effective date of this First Amendment, the Lenders hereby waive
the provisions of Section 8.16 and Section 9.5.1. of the Credit


<Page>
                                      -3-



Agreement solely to the extent necessary to permit the above-referenced
noncompliance, and only with respect to the period of November 30, 2001 through
December 20, 2001.:

         Section 5. CONDITIONS TO EFFECTIVENESection This First Amendment shall
not become effective until the Administrative Agent receives a counterpart of
this First Amendment, executed by the Borrower, each Guarantor and the Required
Lenders.

         Section 6. REPRESENTATIONS AND WARRANTIES. The Borrower hereby repeats,
on and as of the date hereof, each of the representations and warranties made by
it in Section 7 of the Credit Agreement, PROVIDED, that all references therein
to the Credit Agreement shall refer to such Credit Agreement as amended hereby.
In addition, the Borrower hereby represents and warrants that the execution and
delivery by the Borrower of this First Amendment and the performance by the
Borrower of all of its agreements and obligations under the Credit Agreement as
amended hereby are within the corporate authority of the Borrower and has been
duly authorized by all necessary corporate action on the part of the Borrower.

         Section 7. RATIFICATION, ETC. Except as expressly amended hereby, the
Credit Agreement and all documents, instruments and agreements related thereto,
including, but not limited to the Security Documents, are hereby ratified and
confirmed in all respects and shall continue in full force and effect. The
Credit Agreement and this First Amendment shall be read and construed as a
single agreement. All references in the Credit Agreement or any related
agreement or instrument to the Credit Agreement shall hereafter refer to the
Credit Agreement as amended hereby.

         Section 8. NO WAIVER. Nothing contained herein shall constitute a
waiver of, impair or otherwise affect any Obligations, any other obligation of
the Borrower, any Guarantor or any rights of the Administrative Agent or the
Lenders consequent thereon.

         Section 9. COUNTERPARTS. This First Amendment may be executed in one or
more counterparts, each of which shall be deemed an original but which together
shall constitute one and the same instrument.

         Section 10. GOVERNING LAW. THIS FIRST AMENDMENT SHALL BE GOVERNED BY,
AND CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE COMMONWEALTH OF MASSACHUSETTS
(WITHOUT REFERENCE TO CONFLICT OF LAWS).


<Page>
                                      -4-






         IN WITNESS WHEREOF, the parties hereto have executed this First
Amendment as a document under seal as of the date first above written.


                                       PEREGRINE SYSTEMS, INC.



                                       By: /s/ Matthew. C. Gless
                                           ------------------------------------
                                             Name:  Matthew C. Gless
                                             Title:  Chief Financial Officer

                                       FLEET NATIONAL BANK



                                       By: /s/ William S. Rowe
                                           ------------------------------------
                                             William S. Rowe, Vice President

                                       UNION BANK OF CALIFORNIA, N.A.



                                       By: /s/ James Heim
                                           ------------------------------------
                                             Name:  James Heim
                                             Title:  Vice President

                                       BANK OF AMERICA, N.A.



                                       By: /s/ Kevin M. Mcmahon
                                           ------------------------------------
                                              Name:  Kevin M. McMahon
                                              Title:  Managing Director

                                       COMERICA BANK



                                       By: /s/ Craig A. Nelson
                                           ------------------------------------
                                             Name: Craig A. Nelson
                                             Title:  Vice President

                                       KEYBANK NATIONAL ASSOCIATION



                                       By: /s/ Thomas A. Crandell
                                           ------------------------------------
                                             Name:  Thomas A. Crandell
                                             Title:  Senior Vice President

<Page>
                                      -5-




                                       THE BANK OF NOVA SCOTIA



                                       By: /s/ Ed Kofman
                                           ------------------------------------
                                             Name:  Ed Kofman
                                             Title:  Director

                                       BNP PARIBAS



                                        By: /s/ Jean Plassard
                                            -----------------------------------
                                              Name:  Jean Plassard
                                              Title:  Managing Director



                                        By: /s/ James F. McCann
                                            -----------------------------------
                                              Name:  James F. McCann
                                              Title:  Director



<Page>
                                      -6-




                            RATIFICATION OF GUARANTY

         Each of the undersigned guarantors hereby acknowledges and consents to
the foregoing First Amendment as of December 20, 2001, and agrees that the
applicable Guaranty from such Guarantor dated as of October 29, 2001 and
December 20, 2001, as applicable, in favor of the Administrative Agent for the
benefit of the Administrative Agent and the Lenders and all other Loan Documents
to which each of the Guarantors are a party remain in full force and effect, and
each of the Guarantors confirms and ratifies all of its obligations thereunder.

                                       PEREGRINE REMEDY, INC.



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary

                                       TELCO RESEARCH CORPORATION



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary

                                       HARBINGER HOLDINGS, INC.



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary

                                       PEREGRINE E-MARKETS, INC.



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary

                                       PEREGRINE DIAMOND, INC.



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary



<Page>
                                      -7-






                                       PEREGRINE EXTRICITY, INC.



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary

                                       PEREGRINE CONNECTIVITY, INC.



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary

                                       PEREGRINE ONTARIO BLUE JAYS, INC.



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary

                                       PEREGRINE CALIFORNIA PADRES, INC.



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary

                                       BALLGAME ACQUISITION CORPORATION



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary

                                       OCTOBER ACQUISITION CORPORATION



                                       By: /s/ Eric P. Deller
                                           ------------------------------------
                                             Name:  Eric P. Deller
                                             Title:  Secretary