sub dollars_to_cents { map { int ($_*100+0.5) } @_; } $dollars= $cents=dollars_to_cents($dollars)