in reply to unlink $file OR... OR..
Perhaps a do block would suffice?
You could accomplish this using a series of and (or &&, see perlop) and parentheses, but IMO the do block is more clear.unlink $file or do { print "Error!"; push( @list, $file ); };
|
|---|