I tried doing some thing like this.
## at test point
if ($name eq $tar)
But apparently it doesn't use regular expression as
Is there any other way to test if the file is tar?