chriso has asked for the wisdom of the Perl Monks concerning the following question:
Say for example that $file is ist243\243q1.txt. $log would be 243q1.log.
Thanks.$clocktime = localtime; @log = split( /\//, $file ); @log = split( /\./, $log[1] ); $log = $log[0]; $log = $log . ".log"; chdir("/perl/web/examscores/$courselocation/access"); open ACCESS, ">> $log" || die "Cannot open $log: $!"; print ACCESS $idinput . " " . $lname . " " . $fname . " " . $clocktime . " " . $useripaddress . " " . $time . "\n"; close(ACCESS);
Chris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cann't create a file
by Transient (Hermit) on Jul 14, 2005 at 18:36 UTC | |
|
Re: Cann't create a file
by ikegami (Patriarch) on Jul 14, 2005 at 18:43 UTC | |
|
Re: Cann't create a file
by coreolyn (Parson) on Jul 14, 2005 at 18:57 UTC | |
|
Re: Cann't create a file
by BaldPenguin (Friar) on Jul 14, 2005 at 18:37 UTC | |
|
Re: Cann't create a file
by chriso (Sexton) on Jul 14, 2005 at 19:18 UTC | |
by monarch (Priest) on Jul 14, 2005 at 23:41 UTC |