brian54321uk wrote:
>
> Hi, I'm stuck with what will probably turn out to be a simple solution, 
> I've been scouring google for ages, and can't find anything close to 
> what I'm looking for.
> 
> Given that
> 
> $fred = 10
> $barney = abcdefghijklmn
> 
> how do I get $wilma = j

my $wilma = substr $barney, $fred-1, 1;

Rob

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


Reply via email to