in reply to compare stdin for a number
Command line switches are handy for some tasks, like -l and -n, which let you write the whole thing in one rather short line:
C:\>perl -lne "print m/^\d{5}$/ ? ' OK' : ' Fail'" 5 Fail 12345 OK 123 Fail Hello Fail 3.141 Fail ^Z
cheers
tachyon
|
|---|