Name

qbit::Array - Functions to manipulate arrays.

Functions

in_array

Arguments:

  • $elem - scalar;

  • $array - array ref.

Return value: boolean.

arrays_intersection

Arguments:

  • $array_ref1;

  • $array_ref2;

  • ...;

  • $array_refN.

Return value: array ref, intersection of all arrays (unique values).

arrays_difference

Arguments:

  • $array1 - array ref, minuend;

  • $array2 - array ref, subtrahend.

Return value: array ref.

array_uniq

Arguments:

  • @array - each element may be array ref or scalar.

Return value: array ref, unique values from all arrays.

array_n_min

Arguments:

  • @array - array of numbers.

Return value: number, min value (numeric comparasion).

array_min

Arguments:

  • @array - array of strings.

Return value: string, min value (string comparasion).

array_n_max

Arguments:

  • @array - array of numbers.

Return value: number, max value (numeric comparasion).

array_max

Arguments:

  • @array - array of strings.

Return value: string, max value (string comparasion).

array_avg

Arguments:

  • @array - array of numbers.

Return value: number, average value.