polka4ever
Technical User
Hello, I am new to perl and working my way through the Learning Perl book. I'm only on page 37, so bear with me!!!
I want to take STDIN and break it into letters. It's a decoder program. Like, for example, if someone types in: LC8Q4 CBDSN XQRHD NKJXB HR into STDIN ... it will come out as BECAR FULWH ATYOU WISHF OR.
I know I can do :
$line = <STDIN>;
if ($line eq "L") {
print "B"; } else {
...
But i need to break the line into its components. know what i mean? I probably have to load it into an array ... like @line = <STDIN> or something???
any hints?
I want to take STDIN and break it into letters. It's a decoder program. Like, for example, if someone types in: LC8Q4 CBDSN XQRHD NKJXB HR into STDIN ... it will come out as BECAR FULWH ATYOU WISHF OR.
I know I can do :
$line = <STDIN>;
if ($line eq "L") {
print "B"; } else {
...
But i need to break the line into its components. know what i mean? I probably have to load it into an array ... like @line = <STDIN> or something???
any hints?