Skip to content

Instantly share code, notes, and snippets.

@tomcha
Created August 11, 2020 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomcha/b1d9822224acbf3ea255f0fad2d2c53f to your computer and use it in GitHub Desktop.
Save tomcha/b1d9822224acbf3ea255f0fad2d2c53f to your computer and use it in GitHub Desktop.
scalar reference
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
my $a = 1;
my $b = $a;
$b *= 10;
say $a;
my $c = \$a;
$$c *= 10;
say $a;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment