Create file for group of data:

Hi folks,
I have the following data.Any help is greatly appreciated.

           order         File_name 
  7222245   7222245.pdf       

7222245 7222245a.pdf
7222245 7222245b.pdf
7222245 7222245c.pdf
7222245 7222245d.pdf
7222250 7222250.pdf
7222250 7222250a.pdf
7222250 7222250b.pdf

  I have to create files in the below manner using above records for every unique order i have to group the corresponding file names and put them in a seperate file.

For example output for above set is :
7222245.txt
>>7222245.pdf
>>7222245a.pdf
>>7222245b.pdf
>>7222245c.pdf
>>7222245d.pdf
------------------------------------
7222250.txt
>>7222250.pdf
>>7222250a.pdf
>>7222250b.pdf
-------------------------------------

Note: Name of the file is Order.txt and the content is grouped file names.

perl -lane 'open O, ">> $F[0].txt"; print O $F[1]; close O' Order.txt