my input is
hi, my name is chungku. I am 24 years old.
want to toknize even the punctuation and number....
output should be in this form
hi
,
my
name
is
chungku
.
I
am
24
years
old
.
thanks for all you generous help
User Profile
Collapse
-
one token per line
hi sir,
this is my input
i am very happy
i want this output
i
am
very
happy
this is the program i wrote
but...Code:open(FH, "worldaff_join.txt") or die("error opening"); @file=<FH>; foreach $line (@file) { @sentence=split(/ /, $line); print"@sentence"; } close(FH); -
counting different number of characters
...Code:#/usr/bin/perl use strict; use warnings; # Setup the counters my $shed_counter= 0; # question mark counter my $doubleshed_counter = 0; # period counter my $ga_counter = 0; # comma counter # Open a file open(FILE, "world affairs.txt"); # Process the file while(<FILE>)
-
program for input apple output "apple"
my frogram for it
...Code:#!usr/local/bin/perl #program practice $file='input.txt'; open(FH, $file); @line=<FH>; open(OUT, ">>output.txt"); foreach $file(@line) { $r="#$file#"; print(OUT "$r"); } close(FH); input i gave apple peach orange watermelon output is coming like
No activity results to display
Show More