while ($info=~ /(\w+ (-?\d+ )+)/) ## LOOP while $info m//atches pattern ## pattern is ... { my $info =~ s/(\w+ (-?\d+ )+)//; ## does nothing in effect ## technically, creates new variable $info ## attempts to remove using s///ubstitution operator ## pattern from $info ## attempts to replace pattern with nothing ## $info is empty new variable ## so the pattern will not match ## and no substitution will be performed }