Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Perl length if condition not workingby Eily (Monsignor) |
on Sep 25, 2018 at 10:18 UTC ( [id://1222958]=note: print w/replies, xml ) | Need Help?? |
Your script does print Fail. But my guess is that rather than get '123456789' from the code you get it from STDIN (something like $param_value = <>;) which would mean there is a \n character at the end. You can solve this like that:
If that's not your issue, you'll have to show us code where the problem is actually present. See How do I post a question effectively?. Edit: you would be able to see the extra char with either of these: or I personally prefer Data::Dump, but Data::Dumper should already be installed on your machine.
In Section
Seekers of Perl Wisdom
|
|