Minor detour ... I am especially unfond of:
(undef, undef, $mode, undef, $uid, $gid) = stat $file;
You wind up with all this glop concealing what components you're actually interested in. I prefer taking the return values as a list, and slice-ing out the portions you want:
($mode, $uid, $gid) = ( stat $file )[2,4,5];
Yes, you have some glop on the right hand side, but it's a standard, recognized mechanism which extends your power once you get used t it.
The left hand side is clear, listing and naming the values you are interested in. The right hand side adds some parentheses, which focus attention on the operation which is providing the values, followed by the slicing brackets which can almost be ignored. They are the mechanism for selecting the data, but beyond that are uninteresting.
--
TTTATCGGTCGTTATATAGATGTTTGCA
In reply to Re: Perl cp -p?
by TomDLux
in thread Perl cp -p?
by DrWhy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |