#!usr/local/bin/perl
# https://www.glassdoor.com/Interview/Miles-Technologies-New-Jersey-Interview-Questions-E427205.htm
# If you were given a comma separated list of data, how would you go about analyzing the data?  

use strict;
use warnings;

open FD, '<', 'data' or die $!;
my $data=<FD>;
chomp $data;
close FD;

my @vals=split ',', $data;
my %vhash=();
my $ind=0;
foreach my $val (@vals) {
  $ind++;
	printf "val: %5d \t", $val;
  $vhash{$ind}=$val; 
  printf "hash{%5d}: %s\n", $ind, $vhash{$ind};
}


