/[^|]/; # Is this not a pipe? /^[^|]$/; # Is none of this a pipe? $this neq 'a pipe'; # $this is not 'a pipe' # Prints this is not a pipe. $image = 'this is a pipe'; s/is /is not /g foreach ($image); print $image;