in reply to japhy has met his match

I don't know what you mean by "and NOTHING ELSE", but wouldn't this do the trick?
my $a = 'a'; print $a =~ $a; # prints 1

Replies are listed 'Best First'.
Re: Re: japhy has met his match
by srawls (Friar) on May 25, 2001 at 20:42 UTC
    No, because the regex 'a' also matches 'this is a line'. The idea was to only match itself, and no other string.

    The 15 year old, freshman programmer,
    Stephen Rawls