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 goto label, goto name, and goto expr?
Mention how many ways you can express string in Perl?
What is automatic error handling in perl?
How to deleting an existing file in perl programming?
what are steps to do to lock the sony ericsson mobile with password?
What package you use to create a windows services?
Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??
What is perl I used for?
How to dereference a reference?
Does Perl have reference type?
What is the purpose of _package_ literal?
What is epoch time in perl?