How will you get the count of parameters passed to a perl subroutine?



How will you get the count of parameters passed to a perl subroutine?..

Answer / Ram Pravesh Sahni

In Perl, you can use the built-in $# function to get the number of arguments passed to a subroutine. The $# argument variable holds the number of positional parameters (arguments) that have been passed to the current subroutine.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

Is perl compiler or interpreter?

1 Answers  


How do you you check the return code of a command in perl?

1 Answers   HCL,


write a perl script to find whether a given line of text is starting and ending with same word or not ???

2 Answers   CSS,


How to check the status of airplane mode (enable/disable) in perl for Android mobile?

1 Answers  


In CPAN module, name an instance you use.

1 Answers  


How can we create perl programs in unix, windows nt, macintosh and os/2 ?

1 Answers  


what is CPAN?

1 Answers  


What is perl unshift array function?

1 Answers  


Which guidelines by Perl modules must be followed?

1 Answers  


Differentiate use and require?

1 Answers  


What is the use of command “use strict”?

1 Answers  


Why do we use "use strict" in perl?

1 Answers  


Categories