in reply to Re: Variable Removal From End of String
in thread Variable Removal From End of String

Apologies for the lack of clarity in the post (still new to this game)...

I have an array ,@images, that I made into a scalar by the following method (my mistake on terming this a string if it is not) ...

$links = join(",", @img), "\n";

When I print $links out I get a list (a,b,c...etc). The size of this list is variable, but I wish to get rid of the last 20 components in every case.

I tried to use the splice () option you suggested before joining @img into a scalar. I had compilation problems, however. More than likely I am doing it incorrectly ...

Could you let me know?

splice( @img, -20 )= @img; $links = join(",", @img), "\n";
thanks for your patience,

cdherold