Skip to content

Instantly share code, notes, and snippets.

@atulsingh0
Created April 24, 2013 13:22
Show Gist options
  • Save atulsingh0/5452079 to your computer and use it in GitHub Desktop.
Save atulsingh0/5452079 to your computer and use it in GitHub Desktop.
Perl code for Array referencing
#!/usr/bin/perl
@a = (1, 2, 3); # original array
$aRef = \@a; # reference to the array
print "a: @a\n"; # prints "a: 1 2 3"
print "a: @$aRef\n"; # exactly the same
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment