Hi,
I bought 3 books a few days ago on Perl, and things are going well with
one exception.
An example:
@line = "this is a very long line word1+word2+word3 and it contines on and
on";
The object is to execute a split using "+" so I end up with word1, word2,
and word3, so I do this:
my @line = split('\+');
According to the books, I should end up with this:
$line[0] = word1
$line[1] = word2
$line[3] = word3
Instead it ends up to be this:
$line[0] = this is a very long line word1
$line[1] = word2
$line[3] = word3 and it contines on and on
I can't figure out what I'm doing wrong.
Can someone explain?
Thanks,
Robert