in reply to Simple length question
sub foo { print "Foo!\n"; } my $string = 'completelycoveredinchocolate'; foo if (length($string) < 6);
Your example is substantively different only in that we can't see what you've done with your string. So I reckon that's your problem. Try outputting it. Try outputting its length. It's a technique very broadly called 'instrumentation', and is the easiest way to debug small projects.
|
|---|