[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] help appending named parmeters to a file



Hello:

I got this so far:

  use CGI;
 $query=new CGI;
print $query->dump

that ain't good enough though

Lincoln Stein has a script somewheres that says that the script below will
append named parameters to a file but I ain't getting it, my web star server
is havin problems with the line 2:


 1.  use CGI;
 2.  open (OUT,'>>test.out') || die;
 3.  $records = 5;
 4.  foreach (0..$records) {
 5.      my $q = new CGI;
 6.      $q->param(-name=>'counter',-value=>$_);
 7.      $q->save(OUT);
 8.  }
 9.  close OUT;
 10.  # reopen for reading
 11.  open (IN,"test.out") || die;
 12.  while (!eof(IN)) {
 13.      my $q = new CGI(IN);
 14.      print $q->param('counter'),"\n";
 15.  }


my form is at:
http://home.earthlink.net/~kohsuan/ex/clinic.html

Matthew Phillips

www.psychosphere.net

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch