Juerd has asked for the wisdom of the Perl Monks concerning the following question:
# Prototyped ($), just like length. Please do not bitch about that. sub byte_length ($) { my ($copy) = @_; my $counter; $counter++ while $copy =~ s/.//s; return $counter; } sub byte_length ($) { return scalar split //, $_[0]; }
++ vs lbh qrpbqrq guvf hfvat n ge va Crey :)
Nabgure bar vs lbh qvq fb jvgubhg ernqvat n znahny svefg.
-- vs lbh hfrq OFQ pnrfne ;)
- Whreq
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Byte length
by Ido (Hermit) on Mar 04, 2002 at 19:49 UTC | |
by Juerd (Abbot) on Mar 04, 2002 at 19:58 UTC | |
|
Re: Byte length
by Matts (Deacon) on Mar 05, 2002 at 08:13 UTC | |
|
Re: Byte length
by webadept (Pilgrim) on Mar 05, 2002 at 08:27 UTC | |
by Kanji (Parson) on Mar 05, 2002 at 11:18 UTC |