while () { chomp; # sample line is like # Tz25 ATHENA01 0:20:00 my $user; my $node; my $hour; my $min; my $sec; my $line = $_; $line =~ tr/:/ /; # tried this also $line =~ s/:/ /g; push my @users, $line; # here it's Tz25 ATHENA01 0 20 00 ($user, $node, $hour, $min, $sec) = @users = split(/ /); # now if I do an lt here it doesn't complain? # but that would be based off 0:20:00 if ($hour < 24){ print $user," ", $node," ", $hour; print CLU $user," ", $node," ", $hour; }