Peter Bailey wrote: > Hello, > I want to create a boolean variable for a "not" statement. When I do a > "not File.exists?" in IRB, it works fine. But, it doesn't work when it's > part of a variable declaration. Can someone help me to create a truth > variable for a statement like this? > > Thanks, > Peter > > doesn't work in script. . . . > pngthere = not File.exists?("L:/png/#{pngdir}/#{pngfile}") > > in IRB. . . . > not File.exists?("L:/png/#{pngdir}/#{pngfile}") > works fine. > Try: pngthere = !File.exists?("L:/png/#{pngdir}/#{pngfile}") -- Alex