Gallagher, Tim (NE) wrote:
> Lets say that I have a variable;
> 
> My $test = "asdfjaslfkjasdf lksaflksajfalksjf fsalkjsaflkjsafd fajd
> alsjfk";
> 
> I want a way to count the number of characters to the first space.  Is
> there an easy function to do this???

$ perl -le'
my $test = q[asdfjaslfkjasdf lksaflksajfalksjf fsalkjsaflkjsafd fajd alsjfk];

print index $test, q[ ];
'
15


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to