Created
June 19, 2015 12:06
-
-
Save bessarabov/b076383bc5acb622f293 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; | |
sub aa { | |
my $aa = 123 if not 1; | |
if (defined $aa) { | |
print $aa . "\n"; | |
} else { | |
print "undef\n"; | |
} | |
$aa = rand(); | |
} | |
foreach (1..5) { | |
aa(); | |
} | |
__END__ | |
The output is something like: | |
undef | |
0.6073304606407 | |
0.922599598623009 | |
0.141934602326852 | |
0.169187877417194 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment