I'm new to Perl, so don't know if there is a way to ceil the number of elements inside an array?
I got a task like below:
+Get a list of modules if number of modules is 8 ceiling(6/2)= ceiling(3)=3 -> call the first 3 modules on port 80 and call the last 3 modules on port 8080
+if there is 5 modules deployed -> ceiling(5/2)= ceiling(2.5)=3 -> call the first 3 modules on port 80 and call the last 3 modules on port 8080 (the module “in the middle” will be called twice)
Could you help me with an algorithm or a way to do this in perl?In reply to Ceiling elements of an array! by shadowman13
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |