Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
perl -lne 'print unless /^\s*$/'
perl -ni.bak -e 'print unless /^\s*$/' filename
#!/usr/bin/perl
@mylist = ( 'one',
'', # ignore
'three',
'', # ignore
'five' );
foreach $value (@mylist) {
print "$value\n" unless $value =~ m/^$/;
}
[b]#!/usr/bin/perl[/b]
open (INFILE, "< bigFile9700lines.txt");
while (<INFILE>) {
print "$_\n" unless /^$/;
}
close INFILE;
open FILENAME, "file1";
while(<FILENAME>)
{
next if /^\s*$/;
chomp;
push @myarray, $_;
}
close FILENAME;
open FILENAME_TWO, ">results";
foreach $item (@myarray)
{
print FILENAME_TWO "$item\n";
}
close FILENAME_TWO;
open (INFILE, "<tmp1");
open RESULTS, ">results";
while (<INFILE>) {
chomp;
print RESULTS "$_\n" unless /^\s*$/;
}
close INFILE;
close ERASE_BLANK;
use strict;
use warnings;
my $nondisp = join("", (chr(0)..chr(31)));
while (<DATA>) {
chomp;
print "$_\n" unless /^[$nondisp]*$/o;
}