[VPM] can I do this?

Peter Scott Peter at PSDT.com
Tue Mar 2 17:25:40 CST 2004


At 03:19 PM 3/2/2004, Carl B. Constantine wrote:
>Can I use unless in concert with or (||) like you can if statements?

Yes.  You can do anything with unless that you can do with 
if.  Including putting in an else {} block, if you like to confuse yourself.

>Consider the following:
>unless ($fileType =~ "PostScript") or ($fileType =~ "Printer Job
>Language) {

Syntax error, insufficient parentheses.  No difference whether it's 
'unless' or 'if'.

>   my $pgGuess = countASCII($dataFile);
>   return($pgGuess);
>}
>
>Or do I have to do something different for a compond test like this?




-- 
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com/
*** New! *** http://www.perlmedic.com/




More information about the Victoria-pm mailing list