<?xml version="1.0" encoding="windows-1252"?>
<node id="1008301" title="Removing blank/empty lines" created="2012-12-11 08:34:06" updated="2012-12-11 08:34:06">
<type id="115">
perlquestion</type>
<author id="982430">
perlnoobster</author>
<data>
<field name="doctext">
Hi Perl monks,

&lt;p&gt; I was wondering if someone could help me, I have some coding that generates a text file, however there are blank rows that are being generated too, I just want to omit them and tried chomp but it didn't work so I tried using push @Results,$_ unless ($_ eq "\n"); and that didn't work, please can someone help me? &lt;/p&gt; 


&lt;code&gt;
open (IN, "$output") or die "I couldn't get at $output";

my @Top_URLs = &lt;IN&gt;;

foreach my $URL (@Top_URLs)
{
my $final_page = get "$URL";#grab the link urls get $url


my @Results =();
push @Results,$_ unless ($_ eq "\n");


for my $Results (@Results)

{


if ($Results =~ s/.*\///) {
    print OUT2	"$Results\n";       
	
}
}
}
&lt;/code&gt;</field>
</data>
</node>
