in reply to Re: tempdir with template fails
in thread tempdir with template fails

No.... What if (by accident) a tempdir is created which already exists as .mbox?

My solution now is - as I don't need the directory at a specific place:
1. Create a standard tempdir
2. Create a fixed "name.mbox" directory within that directory

Nevertheless: Thanks to you and all the others who answered.


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Replies are listed 'Best First'.
Re^3: tempdir with template fails
by Firefly258 (Beadle) on Dec 04, 2006 at 10:04 UTC
    Sure, it was just a one-liner to demonstrate my approach. If i were to be more pragmatic, i would code around the various exceptions.

    Maybe something like this could be of help in this instance??
    #!/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;


    perl -e '$,=$",$_=(split/\W/,$^X)[y[eval]]]+--$_],print+just,another,split,hack'er