nationavon
MIS
Here is an example of my problem:
$data = "hello;world;!;";
@appended = split(/\;/, $data);
When I print $#appended I get 2. Why isn't it 3? I really need the elements of my array to look like:
$appended[0] = hello
$appended[1] = world
$appended[2] = !
$appended[3] = NULL
It seems that perl isn't assigning $appended[3] NULL as I thought it would. Is there any way around this?
Nathan
$data = "hello;world;!;";
@appended = split(/\;/, $data);
When I print $#appended I get 2. Why isn't it 3? I really need the elements of my array to look like:
$appended[0] = hello
$appended[1] = world
$appended[2] = !
$appended[3] = NULL
It seems that perl isn't assigning $appended[3] NULL as I thought it would. Is there any way around this?
Nathan