#!/usr/bin/perl -w use strict; use warnings; my $testname = 'a'; Target_write_wide(1); sub Targets { return 'abc'; } sub TargetValues { return 'abc def int hun son'; } sub Target_write_wide { @_ or return; my $depth = shift; defined $depth or return; length($depth) or return; # Debug: print "Target write depth = $depth", 'Targetvalues', TargetValues($depth); my $Celldata; my $Current_split = 0; my $Num_combinations = 0; my @TargetValueslist = split(' ', TargetValues($depth)); foreach (@TargetValueslist) { length($_) or next; $Celldata = "add_wide_split(\"" . Targets($depth) . "\",$_);\n"; print $Celldata; } if ($depth > 0) { Target_write_wide($depth - 1); } else { $Current_split++; $Num_combinations++; $Celldata = "run_all_wide_split(\"$testname" . "_combination:$Current_split\");"; print $Celldata; } }