N
norfernuman
I'm trying to clean off a few characters from the beginning of a string.
I must be looking right at the problem, and not seeing it.
I prepended the names of my form elements so I could group them at print
out. The prepended flags match the values in my @form_flags array.
I want to clean off the flags before printout. If I leave out the
substitution it works fine.
I don't get any errors, it runs without errors from the cmd line, but it
hangs from a browser.
Thanks for any help.
- NN
Here's my code:...
my @form_flags = qw(gen_ int_ kit_ bed_ ext_ loc_ utl_);
foreach my $flag (@form_flags) {
foreach $_ ($q->param()) {
if ( $_ =~ /(^\w+_)/ ) {
if ( $1 eq $flag ) {
s/^\w+_//g; #### this make script hang
print "$_ : " . $q->param($_) . "<p>\n";
}
}
}
}
I must be looking right at the problem, and not seeing it.
I prepended the names of my form elements so I could group them at print
out. The prepended flags match the values in my @form_flags array.
I want to clean off the flags before printout. If I leave out the
substitution it works fine.
I don't get any errors, it runs without errors from the cmd line, but it
hangs from a browser.
Thanks for any help.
- NN
Here's my code:...
my @form_flags = qw(gen_ int_ kit_ bed_ ext_ loc_ utl_);
foreach my $flag (@form_flags) {
foreach $_ ($q->param()) {
if ( $_ =~ /(^\w+_)/ ) {
if ( $1 eq $flag ) {
s/^\w+_//g; #### this make script hang
print "$_ : " . $q->param($_) . "<p>\n";
}
}
}
}