You need a semicolon after the end of the do block to finish the statement.
I'm curious why you want to do that. The standard open my $fh, '<', $file or die 'Error xxx'; would have the same effect, but could run unattended.
After Compline,
Zaxo
In reply to Re: Problem with do statement
by Zaxo
in thread Problem with do statement
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |