Does anyone know how i can get a variable name to be changed depending on what info I pass. I have x number of months depending on the date range the user inserts. (month 1) (month 2) (month 3) etc. These are the column names but i need variables for each month. I want to do this
foreach (@columns) { if ($_ =~ /month(\d+)/) { $month . $1 = $whatever_value; } }
If $_ = month4, I want my variable name to be $month4. so, $month4 = whatever_value; Please let me know if you know a solution it would be very much appreciated.
Thanks Bennierounder.| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |