I would like to print specific data after matching a pattern or line. I have a file like this:
#****************************** List : car Design: S
Something like this:
while (my $line = <>) { next unless $line =~ /Car\s+Type/; next unless $line = <> and $line =~ /^#----/; next unless $line = <>; my @fields = split ' ', $line; print "@fields[0,1]\n"; }