for my $xx ($runlvl) { $xx =~ /2/ and process($0); $xx =~ /3/ and finalize(); }