in reply to tO CONVERT vb SCRIPT TO PERL

I think, this is what it would look like. I noticed that you seem to be printing to a file. In perl, if you write to a file, you need a file handle, which is usually a variable. And you need to pass that variable to the function OR it could be a global variable... So, that needs to be modified... In BASIC, you print to a file by writing PRINT #1, data$ but if you translate that to Perl, it looks like this: print $filehandle $data

AND PLEASE NOTE THAT IN PERL, THERE IS NO COMMA BETWEEN FILEHANDLE AND DATA!

Otherwise, I think, this is a strict translation of the above VB code to Perl:

#!/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', TargetVa +lues($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:$Curr +ent_split\");"; print $Celldata; } }

Edit: I also made the assumption that Targets() and TargetValues() are functions. If those happen to be global arrays, then you need to change the parentheses to square brackets and put a dollar sign in front of the array name. But that should be easy...