in this case the $beer is continual, but i fogot about another variable: my purse. so now i have more realistic situation :print "How much beer do you whant? "; my $beer=<STDIN>;chomp($beer); $question = (2 * $beer) || (not 2 * $beer); print "2 beer || ! 2 beer this is a $question\n";
P.S. Sorry for my bad englishmy $mymoney=10; $beercost=1; while($mymoney>0){ print "How much beer do you whant? "; my $beer=<STDIN>;chomp($beer); $question = (2 * $beer) || (not 2 * $beer); print "2 beer || ! 2 beer this is a $question\n"; $mymoney-=$beercost*$question; }
In reply to Shakespeare by UrsaloFF
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |