in reply to not able to get the output using split function
will pick up the FIRST argument passed-in.
my $sentence = shift;
Your test probably looked something like:
and it picked-up just the "i".
>perl myprogram i amd testing this.
There are two possible fixes:
1. Add quotes to the argument, like this:
2. Programattically capture ALL passd arguments:
>perl myprogram "i amd testing this."
If you notice, @ARGV already contains the same information as @words for this case, so split is unnecessary.
my $sentence = join " ",@ARGV;
I hope life isn't a big joke, because I don't get it.