How to Insert a sub string to each line in perl
- by Nano HE
Hi,
My code as below, How to remove the blank after add hello. to each lines.
#!C:\Perl\bin\perl.exe
use strict;
use warnings;
use Data::Dumper;
my $fh = \*DATA;
#my($line) = $_;
while(my $line = <$fh>)
{
print "Hello.".$line;
chomp($line);
}
__DATA__
Member Information
id = 0
name = "tom"
age = "20"
…