@array = qw/1 2 3 4/; $_ = ( eval join '+', @_ ) / @_; print $_,$/ # gives 2.5