split(/.{80}/, $data) #### grep(defined, split(/(.{80})/, $data)) #### my @lines = grep(length, split(/(.{80})/, $data));