Problems? Is your data what you think it is? | |
PerlMonks |
Re: Is this the most elegant way to code directory lookup?by shmem (Chancellor) |
on Sep 29, 2006 at 17:15 UTC ( [id://575576]=note: print w/replies, xml ) | Need Help?? |
You wouldn't know which directory is missing.
Point is, you are already in $srcdir, so you are here->. Instead of using the ugly and hard to grok
in the loop, after having lumped all directory entries (files, directories, symlinks, sockets, device files) into @files (are you really looking for files only? and making tar.gz's containing a single file each?) it would be more elegant
to stuff only the interesting files into @files.
Really? what if your directory contains *.gz files? Your asking tar to complain. And use system, not backticks. I would pack all files into one tar file:
--shmem _($_=" "x(1<<5)."?\n".q·/)Oo. G°\ / /\_¯/(q / ---------------------------- \__(m.====·.(_("always off the crowd"))."· ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In Section
Seekers of Perl Wisdom
|
|