Preferences

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.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal