Which, incidentally can be done in one step:
chomp(my @all_data = <DATA>); [download]
In reply to Re^2: How to remove all new line ? by blazar in thread How to remove all new line ? by bh_perl