in reply to Re^3: Data validation and blank spaces in tab formatted csv file
in thread Data validation and blank spaces in tab formatted csv file

Thanks, Does Perl distinguish between white space and null. For example, this field contains no data but white space:
chomp($pending_move_out_dt); $pending_move_out_dt =~ s/\s//g;
I want to remove all white spaces for that field so that field appear as null (undefined) if there is no data. Any way to do this.

Replies are listed 'Best First'.
Re^5: Data validation and blank spaces in tab formatted csv file
by Anonymous Monk on Oct 24, 2013 at 17:31 UTC
    $variable = undef unless $variable =~ /\S/;