in reply to RegEx is required for the below pattern
Like this?
my $file = '/tom/john/jones/fredy/sam-joe/Install-xyz-opq.zip'; $file =~ s|^.*/||; # delete up to and including the rightmost '/' if ($file eq "Install-xyz-opq.zip") { ... [download]