in reply to reading an input file
Try:
my $code; if (/^\[CODE/) { #Grab the next line from <input> $code=<input>; #Don't forget to chomp $code; } [download]
Later