[VPM] can I do this?

Carl B. Constantine cconstan at csc.UVic.CA
Tue Mar 2 17:46:53 CST 2004


*On Tue Mar 02, 2004 at 03:25:40PM -0800, Peter Scott (Peter at PSDT.com) wrote:
> 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.

Thanks. I thought so, but thought I should check.

> 
> >Consider the following:
> >unless ($fileType =~ "PostScript") or ($fileType =~ "Printer Job
> >Language) {
> 
> Syntax error, insufficient parentheses.  No difference whether it's 
> 'unless' or 'if'.

yeah, should be:

unless (($fileType =~ "PostScript") or ($fileType =~ "Printer Job
Language)) {

-- 
Carl B. Constantine         University of Victoria
Programmer Analyst          http://www.csc.uvic.ca
UNIX System Administrator   Victoria, BC, Canada
cconstan at csc.uvic.ca        ELW A248, 721-8766



More information about the Victoria-pm mailing list