in reply to Counting number of characters in a string
--Chris#!/usr/local/bin/perl -w use strict; { my $string = "Oh please, good sir program, what is my length?"; printf ("The length is %d characters\n", howlong ($string)); use Inline C => <<'END_OF_C_CODE'; #include <string.h> int howlong(char *s) { return strlen (s); } END_OF_C_CODE }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (jcwren) Re: Counting number of characters in a string
by tye (Sage) on Mar 13, 2001 at 02:48 UTC | |
Re^2: Counting number of characters in a string
by Anonymous Monk on Jun 21, 2010 at 07:13 UTC | |
by rowdog (Curate) on Jun 21, 2010 at 23:13 UTC |