My recommendations: if $line.contains(all("wine-patched/archive/staging-/", ".tar.gz")){ }
# if the path has to be at the beginning and the extension at the end, # which your original regex doesn't require, but it's probably right if $line.starts-with("wine-patched/archive/staging-/") && $line.ends-with(".tar.gz") { } if $line ~~ m{ "wine-patched/archive/staging-/" .* ".tar.gz" } { } What do you think? - Timo