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

What you are doing here is matching only ~ as the entire filename.
You should try
$filename =~ /^[~]/
This looks for a character (~ in this case) at the beginning of the
string. Since you're not interested in what's after, we just don't bother
with checking forthe rest of it.

-Akshay

>
> 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]
>


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

Reply via email to