#!/usr/bin/perl

sub fac {
  $_[0]>1?$_[0]*fac($_[0]-1):1;
}

//enter here the value (5) that you want to calculate

print fac(5);
