brian54321uk wrote:
Hi,
Hello,
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
$ perl -le'
my $fred = 10;
my $barney = "abcdefghijklmn";
my $wilma = substr $barney, $fred - 1, 1;
print $wilma;
'
j
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/