Commit 510da9d5 authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

bugfix: $? may be "contaminated" from another call. The best way is to check...

bugfix: $? may be "contaminated" from another call. The best way is to check the trueness of the return value
parent a5d2bf2f
......@@ -241,9 +241,8 @@ sub _get_rows_from_open {
push @rows, [ defined($delimiter) ? split(/$delimiter/, $line) : $line ];
}
close FILE;
my $exit = $? >> 8;
die "Could not read from '$input_file_or_pipe'. Received the error $exit\n" if $exit;
close FILE
or die "Could not read from '$input_file_or_pipe'. Received the error ".($! || $?);
my $column_names_from_data = $parse_header ? shift @rows : 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment