in reply to Ceiling elements of an array!

The POSIX module (part of the standard perl distribution) implements ceil(), floor(), and a number of other mathematical and trigonometric functions.

Example,
use POSIX; $ceil = ceil(3.5);# 4

All is well. I learn by answering your questions...

Replies are listed 'Best First'.
Re^2: Ceiling elements of an array!
by Happy-the-monk (Canon) on May 06, 2015 at 09:47 UTC

    use POSIX;

    POSIX is big and pollutes your namespace with its very many function names.
    This may bite you when you make it a habit to use it just like that.

    Better import exactly what you need: it may pay off to use POSIX qw(ceil floor); # import ceil() and floor()

    Cheers, Sören

    Créateur des bugs mobiles - let loose once, run everywhere.
    (hooked on the Perl Programming language)

Re^2: Ceiling elements of an array!
by shadowman13 (Initiate) on May 06, 2015 at 10:51 UTC

    Hi Vinoth.ree,

    Thank for quick answer!

    But how can I apply that method for elements in array?

      how can I apply that method for elements in an array?

      Have a look at pme's answer... or go for loop constructs: foreach for small arrays or while for larger data.

      Cheers, Sören

      Créateur des bugs mobiles - let loose once, run everywhere.
      (hooked on the Perl Programming language)