Skip to content

Instantly share code, notes, and snippets.

@mirekfranc
Created June 28, 2015 21:10
Show Gist options
  • Save mirekfranc/2320af24f6e09edf649b to your computer and use it in GitHub Desktop.
Save mirekfranc/2320af24f6e09edf649b to your computer and use it in GitHub Desktop.
defined or operator in perl 5.10
use 5.10.0;
$a = 0;
$a ||= $0;
say $a;
$b = 0;
$b //= $0;
say $b;
$c //= $0;
say $c;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment