PERL Interview Question
There are many things that you can do ahead of time to prepare for the interviewing process, and move yourself a step above of the competition. Updating your resume and reviewing frequently asked interview questions can be very effective, and goes a long way in getting the most out of your interview.
Why should I use the -w argument with my Perl programs?
Many Perl developers use the -w option of the interpreter, especially during the development stages of an application. This warning option turns on many warning messages that can help you understand and debug your applications.
To use this option on Unix systems, just include it on the first line of the program, like this:
#!/usr/bin/perl -w
If you develop Perl apps on a DOS/Windows computer, and you're creating a program named myApp.pl, you can turn on the warning messages when you run your program like this:
perl -w myApp.pl
Assuming $_ contains HTML, which of the following substitutions will remove all tags in it?
1.s/<.*>//g;
2.s/<.*?>//gs;
3.s/<\/?[A-Z]\w*(?:\s+[A-Z]\w*(?:\s*=\s*(?:(["']).*?\1|[\w-.]+))?)*\s*>//gsix;
You can't do that.
If it weren't for HTML comments, improperly formatted HTML, and tags with interesting data like < SCRIPT >, you could do this. Alas, you cannot. It takes a lot more smarts, and quite frankly, a real parser.
I want users send data by formmail but when they send nothing or call it from web site they will see error.
codes in PHP like this:
if (isset($HTTP_POST_VARS)){
..........
}
else{
echo ("error lalalalal")
}
How it will look in perl?
In php it will be like
if (isset($HTTP_POST_VARS)){
....
}
In perl, tried this.
if ($ENV{'REQUEST_METHOD'} eq 'POST'){
.....
}
-
Technical Questions
- General Question (1017)
- HTML Question (500)
- XHTML Question (400)
- XML Question (652)
- CSS Question (400)
- CSS2 Question (358)
- AJAX Question (302)
- JavaScript Question (562)
- FLASH Question (622)
- Dot Net Technology Question (645)
- ASP Dot Net Question (242)
- Web Services Question (644)
- C # Question (754)
- C Question (302)
- C++ Question (622)
- JAVA Question (372)
- Testing Question (852)
- MySQL Server (322)
- Oracle Question (354)
- ASP Question (245)
- PHP Question (847)
- Visual Basic Question (748)
- MS Access Query Question (645)
- Linux Question (684)
- Unix Question (642)
- SAP Question (546)
- PERL Question (754)
- Python Question (984)
- Networking Question (372)
- Operting System Question (382)
All Information about Interview. Tips and Guideline. www.interviewGHOST.com
What Users Asked:
Advertisement Area :