zlacker

[parent] [thread] 0 comments
1. archi4+(OP)[view] [source] 2025-11-20 15:47:14
Hm, if I understand this correctly

  - awkward function argument syntax: my ($x, $y) = @_;
then you might be interested to learn about feature 'signatures':

  use feature 'signatures';
  use strict;
  use warnings;
  
  sub foobar ($foo, $bar = undef) {
     # do something smart
  }
  
  # call it:
  foobar(1);
  foobar(1, 2);
Not sure when it was added, but when I write the usual glue code, I love to use it these days.
[go to top]