use IO::File; my $fh = IO::File->new("<$filename") or die "Unable to open $filename: $!"; my $string = join(", ", map({ chomp; $_ } $fh->getlines) ); $fh->close;
In reply to Re: How do i read each line of the file into string?
by knobunc
in thread How do i read each line of the file into string?
by anjaana78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |