Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`END{ }` could be replace by eskimo operator `}{`:

  perl -F, -lane '$t += $F[1]; }{ print $t'
http://www.perlfoundation.org/perl5/index.cgi?eskimo_operato...

`..` is called flip-flop in the context describe in the post.

Goatse operator `=()=`:

  my $count_vowels =()= /[aeiou]/g;
Here's another usage for `\K`:

  echo '/a/b/c/def/gh' | perl -lnE'$d{$`}++while/\w\K\b/g }{$,=" ";say keys%d'
Output:

  /a/b/c/def/gh /a/b/c /a/b/c/def /a/b /a
http://stackoverflow.com/questions/2892126/file-fix-it-codeg...

Other features: http://stackoverflow.com/questions/161872/hidden-features-of...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: