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 |
Explain a tell function in perl?
Mention how many ways you can express string in Perl?
What is the tk module?
What happens when you return a reference to a private variable?
Explain about typeglobs?
Write a program to decode the data in the form using cgi programming
How do I replace every TAB character in a file with a comma?
How do you set environment variables in perl?
Explain perl. When do you use perl for programming? What are the advantages of programming in perl?
List the prefix dereferencer in Perl.
Explain returning values from subroutines?
write a script to check whether user enter a value is a leap year or not?
3 Answers Oracle, Persistent, ViPrak,