I am trying to create a regexp to match in a given directory all filenames without any extenstion, but I am having trouble with it-
My regular exp prints the files with the . extension under my directory
But if I try something like
I get all the file names even those with the .extensions. Pls let me know what I am doing wrong here.
Thanks.
My regular exp prints the files with the . extension under my directory
Code:
grep {/.*\..*$/ and $_ ne '.' and $_ ne '..' }
Code:
grep {$_ ne '/.*\..*$/' and $_ ne '.' and $_ ne '..' }
Thanks.