my @attributes = qw(first second third); attrib_type(); sub attrib_type { foreach $value (@attributes){ print "Is $value an attribute (y or n)? "; $response = <STDIN>; chomp($response); if ($response =~ "y" || $response =~ "Y"){ print "response is $response\n"; print "configure as an attribute\n"; } else { print "response is $response\n"; print "configure as a parser\n"; } } }
In reply to Re: user input behavior from within a subroutine
by rodion
in thread user input behavior from within a subroutine
by bw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |