Hi, My code as below, How to remove the white space 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"
Output:
D:\learning\perl>test.pl
Hello.Member Information
Hello. id = 0 # I want to remove the white space between Hello. and id
Hello. name = "tom" # same as above
Hello. age = "20" # same
D:\learning\perl>