#! /usr/bin/perl use v5.16.3; use strict; use warnings; use diagnostics; ######################################################### ## # ## 9/4/20 # ## Program takes white space separated values and # ## produces a report for each line # ## # ## # ######################################################### chomp( my $header = <> ); my @field_names = split /\s+/, $header; while( <>) { chomp; my @fields = split /\s+/; foreach my $index (0 .. $#fields ) { print "$field_names[$index]: $fields[$index]\n" } } Use of uninitialized value within @field_names in concatenation (.) or string at ./Exercise_9_6.pl line 26, <> line 3 (#1)