in reply to Re: How can i "include" an executable section of code
in thread How can i "include" an executable section of code

As a followup, having tested the "do" option, I found that using "require" was altogether the best option, especially in terms of memory usage on large files.
$client = $Options{'c'}; # # call in the relevant client code # require "$client.segment"; #
and the $client.segment file contains
sub DoClient { # client 'A' my $EURO = 1.35; if ( m/(\S+),(\S+),(\S+),(\S+),(\S+),(\S+)/o ) { @fields = split(/,/); ...... } }1;