Re: "Or" Syntax

2002-10-01 Thread Michael Fowler
On Tue, Oct 01, 2002 at 10:38:52AM -0500, Lance Prais wrote: >I have one question about you suggestion. From the way it looks you have > "Public" including all the other partitions. If the partition is "Public" the information is appended to all of the files. This is exactly what your origi

RE: "Or" Syntax

2002-10-01 Thread Lance Prais
$csp_alerts_index_txt_filename], 'CSP' => [$csp_alerts_index_txt_filename], ); -Original Message- From: Michael Fowler [mailto:[EMAIL PROTECTED]] Sent: Monday, September 30, 2002 5:16 PM To: Lance Prais Cc: [EMAIL PROTECTED] Subject: Re: "Or" Syntax On Mon, Sep 30, 2002

Re: "Or" Syntax

2002-09-30 Thread Michael Fowler
On Mon, Sep 30, 2002 at 02:37:52PM -0500, Lance Prais wrote: [original code, slightly reformatted] if ($partition eq "Public"){ open(PUBLIC_ALERTSFILE,">$public_alerts_index_txt_filename"); print PUBLIC_ALERTSFILE"$oid". "::" ."$title". "::" .."$partition". "::" ."$date\n"; close(PUB

RE: "Or" Syntax

2002-09-30 Thread Janek Schleicher
Lance Prais wrote at Mon, 30 Sep 2002 21:37:52 +0200: >When I read about this Module it really was not clear about using it with > strings. It's not its [Quantum::Superposition's] main purpose. It deals with another kind of logic handling. However, I forgot to mention, it's perhaps better n

RE: "Or" Syntax

2002-09-30 Thread david
t;$title". "::" > .."$partition". "::" ."$date\n"; > close(ADVANCED_ALERTSFILE) || die "can't close $file: $!"; > } > if ($partition eq any(qw/"Public" "OPSEC SDK" "Gold/Platinum" "

RE: "Or" Syntax

2002-09-30 Thread Lance Prais
partition eq "GOLD" or $partition eq "Public" or $partition eq "OPSEC SDK" then write to a file called "CSP" Does that make sense? Thank you in advance Lance -Original Message----- From: david [mailto:[EMAIL PROTECTED]] Sent: Friday, September 27,

RE: "Or" Syntax

2002-09-30 Thread Lance Prais
K" "Gold/Platinum" "CSP")){ open(CSP_ALERTSFILE,">$csp_alerts_index_txt_filename"); print CSP_ALERTSFILE"$oid". "::" ."$title". "::" .."$partition". "::&qu

Re: "Or" Syntax

2002-09-27 Thread david
Lance Prais wrote: > If I wanted to say: > > If a=b or a=c or a=d do this How would I do that? don't use '=' for comparison, sue '==' for numeric comparison and 'eq' for string > > I thought I could do it like this but it did not work. > > 1. > If ($a=b) || ($a=c) || ($a=d) > { > DO thi

Re: "Or" Syntax

2002-09-27 Thread Janek Schleicher
Lance Prais wrote at Fri, 27 Sep 2002 01:55:31 +0200: > If a=b or a=c or a=d do this How would I do that? > > I thought I could do it like this but it did not work. > > 1. > If ($a=b) || ($a=c) || ($a=d) > { > DO this > } > > 2. > If ($a=b) || if ($a=c) || if ($a=d) > { > DO this > }

RE: "Or" Syntax

2002-09-26 Thread Mark Anderson
al Message- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 5:39 PM To: James Edward Gray II Cc: Perl Subject: RE: "Or" Syntax Please let me know if you have any questions' # get solutions Id that are Alerts my $alert = $dbh->prepare(q{SELEC

RE: "Or" Syntax

2002-09-26 Thread Lance Prais
print CSP_ALERTSFILE"$oid". "::" ."$title". "::" .."$partition". "::" ."$date\n"; close(CSP_ALERTSFILE)|| die "can't close $file: $!"; } # pr

Re: "Or" Syntax

2002-09-26 Thread James Edward Gray II
list." > > > Any Ideas? > > Thank you in advance > Lance > > -----Original Message- > From: Mark Anderson [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 7:04 PM > To: Lance Prais; Perl > Subject: RE: "Or" Syntax > > If y

RE: "Or" Syntax

2002-09-26 Thread david
Lance Prais wrote: > Hello and thanks for your help. It still does not seem to be working as I > expect maybe I am assuming I am not explaining myself correctly. Let me > try one more time and see if what happens. > > I am reading this file and have assigned the array[2] as $partition. can y

RE: "Or" Syntax

2002-09-26 Thread Lance Prais
is the last item in the list." Any Ideas? Thank you in advance Lance -Original Message- From: Mark Anderson [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 7:04 PM To: Lance Prais; Perl Subject: RE: "Or" Syntax If you are comparing numbers, you want to use ==

RE: "Or" Syntax

2002-09-26 Thread Mark Anderson
ld put the following lines at the top of your perl scripts, they would likely have helped you solve some of this on your own: use strict; use warnings; -Original Message- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 4:56 PM To: Perl Subject: "Or" Sy

RE: "Or" Syntax

2002-09-26 Thread nkuipers
>If ($a=b) || ($a=c) || ($a=d) That almost looks right. I believe this will do it: if ( $a == $b || $a == $c || $a == $c ) { ... } or, for non-numerics: if ( $a eq $b || ... ) { ... } Cheers, Nathanael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

"Or" Syntax

2002-09-26 Thread Lance Prais
If I wanted to say: If a=b or a=c or a=d do this How would I do that? I thought I could do it like this but it did not work. 1. If ($a=b) || ($a=c) || ($a=d) { DO this } 2. If ($a=b) || if ($a=c) || if ($a=d) { DO this } Could someone tell help me with this? Thanks in advance Lanc