in reply to meaning of if ($file !~ /\.tar(\.gz)?$/)
Matches all $file except .tar and .tar.gz endings.
if ( $file !~ # scalar $file tested for not matching
/\.tar # an ending of .tar
(\.gz)? # followed by an optional .gz
$ # at the end of the name
thank you, your answer is clear.
it was the optional part that confused me :(
Results (110 votes). Check out past polls.