Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
langperl
use autodie;

my $source;
open(SOURCE, "<", $source);
@lines = (<SOURCE>);
close(SOURCE);

EXP32-EX3: Functions that send data to standard output or standard error need not have their return values checked. This includes print and printf, but only if their filehandle argument is not supplied, or is explicitly set to *STDOUT or *STDERR. If they send their output to any other filehandle, their return value must be checked.

Risk Assessment

Failure to handle error codes or other values returned by functions can lead to incorrect program flow and violations of data integrity.

...