in reply to unless/if
or did you mean something different?chomp($file=<stdin>); die "horribly\n" if /^aaa\[/; do something if /(\d+)\|\Q$file\E$/;
Incidentally which is the $_ against which you're testing? I have a vague suspect you want to match against $file instead (even though the fact that it is interpolated in one of the regexen would tend to suggest the contrary). And if so, then even in pseudocode you're doing something utterly wrong...
|
|---|