in reply to Re: Subroutine to delete one file and copy one file to another
in thread Subroutine to delete one file and copy one file to another

Hi Stieve, May be i am stuck up in here: What i want is stated below: 1) If i dont have the temp file, it should create a new file and copy the contents of serverlist(already existing) into the newly created temp file. 2) If the file is already existing, it should delete the temp file and again copy the contents of that file into the temp file. All i want this to be done in the subroutine.
  • Comment on Re^2: Subroutine to delete one file and copy one file to another

Replies are listed 'Best First'.
Re^3: Subroutine to delete one file and copy one file to another
by u65 (Chaplain) on Jul 21, 2015 at 11:01 UTC

    Without trying the whole of your main program, it looks like the other monks have the delete subroutine correct--so the main program I think is the problem. Speaking for myself, I would start by cleaning up that ugly code and rename some varables variables to help make it clear what I am tring trying to do. Some good comments would help, too.