my $code; if (/^\[CODE/) { #Grab the next line from $code=; #Don't forget to chomp $code; }