# function to create new user file and print information into it sub createUserFile { my $theFile = param('user') . ".txt"; open(NEWFILE, ">$theFile") || die "Can't create $theFile: $!"; print NEWFILE param('user'), ":", param('pw'); close(NEWFILE); writeCreateSuccess(); }