#!/usr/bin/perl -w use strict; use warnings; use diagnostics; open(REPORT, $ARGV[0]) || die("Error - Can't open $ARGV[0]: $!\n"); our $initial_datetime; our $backlog; while () { last if /,-/; chomp; ($initial_datetime, $backlog) = split(","); $backlog =~ s/^\s+//; # just for testing purposes print $initial_datetime; print "\n"; print $backlog; print "\n"; } #### 11/05/09 12, 3424 11/05/09 13, 3 11/05/09 14, 1 11/05/09 15, 30 11/05/09 16, 73 11/05/09 17, 1 ,-------------------- sum , 3532 #### Use of uninitialized value in substitution (s///) at qad.pl line 18, line 1 (#1) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. To help...(removed)... Use of uninitialized value in print at qad.pl line 20, line 1 (#1) Use of uninitialized value in print at qad.pl line 22, line 1 (#1)