http://www.perlmonks.org?node_id=1012086

keesturam has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, After a gap I am resuming to learn perl. Can you please help me why using @ with split doesn't give desired output.

$input = "ab,cd,efghi,jkl"; @input = split(/,/,$input); $len = @input; print "$input[$len-1]"; # splits properly into 4 $input = "ab,cd,efghi,jkl"; @input = split(/@/,$input); $len = @input; print "$input[$len-1]"; # splits into 2!

Is there anything special that I haven't read about using @?

Cheers!!