A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
4
Task/Inverted-syntax/Perl/inverted-syntax-1.pl
Normal file
4
Task/Inverted-syntax/Perl/inverted-syntax-1.pl
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
if ($guess == 6) { print "Wow! Lucky Guess!"; }; # Traditional syntax
|
||||
print 'Wow! Lucky Guess!' if $guess == 6; # Inverted syntax (note missing braces and parens)
|
||||
unless ($guess == 6) { print "Sorry, your guess was wrong!"; } # Traditional syntax
|
||||
print 'Huh! You Guessed Wrong!' unless $guess == 6; # Inverted syntax
|
||||
Loading…
Add table
Add a link
Reference in a new issue