in reply to Re: Printing an element of a list not an array
in thread Printing an element of a list not an array

I was surprised that this worked, but it did:
my @array = (32, "something","something01","01something"); print scalar @array."\n"; #prints 4 print +(@array)[0], "\n"; #prints 32 print +(@array)[1], "\n"; #prints something print +(@array)[2], "\n"; #prints something01 print +(@array)[3], "\n"; #prints 01something
An issue that I see is how Perl handles math on strings and potential confusion resulting from that:
my $test = '01xxx'; $test += 1; print "01xxx + 1 is: $test\n"; #prints 2
I do most of my work on Windows now and printing to the console in any form is such an incredibly "expensive" execution wise operation that I prefer the print "".function; option. The string concatenation is meaningless in the overall scheme of things.