cgaff has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl open(LOG,"+</etc/spamdomains.txt") || die "Can't open spam file\n"; while ($nclean = <LOG>){ $nclean =~ s/^\s*(.?)\s*$/$1/; chomp $nclean; print "$nclean\n"; } close(LOG);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Cannot seem to remove empty/blank lines
by zodiac (Beadle) on Jun 02, 2000 at 13:21 UTC | |
by takshaka (Friar) on Jun 02, 2000 at 22:06 UTC | |
RE: Cannot seem to remove empty/blank lines
by t0mas (Priest) on Jun 02, 2000 at 12:15 UTC | |
Re: Cannot seem to remove empty/blank lines
by Aighearach (Initiate) on Jun 02, 2000 at 11:20 UTC | |
by cgaff (Initiate) on Jun 03, 2000 at 11:06 UTC | |
Re: Cannot seem to remove empty/blank lines
by mikkoh (Beadle) on Jun 02, 2000 at 11:21 UTC | |
RE: Cannot seem to remove empty/blank lines
by marcos (Scribe) on Jun 02, 2000 at 13:39 UTC | |
by Anonymous Monk on Jan 26, 2005 at 16:41 UTC |