Britt wrote:
> 
> One solved problem...so I'll try agian....I'm having trouble rewriting
> data.When my perl program creates a file, it can also write to it at that
> time.When I try to rewrite the file (this works on windows) it leaves a
> blank file.
> 
> #!/usr/bin/perl
> $pgdat="/usr/home/usrnm/public_html/db";
> print "Content-type:text/html\n\n";
> 
> open(LOGON,">$pgdat/bbb\.dat") || die "I can't open that file \n";
> close(LOGON);
> print LOGON"456\n";
> print LOGON"123\n";
> exit;

1) You don't want to escape the . in the filename.

2) You closed the file before you printed the two lines to it - move 
   the close to after the prints.

-- 
  ,-/-  __      _  _         $Bill Luebkert   ICQ=14439852
 (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED] 
  / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to 
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users

Reply via email to