Created
October 25, 2011 17:44
-
-
Save koorchik/1313623 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
# строка, которая в числовом контексте соответствуют | |
# нулю, а в логическом - истине | |
"0 but true" | |
perl -wE 'say "0 but true"+5' | |
#Получим 5 без никаких предупреждений | |
# Но стоит изменить хоть один символ в заветной строке | |
perl -wE 'say "0 but true!"+5' | |
'Argument "0 but true!" isn't numeric in addition (+) at -e line 1. | |
# И мы сразу получим предупреждение |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment