ArifS has asked for the wisdom of the Perl Monks concerning the following question:
input.txtuse strict; use warnings; open(my $in, '<', 'input.txt') or die "Cannot open input.txt: $!"; open(my $out, '>', 'output.txt') or die "Cannot open output.txt: $!"; while (<$in>) { print $out $_ while s/^\s*\S+\s*//; } close($out); close($in);
however output.txt shows-The person who asked. can mark one answer. as "accepted". Accepting doesn't mean. it's the best answer, it just means that it. worked for the person. who asked.
I just want to remove the first word for each lines, but it's looping. Any suggestion?person who asked. who asked. asked. mark one answer. one answer. answer. "accepted". doesn't mean. mean. the best answer, best answer, answer, just means that it. means that it. that it. it. for the person. the person. person. asked.
|
|---|