I was trying to join words here with this short program i wrote but it does not do what i expect.I want it to append the word "sp" on each input line form a file and put tha results on the other file.
If the input file is like this:
BEDS b eh d z
BEEN b iy n
Then the output file should look like this:
BEDS b eh d z sp
BEEN b iy n d s sp
Here is the program I wrote:
# open prompt file
open my $fh, "< $words" || die ("Unable to open prompt file $prompt");
open my $wfh, "> $out" || die ("Can't create output file!");
while ( $word = <$fh>)
$info=join $word,' ',$w1;
print $wfh "$info";
Thanx in advance!