#!/usr/bin/perl package bookfinder; use Test::More tests=>4; use strict; use warnings; require "index.cgi"; ok(! defined find_word_with_quote_char([qw(hello world)]), "normal string"); ok(! defined find_word_with_quote_char([qw(hello\\" world)]), "escaped quote char"); is(find_word_with_quote_char([qw(hello" world)]), qq{hello"}, "quote char"); is(find_word_with_quote_char([qw(hello\\\\" world)]), qq{hello\\\\"}, "quote char");