SPUG: lenght of string
Tim Maher
tim at consultix-inc.com
Wed Oct 6 13:11:08 CDT 2004
On Wed, Oct 06, 2004 at 09:30:12AM -0700, O'neil, Jerome wrote:
> Jebuz, Tim, of all the people in the universe, I wouldn't have expected
> pedantry from you.
>
> perldoc -f length
> length EXPR
> length Returns the length in characters of the value of
> Works for me, every time.
>
> -J
My point was a technical one having to do with correct syntax
(sorry if you thought I was being pedantic, but as a teacher,
that's what I get paid for!)
Specifically, the Perl technique for determining the length of a
string is "length EXPR", not "%length EXPR" (which looks like a hash
followed by a scalar).
The post in question showed %length, which was incorrect.
As a courtesy to those who are growing tired of this thread,
I'll resist the temptation to question the spelling of the
word "Jebuz", which appears at the start of your message 8-}
-Tim
*--------------------------------------------------------------------------*
| Tim Maher, CEO (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX |
| tim(AT)Consultix-Inc.Com http://TeachMePerl.Com http://TeachMeUnix.Com |
*+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-*
| Watch for my upcoming book: "Minimal Perl for Shell Users & Programmers" |
| Classes! 10/4: UNIX Fundamentals 11/30: Perl 12/6: Shell & Utilities |
*--------------------------------------------------------------------------*
More information about the spug-list
mailing list