[NMLUG] Perl Question.

Robbins, Wesley L nmlug@swcp.com
Tue, 13 Nov 2001 10:08:33 -0700

I left my brain home.

I need to write a sub in perl to
rename/move a file to a new name. I'm 
drawing a blank on the move command 
for files.  Any one out there willing 
to give me a clue. I looked online a bit
and what I found were monsters.  I've 
written looking for what revisions to 
name it. 

Thanks in advance,


Sub RevisionUP(CurrFileName,NewFileName) {
 #where the magic belongs


The effect
   DataParser.c  This will become the new file
   DataParser.1.c The old is move to this name.
   DataParser.2.c If 1 exists the last current is named .+1.c

To UNSUBSCRIBE send a message to nmlug-request@swcp.com
with only the word unsubscribe in the body.  More
information can be found at www.nmlug.org/info.html