- or download this
../cgi-bin/script.pl?column3=1&column2=2&column1=3
- or download this
my $q = new CGI;
my $href = $q->Vars;
- or download this
my $col_string = join( ',', sort {$$href{$a} <=> $$href{$b}} keys %$hr
+ef );
- or download this
$col_string =~ s/^,+//; # remove leading commas
$col_string =~ s/,+$//; # remove trailing commas
$col_string =~ s/,{2,}/,/g; # reduce adjacent commas to ","
- or download this
my $col_string = '';
for my $var ( sort {$$href{$a} <=> $$href{$b}} keys %$href ) {
$col_string .= "$var,";
}
chop $col_string; # remove final comma
- or download this
my $sql = "SELECT $col_string FROM my_table";