Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/85063/virtual/www/domains/waldauf.org/lib/plugins/color/syntax.php:1) in /data/web/virtuals/85063/virtual/www/domains/waldauf.org/inc/actions.php on line 180
programming:perl:subroutine - WiKi

Subroutine

Read input parameters

You can use input array - @_ or shift operator.

Shift operator

order of the input parameters must be strictly adhered to:

sub ss {
  $a = shift;
  $b = shift;
  return $a + $b;
}
 
print &ss(4,5);
Navigation
Print/export
Toolbox