How do I read command-line arguments with Perl?



How do I read command-line arguments with Perl?..

Answer / Rakesh Chandra

In Perl, you can access command-line arguments using the @ARGV array. Here's a simple example:nn``perlnforeach my $arg (@ARGV) {n print "$arg
";n}n``

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

What are prefix dereferencer? List them.

1 Answers  


how to install a package in perl ????

2 Answers  


When do you use perl programming?

1 Answers  


How to close a directory in perl?

1 Answers  


You want to empty an array. How would you do that?

1 Answers  


How to replace perl array elements?

1 Answers  


How to merge two arrays in perl?

1 Answers  


what is Polymorphism in Perl?

1 Answers  


write a Perl script to find a particular word in a paragraph???

1 Answers  


Explain returning values from subroutines?

1 Answers  


Differentiate between c++ and perl.

1 Answers  


What happens when you return a reference to a private variable?

1 Answers  


Categories