in reply to unable chec whether the word is intermediate or last word in a sentence

You're complicating things.
use Path::Class qw( file dir ); my $base = dir('c:\\abc\\def'); my $node = file('c:\\abc\\def\\ghi\\jkl'); # or dir() print $node->relative($base), "\n";

Path::Class

  • Comment on Re: unable chec whether the word is intermediate or last word in a sentence
  • Download Code