hello how are you
wonderful beautiful
great
award great
awesome
perl_file1.pl
open(FILE,"<hello.dat");
@lines=<FILE>;
close(FILE);
foreach(@lines)
{
chop;
print; # it is same as print $_;
print "\n";
}
G:\perl_programs>perl perl_file.pl
hello how are you
wonderful beautiful
greataward great
awesom
G:\perl_programs>
No comments:
Post a Comment