I am wondering how to create a variable with a variable name in it.
Ultimately what I want to do is:
my $frequency1 = $frequency;
my $frequency2 = $frequency;
my $frequency3 = $frequency;
but the line my $frequency# = $frequency occurs inside of a loop and I can only
use this instruction once and want to set the value of the appropriate frequency variable.
I have a variable named $attempts and attempts holds the value 1, then 2, and then 3 on the third iteration of the loop
I am trying to use some sort of command like:
my $frequency{$attempts} = $frequency;
but this is not working, can someone please help? Thank you very much.