On Wed, Mar 19, 2014 at 4:21 AM, Yonghua Peng <sys...@mail2000.us> wrote: > From perldoc -f stat: > > If "stat" is passed the special filehandle consisting of an underline, no > stat is done, but the current > contents of the stat structure from the last "stat", "lstat", or filetest > are returned. Example: > > if (-x $file && (($d) = stat(_)) && $d < 0) { > print "$file is executable NFS file\n"; > } > > (This works on machines only for which the device number is negative under > NFS.) > > > > > We are looking for openstack and python developers. > Please check: http://www.nsbeta.info/jobs > > Wed, 19 Mar 2014 01:44:15 -0400 from shawn wilson <ag4ve...@gmail.com>: > > On Tue, Mar 18, 2014 at 11:32 PM, John W. Krahn <jwkr...@shaw.ca> wrote: >> Shaji Kalidasan wrote: > >> >> or stat() or lstat() > > I don't remember seeing that reusing i?stat would not duplicate the > stat call...? >
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.... Whatever, y'all answered my question and I learned something (though damn them for not just making another perlvar or something else to do this) - I appreciate the help/info. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/