in reply to Re: extra spaces in textarea
in thread extra spaces in textarea

I believe I have traced my problem to using $FORM{'head'} rather than param('head') as the two replies have used. However when I try to use it in the same way I end up with an empty file. I have added use CGI qw(:standard); to the top of the script.

##### saves data to file open (FILE,">/home/league/currentHeader.txt") or die "cannot open file +: $!"; flock (FILE, 2) or die "cannot lock file exclusively: $!"; print FILE param('head'); close(FILE);


I have tried the code above which I thought looked right but the file remains empty. Also tried declaring it first like this:

$heado = new CGI; $headt=$heado->param('head'); open (HEAD,">$dataDir/currentHeader.txt"); flock (HEAD, 2) or die "cannot lock file exclusively: $!"; print HEAD $headt; close(HEAD);


What am I missing???
James