in reply to TIMTOWTDI Challenge: Create a filename
Once we have the filename -- how do we create it? I think this way is a pretty awesome yet stupid way of doing just that. It's not even platform independent!
use File::Temp qw(tempfile); my (undef,$file) = tempfile( DIR => '.' ); `echo "#!/bin/touch $file" > tmp.sh`; chmod 0755, 'tmp.sh'; system './tmp.sh';
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: TIMTOWTDI Challenge: Create a filename
by fullermd (Vicar) on Jan 09, 2009 at 02:32 UTC |