What is the difference between $array[1] and @array[1]?
Answer / kiruthikau
$array[1] represents a scalar value.
@array[1] represents array slicing.
@array[1] returns a list with one scalar value.
We should use $ when we want a scalar value.
If we want a list we need to use @.
If we use 'use warnings' then @array[1] will give the warnings
like ,Scalar value @array[1] better written as $array[1].
Is This Answer Correct ? | 3 Yes | 0 No |
Why Perl aliases are considered to be faster than references?
Can any1 tell me 2 write the script using perl script 2 looking at a log file 2 see wheather the test has passed or not.
What is the purpose of redo statement?
How to close a file in perl?
What?s your favorite module and why?
How does polymorphism work in perl?
write a script to generate n prime no.s?
How to find out the version of PERL being installed on your LINUX machine.
What are some of the key features of objects in perl?
Which of these is a difference between Perl and C++ ?
Explain lists ?
Explain tk?