insensate has asked for the wisdom of the Perl Monks concerning the following question:
My assumption would be that the above regex would always prove false due to the input always being something like '999\n'. I know there is probably a good explanation of this and it has to do with how perl treats scalars...hopefully your wisdom will provide me with needed insight into the workings of this mysterious language. Thanks, Jasonwhile(($num=<stdin>)!~/^999$/){ ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: String Newline Question
by Juerd (Abbot) on Mar 23, 2002 at 22:22 UTC | |
by merlyn (Sage) on Mar 23, 2002 at 22:26 UTC | |
by Juerd (Abbot) on Mar 23, 2002 at 22:30 UTC | |
|
Re: String Newline Question
by insensate (Hermit) on Mar 23, 2002 at 22:21 UTC | |
|
Re: String Newline Question
by Parham (Friar) on Mar 24, 2002 at 16:46 UTC |