if ( "$pwd" eq "$directory" ) { print "You are in $directory\n"; } else { print "You are not in the same directory as $directory!\n"; }