#!/usr/bin/perl -w use strict; use Win32::KeyState qw(:get); while(1) { if (GetKeyState(0x09) & 1) { print "Tab = Pressed\n"; $_ = 0 } }