RobinVossen has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I am working on a little CGI App. And I am having some problems with the following code.
$p_challange = $challange . ":" . time; $sys->p_log("Challange: $p_challange\n"); $sys->p_log("String Lenght: " . lenght($p_challange) . "\n"); while ( lenght($p_challange) gt 16 || (lenght($p_challange) % 16) eq 0 +){ $p_challange .= "A"; }
the $sys->p_log function works and there is nothing wrong with it I am 100% sure for that..
But yea when I look in my Log File I get this:
Tue Nov 24 10:44:30 2009 Challange: X[[:yFq:1259055870Anywho, well it dies on lenght. I have had that issue before so I am wondering.. is Lenght Decapitated or what's up with it? And/or is there another way to ask for the lenght of a string?
Thanks,
Robin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: lenght ()Decapitated?
by Corion (Patriarch) on Nov 24, 2009 at 10:00 UTC | |
by JavaFan (Canon) on Nov 24, 2009 at 10:14 UTC | |
by RobinVossen (Initiate) on Nov 24, 2009 at 10:46 UTC | |
by Corion (Patriarch) on Nov 24, 2009 at 11:14 UTC | |
by RobinVossen (Initiate) on Nov 24, 2009 at 13:34 UTC | |
by Corion (Patriarch) on Nov 24, 2009 at 13:55 UTC | |
by cdarke (Prior) on Nov 24, 2009 at 10:56 UTC | |
by SuicideJunkie (Vicar) on Nov 24, 2009 at 14:33 UTC | |
by ikegami (Patriarch) on Nov 24, 2009 at 16:36 UTC | |
by ikegami (Patriarch) on Nov 24, 2009 at 18:35 UTC | |
|
Re: lenght ()Decapitated?
by scorpio17 (Canon) on Nov 24, 2009 at 18:25 UTC | |
by RobinVossen (Initiate) on Nov 30, 2009 at 08:34 UTC |