in reply to 2 basic questions
Another TIMTOWTDI:
my $result = (split "", "ab")[(length(qq(ab))-1)]; print $result;
Please note: with subtraction ;-)
Update:
Two more...
$result = pop @{ [ split( "", "ab" ) ] }; print qq($result\n); $result = splice( @{ [ split( "", "ab" ) ] }, -1 ); print qq($result\n);
Perhaps this is the reason why some folks hate perl?
Regards, Karl
P.S.:
«The Crux of the Biscuit is the Apostrophe»
|
|---|