The Perl Advent Calendar needs more articles for 2022. Submit your idea today!


RePrec::Tools - Collection of tools for RePrec(3) libraries


  use RePrec::Tools qw(gnuplot system choose fac);


Functions shared between the various RePrec(3) libraries.


gnuplot($rpdata, $average, $gnuplot)

plot curve with gnuplot(1). $rpdata and $average are the data for the curves to be displayed. $gnuplot is a hash reference where configuration options for gnuplot can be set. The default settings are:

  style  => 'lines'
  title  => 'Recall-Precision'
  ylabel => 'Precision'
  xlabel => 'Recall'
  output => '/tmp/RP'
  binary => 'gnuplot'

The output parameter gives a prefix name used for files created during the plotting. By default the following files are created: /tmp/RP.dat (holds the data for the curves), /tmp/RP.average.dat (holds the average precision), and /tmp/ (holds the gnuplot config file).

The binary parameter gives the name of the gnuplot binary. The terminal parameter selects the gnuplot terminal to use (for example: postscript eps enhanced 22).

write_rpdata($file, $rpdata, [$average]);

Write the recall precision data to file(s).


forks of a process and executes therein the command given by @args (list of executable's name and arguments). Displays some proper return status interpretations.

$bc = choose($n, $k)

computes the binomial coefficient for $n over $k.

$fac = fac($n)

computes faculty of $n.


Yes. Please let me know!


RePrec::Average(3), RePrec(3), perl(1).


Norbert Gövert <>

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 62:

=cut found outside a pod block. Skipping to next block.

Around line 267:

Non-ASCII character seen before =encoding in 'Gövert'. Assuming CP1252