• +91 9723535972
  • info@interviewmaterial.com

Perl Interview Questions and Answers

Question - What is Perl one-liner?

Answer - There are two ways a Perl script can be run: --from a command line, called one-liner, that means you type and execute immediately on the command line. You'll need the -e option to start like "C:\ %gt perl -e "print \"Hello\";". One-liner doesn't mean one Perl statement. One-liner may contain many statements in one line. --from a script file, called Perl program. Assuming both a local($var) and a my($var) exist, what's the difference between ${var} and ${"var"}? ${var} is the lexical variable $var, and ${"var"} is the dynamic variable $var. Note that because the second is a symbol table lookup, it is disallowed under `use strict "refs"'. The words global, local, package, symbol table, and dynamic all refer to the kind of variables that local() affects, whereas the other sort, those governed by my(), are variously knows as private, lexical, or scoped variable.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners