#!/usr/bin/env perl use strict; use warnings; #open the file and read all lines open my $file, '<', '/home/36/lallip/public/ica1.txt' or die "Cannot open file: $!\n"; chomp (my @numbers = <$file>); #chomp to remove newlines #use @numbers in scalar context to get size. #set $" variable to control interpolated array element separator $" = ', '; print "There are " . @numbers . " values in the file: @numbers\n"; #divide the first number by 100 to convert cents to dollars: my $dollars = $numbers[0] / 100; print "The first dollar amount is: \$$dollars\n";