in reply to Temp variable performace vs Inline behavior

Of those two, I'd choose the first so you don't call parse_node() twice. Alternatively, you could change the subroutine to take your entire array and do the checks within the subroutine. Then you could just write my @device = parse_node(@nodes).