Jay Savage wrote: > On 7/10/06, Mumia W. <[EMAIL PROTECTED]> wrote: >> Randal L. Schwartz wrote: >> >>>>>> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: >> >
Just to (hopefully) put an end to this thread :-) the OP said: Nishi Bhonsle wrote: > > Can you please tell me how to modify the above program to ignore the "." > and "..", so that they donot get printed in C:/filelist.txt ? And I used the match /^\.\.?$/ which is the traditional idiom and Rob used the match /[^.]/ both of which do not do exactly what the OP requested however Randal's example matched this spec. exactly. (My example could more correctly be written as /\A\.\.?\z/.) This all assumes of course that the file system containing these file names has the '.' directory which points to the current directory and the '..' directory which points to the parent directory. (Some file systems do not have these so '.' and '..' could just be ordinary files.) John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>