Re: Where's this documented?

2014-03-20 Thread John W. Krahn
shawn wilson wrote: Oh, I guess I was thinking that using the file name repeats the stat (which it does). Since I was complaining about the ugliness of '_'. However, you're right - that works as well as (-f _)<-- that doesn't look weird as shit? I've got issues moving my fingers into typing that

Re: Where's this documented?

2014-03-18 Thread shawn wilson
On Tue, Mar 18, 2014 at 11:32 PM, John W. Krahn wrote: > Shaji Kalidasan wrote: > > or stat() or lstat() I don't remember seeing that reusing i?stat would not duplicate the stat call...? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@p

Re: Where's this documented?

2014-03-18 Thread John W. Krahn
Shaji Kalidasan wrote: You can use more than one file test on the same file to create a complex logical condition. Suppose you only want to operate on files that are both readable and writable; you check each attribute and combine them with and: if (-r $file and -w $file) { ... } Each time

Re: Where's this documented?

2014-03-17 Thread shawn wilson
Thank y'all. That's weird to read, but it makes sense easy enough. On Mon, Mar 17, 2014 at 7:10 AM, Brian Fraser wrote: > On Mon, Mar 17, 2014 at 10:05 AM, shawn wilson wrote: >> >> From Archive::Tar::File - what's '_' and where is it documented? >> >> sub _filetype { >> my $self = shift; >

Re: Where's this documented?

2014-03-17 Thread Brian Fraser
On Mon, Mar 17, 2014 at 10:05 AM, shawn wilson wrote: > From Archive::Tar::File - what's '_' and where is it documented? > > sub _filetype { > my $self = shift; > my $file = shift; > > return unless defined $file; > > return SYMLINK if (-l $file); # Symlink > > return FI

Re: Where's this documented?

2014-03-17 Thread Shaji Kalidasan
Dear Shawn, You can use more than one file test on the same file to create a complex logical condition. Suppose you only want to operate on files that are both readable and writable; you check each attribute and combine them with and: if (-r $file and -w $file) {    ... } Each time you perform