in reply to foreach loop on one line

unfortunately post-fix statements cant be nested w/o do-blocks.

I'd suggest:

print "$_ could not be restored!\n" for grep { not exists $found{$_} } @files;
or even
print map {"$_ could not be restored!\n" } grep { not exists $found{$_} } @files;