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
In reply to Cann't create a file by chriso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |