well, i have all the data in their own scalars and they are used throughout the (big) cgi. i just need to package them up and ship them to the next cgi at the end. it looks like i'm just going to have to make a giant hash and then loop through the hash. use strict;
my $month = 5;
my $day = 7...
ok, here is another approach... can i read the name of a variable? I changed the list from quoted names, to the variables themselves:
[code]use strict;
my $month = 5;
my $day = 7;
my $year = 2005;
my @list = ( $month, $day, $year );
foreach (@list){
print $_;
}[code]
now is there a way...
I'm getting these variables from cgi->param:
my $month = $cgi->param('month') || $cgi->url_param('month');
and I have a million of those. so it would be a lot of typing to put those all in a hash. I'm just trying to think of an easier way to do this.
There are two spots where i want to use...
Hi-
I'm trying to get the value of scalars dynamicly using an array. However, I have to be using strict.
This following code is exactly what I want, except this codes doesn't use "strict"
$month = 5;
$day = 7;
$year = 2005;
my @list = qw( month day year );
foreach my $name (@list){
print...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.