in reply to Understanding Regex

Hi, Let's say you want to extract 'output' info, then you can write code like below

if($line =~ /^Ouput/) { chomp $line; #To delete any newline character at the end of line t +o appear in outputInfo my $outputInfo = $line; $outputInfo =~ s/^Ouput: //; print "\n$outputInfo"; }