$file =<stdin>; chomp($file); if (m/(\d+)\|\Q$file\E$/x) { do something} but if match (/^aaa\[/) {die}; [download]
In reply to unless/if by Anonymous Monk