How to make the following assignment, as arrayreference
assignment ?
my $arr_ref='[1,2,3,4,4,'elem']';
Answers were Sorted based on User's Feedback
Answer / kiruthikau
Refer this program.
[code]
my $ref=[1,2,3,4];
print ref $ref;
[/code]
| Is This Answer Correct ? | 0 Yes | 0 No |
my $ref=[1,2,3,4];
print ref $ref;
ref will return the type of reference.
In this case ref will return as 'ARRAY'.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain strftime() function in perl?
Explain the default scope of variables in perl?
Why do you use only Perl when there a lot of more languages available in market like C, Java?
sort a word "system" in perl/shell without using built in functions output should be emssty
What can be done for efficient parameter passing in perl?
What is the difference between use and require in perl?
What is the difference between perl array and perl hash?
How to sort arrays in perl?
my @array=('data1','data2'); my @array1=('data1','data2'); my ($i,$k); $i=7; $k=7; while($i){ $array [++$#array] = 'ree'; $i--; print "@array"; } while($k){ push(@array1,'ree'); $k--; print "@array1"; } Are these two while loop are doing the same functionality ? What may be the difference?
write a script to generate n prime no.s?
You want to empty an array. How would you do that?
You want to open and read data files with perl. How would you do that?