Created
May 21, 2017 20:21
-
-
Save andrewsolomon/846b83370c3c315858a069cce07313f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
sub modify_string_exclaim { | |
my ($r_str) = @_; | |
$$r_str .= '!'; | |
return 1; | |
} | |
my $sc = 'Hello'; | |
say $sc; # Output: Hello | |
modify_string_exclaim(\$sc); | |
say $sc; # Output: Hello! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment