- 论坛徽章:
- 145
|
回复 1# owen_1100
your code have some issue
C:\bat>input.pl
Name "main::resulet" used only once: possible typo at C:\bat\input.pl line 7.
Name "main::result" used only once: possible typo at C:\bat\input.pl line 6.
Enter first number:123
Enter second number:456
Use of uninitialized value $resulet in concatenation (.) or string at C:\bat\inp
ut.pl line 7, <STDIN> line 2.
The result is .
### modify issue and get result on Windows XP, as below:
### print"The result is $result.\n";
C:\bat>input.pl
Enter first number:123
Enter second number:456
The result is 56088.
C:\bat>perl -v
This is perl 5, version 14, subversion 3 (v5.14.3) built for MSWin32-x86-multi-t
hread
|
|