in reply to How do you add .RTF to a file

Do you want to change just one specific file? If that is so just use the methods already explained to you. However, if you want to look through a directory and then change any files that don't have an extension on them you could try something like this:
#!perl use strict; my @file = glob "*"; foreach(@file){ if(/\./){next;} else{ rename $_ , $_ . ".rtf"; } }
If you need to change the files in different directories you could simply recieve a command line argument that would contain the directory you need to evaluate and the do a chdir $ARGV[0], or the equivalent.

Replies are listed 'Best First'.
Re: Re: How do you add .RTF to a file
by Missing Words (Scribe) on Jun 05, 2003 at 14:50 UTC
    Sorry, it's my first time posting here. Forgot to put the code tags around the chdir suggestion it should look like this:
    chdir "$ARGV[0]";