Archive for April, 2007

listing all form input names

Tuesday, April 10th, 2007

Ever writing code and need to get a list of the input field names in your html document. I wrote this little perl script to parse out a list of names of the input fields.

#!/usr/bin/perl
open (INFILE, ‘
while ($line=) {
chomp $line;
my $input = $line;
if ($input =~ /input /
$input =~ /name=\”(\w*)\”/i;
$input = $1;
print “$input\n” ;
}
}
How it […]