in reply to Extra (\n)'s in the file I'm updating?
open returns 1 on success and 0 on failure. What you're doing here is assigning the return value from open to the $success variable and then chomping it. For future reference always check the return value from open like this:chomp(my $success = open OUT, ">$file_path"); # test for open omitted +for space concerns
Secondly, you are blindly accepting and using parameters without un-tainting them. If you don't know what this means, check out Ovid's CGI course, particularly the security section.open(OUT, $file_path) || die "Couldn't open $file_path - $!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Extra (\n)'s in the file I'm updating?
by cdguitar01 (Monk) on Jan 11, 2003 at 19:08 UTC |