in reply to Case sensitive
Here're a couple of answers.
Easiest: you can convert $foo to lowercase, like so:
if ( lc($foo) eq "test" ) { print "It was test!\n"; }
Or use a regular expression with 'i' on the end to indicate case-insensitivity:
if ( $foo =~ /^test$/i) { print "It was test!\n"; }
stephen
|
|---|