The console freezes and I get this error message when I search
the array is loaded in from a file. the interesting thing though, is the error only comes up if the search is there. if it isn't then it works fine.
Perl Command Line Interpreter has encountered a problem and needs to close. We are sorry for the inconvenience.
Code:
print"What is the section name"; $input=<STDIN>; chomp($input); $t=0; $m=7; $v=$i; $v++; while($t!=$i){ $result = @file[$t] =~ /$input/; if($result){ $v=$t; $m=2; } $t++; } if($m==7){ print"Section not found"; } else{ print"Deleting Sectioin"; #delete $t=$v; $t++; $w=1; while($w=1){ if(@file[$t] =~ /Section/){ $w=0; $delete=$t-$v; } $t++; } splice(@file, $v, $delete);
Comment