Navigation |
Question in Perl ArraysHi, I am trying to understand how arrays work in scalar context. Here is the question: @a = (10,20,30,40,50); @b = @a[0..3]; print "[@b] \n"; when I run this script, I am getting proper result i.e. o/p is: [10 20 30 40] But when I do this change: @a = (10,20,30,40,50); @b = $a[0..3]; # THIS LINE IS CHANGED |
SearchFree Online File ConvertersBrowse archivesRecent posts
|