On Fri, 14 Mar 2014 13:03:58 -0400, Ralph Grove wrote:
> I'm trying to determine how Perl evaluates operands for expressions. I
> expected the following code to output 3, 4, and 5, as it would if
> executed as a C++ or Java program. The actual output that I get
> (v5.16.2), however, is 4, 4, and 5.
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;
>
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
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
>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 FILE if (-f _); # Plain file
return DIR if (-d _);