in reply to Re: If
in thread If doesn't work
Actually, I would not open any file directly from user input. Others may disagree in this case, but I would validate that param('name') is something you expect, likely /^\w+$/, or something similar.open(FILE, $query->param('name')) or die "Can't open file";
open(FILE, $name) or die "Can't open $name"; $pass = <FILE>; close FILE; chomp $pass; if ($query->param('pass') eq $pass) { ...etc...
Cheers,
KM
|
|---|