- or download this
#!/usr/bin/perl
use warnings;
print"\n Enter the Filename (x.txt) with Data in List context: ";
...
$mean=$sum/$N_elements; # Line 21
print"\n Mean of the list= $mean\n";
exit;
- or download this
Enter the Filename (x.txt) with Data in List context: x.txt
List= (10,12,14,16,18);
...
line 21, <FILE> line 1.
Mean of the list= 0
- or download this
Enter the Filename (x.txt) with Data in List context: x.txt
List= (10,12,14,16,18);
...
Number of Elements= 5
Mean of the list= 14