Re: compute depth of word in line

2018-03-10 Thread hw
"John W. Krahn" writes: > On Sat, 2018-03-10 at 00:14 +0100, hw wrote: >> >> Not really, the words I get from the ReadLine functions are not >> organized in an array. >> >> I´ve come up with this function to compute the "depth" of a word: >> >> >> sub get_depth { >>   my

Re: compute depth of word in line

2018-03-10 Thread John W. Krahn
On Sat, 2018-03-10 at 00:14 +0100, hw wrote: > > Not really, the words I get from the ReadLine functions are not > organized in an array. > > I´ve come up with this function to compute the "depth" of a word: > > > sub get_depth { >   my $string = shift; > >   $string =~ s/\s/ /g; >   $string