I am trying to convert the below Csh while loop into Perl while loop but the problem is that in this csh script, i have 2 variables inside a variable -> $count is a variable {SB$count} as a whole is another variable. Csh is able to assign values to such variable like the below but i do not know if this is possible in Perl.
Can any expert give some advice?
[code]
while ( $count <= 5 ) then
set SB$count = `cat $files_extracted.txt|grep -c "x= $count"`
@ count = $count + 1
end
This isn't a "variable inside a variable" (which is possible in Perl using references for example), but a bad excuse for an array. A literal translation of your code would be something like