use strict; use warnings; # First generate a sample data file open (outFile, '>', "delme.txt") or die "Can't create test file: $!"; print outFile <) { chomp; print; #Print the original line my ($size) = /(\d+)$/; print " <--- too small" if $size < 4_000_000_000; print "\n"; }