...
This noncompliant code example opens a file whose name is provided by the user. It calls croak() if the open was unsuccessful, as required by EXP30-PL. Do not use deprecated or obsolete functions or modules.
| Code Block | ||||
|---|---|---|---|---|
| ||||
use Carp; my $file = # provided by user open( my $in, "<", $file) or croak "error opening $file"; # ... work with FILE and close it |
...