What are the two ways to get private values inside a subroutine?
No Answer is Posted For this Question
Be the First to Post Answer
Consider the following example #! /bin/perl use strict; sub sample { my @arr=(1,2,3,4); return @arr; } my ($a,$b,$c,$d) = &sample; print "$a\n$b\n$c\n$d\n"; In the above code, How can I get the $c without using the arguments such as $a,$b. I don't want to use any array to get the return values.
write a script to check whether user enter a value is a leap year or not?
3 Answers Oracle, Persistent, ViPrak,
How do I read command-line arguments with Perl?
What happens in dereferencing?
What is perl push array function?
How can you call a subroutine and identify a subroutine?
How can I display all array element in which each element will display on next line in perl ?
Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.
List the prefix dereferencer in Perl.
If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}?
what is the meaning of rigging?
write a script to generate n prime no.s?