in reply to Problem with simple program reading from STDIN
#!/usr/bin/perl -w use strict; SWITCH: for(<STDIN>) { /^[Yy]o$/ && { print "whats up"; last; }; /^[Nn]ot much$/ && { print "cool"; last; }; print "HUH?" }
====>
Mice were crying and stinging but went on nibbling the cactus ...
( The facts of life )
<====
|
|---|