> "Shlomi" == Shlomi Fish writes:
Shlomi> just a short question. besides personal preference is there
Shlomi> any difference if you use if(! or unless(?
Shlomi> sts: no.
Shlomi> sts: they do the same thing.
That's actually not true.
if ($foo) vs unless (not $foo
On Thursday 29 Apr 2010, Shlomi Fish wrote:
> On Thursday 29 Apr 2010 14:39:11 Akhthar Parvez K wrote:
> > There was a typo in my original email. I missed the word "not" which was
> > very crucial as always.
> >
> > Scenario: #1
> > unless ( (defined $result) && ($test !~ /TEST/) )
> > { my $resu
On Thursday 29 Apr 2010, Uri Guttman wrote:
> i recomment never using !~ as it doesn't read well and it makes for poor
> boolean tests. also i rarely use unless for complex (2 or more) boolean
> ops for the same reason.
>
> APK> { my $result = "OK";
> APK> print "$result\n";
> APK> }
>
On Thursday 29 Apr 2010 14:39:11 Akhthar Parvez K wrote:
> There was a typo in my original email. I missed the word "not" which was
> very crucial as always.
>
> Scenario: #1
> unless ( (defined $result) && ($test !~ /TEST/) )
> { my $result = "OK";
>print "$result\n";
> }
This unless with
> "APK" == Akhthar Parvez K writes:
APK> There was a typo in my original email. I missed the word "not" which was
very crucial as always.
APK> Scenario: #1
APK> unless ( (defined $result) && ($test !~ /TEST/) )
i recomment never using !~ as it doesn't read well and it makes for poor
b
On Thursday 29 Apr 2010, Shawn H Corey wrote:
> !( A && B ) === !A || !B
Thanks Shawn, had learnt it a few years back, but forgot that it seems and
eventually got confused :-)
Regards,
Akhthar Parvez K
http://Tips.SysAdminGUIDE.COM
UNIX is basically a simple operating system, but you have to be
Akhthar Parvez K wrote:
There was a typo in my original email. I missed the word "not" which was very
crucial as always.
Scenario: #1
unless ( (defined $result) && ($test !~ /TEST/) )
{ my $result = "OK";
print "$result\n";
}
I thought it was:
UNLESS $result is defined and UNLESS $test doe
There was a typo in my original email. I missed the word "not" which was very
crucial as always.
Scenario: #1
unless ( (defined $result) && ($test !~ /TEST/) )
{ my $result = "OK";
print "$result\n";
}
I thought it was:
UNLESS $result is defined and UNLESS $test does not contain TEST = IF $r
Hi,
Could someone explain this condition:
Scenario: #1
unless ( (defined $result) && ($test !~ /TEST/) )
{ my $result = "OK";
print "$result\n";
}
I thought it was:
UNLESS (IF NOT) $result is defined and UNLESS (IF NOT) $test does contain TEST
But that doesn't seem to be the case.
I find