my $data; open(FILE, "<$filename"); foreach(<FILE>){ if ($_ == "") { //print "it's blank\n"; } elsif ($_ != "") { $data .=chomp($_); } } close FILE;
In reply to Re: read file into 1 line string
by ansh batra
in thread read file into 1 line string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |