Hi,

I've got trouble with matching a character only once. The function

my $filename = $File::Find::name;
if ($filename =~ /(\~){1}$/) {  
    # do something
}

should be used for deleting temporary files ending with a ~. Because
of some special files ending with ~~ I would like to keep the above
pattern has to match _exactly one_ ~ at the end of a filename.

In my eyes, {1} seems to be the right way, but it won't work. I've
already tried moving brackets or the $-sign around, but with no
positive result. Any hints?

Regards,
Stefan


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to