I am very new to perl. Pls do help me out guys.

I have a SAMPLE.txt file with values
300000
295000
280000
300000
300000

I need to read this file and over-write or creat a new file as below

300000
295000
280000
300000

i.e. For values series other than 300000, add 300000 before and after the values as above.