Versions Compared

Key

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

Perl functions can be invoked in two contexts: list and scalar. These contexts indicate what is to be done with the return value. Functions can return different values in list context than in scalar context. For instance, the grep() function takes a list and a block or expression and filters out elements of the list for which the block or expression evaluates to false. The grep() function returns the filtered list when called in list context, but when called in scalar context, it merely returns the size of this list. That is, it returns the numer number of elements for which the block or expression evaluates to true.

...

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

EXP33-PL

mediumMedium

unlikelyUnlikely

lowLow

P2P6

L3L2

Automated Detection

Tool

Diagnostic

Perl::Critic

Subroutines::ProhibitReturnSort

Bibliography

 

...

Image Modified Image Modified  Image Modified