• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1378
  • Last Modified:

removing blank lines from an array

Hello, I have read in a file and would like to run through the array and remove any blank lines.  
open(FILE, "Log.txt") or die("XP");
$/="\n";
@DATA = <FILE>;
close(FILE);

0
m_for
Asked:
m_for
1 Solution
 
ozoCommented:
@DATA = grep/\S/,@DATA;
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now