perl question

Peter Murray pem at po.cwru.edu
Sat Aug 23 19:29:43 EDT 1997


--On Fri, Aug 22, 1997 7:09 AM -0700 "laura hudson"
<hudsonl at ouvaxa.cats.ohiou.edu> wrote: 
> if ($in {'user_inst'} = "internal")

This will always evaluate to true...'=' is the assignment operator.  '=='
is a numeric comparison operator; 'eq' is a string comparison operator.  So
what you probably wanted was 

  if ($in{'user_inst'} eq "internal")

But if you do that, the statement will always be false because you never
assign a value to "$in{'user_inst'}".  Replacing that with "$user_inst"
*may* solve your problem.


Peter
--
Peter Murray, Library Systems Manager                      pem at po.cwru.edu
Digital Media Services                   http://www.cwru.edu/home/pem.html
Case Western Reserve University, Cleveland, Ohio            W:216-368-5888




More information about the Web4lib mailing list