in reply to Re^2: tempdir with template fails
in thread tempdir with template fails
#!/usr/bin/perl -Wl use strict; use File::Spec qw| catdir tmpdir |; my $tmpdir; sub repl { my @CHARS = ("a".."z", "0".."9"); local $_ = pop; s/ X / $CHARS[int rand $#CHARS] /gex; $_; } do { $tmpdir = File::Spec->catdir( File::Spec->tmpdir , repl ("asd-XXXX +.mbox") ); } until (!-e $tmpdir); print $tmpdir;
|
|---|