use IO::File; use POSIX qw(tmpnam); my $name; do{ $name = tmpnam() } until $fh = IO::File->new( $name, O_RDWR|O_CREAT|O_EXCL ); binmode $fh;
Use $fh as the file handle, instead of IMG
Don't forget to change the file name in the <IMG SRC= .. print statement. You'll need some way to delete old files every once in a while.
In reply to Re: Automatically creating incremental file names
by TomDLux
in thread Automatically creating incremental file names
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |