![]() Related Questions Both of them are used to declare local variables.The variables declared with "my" can live only within the block it was defined and cannot get its visibility inherited functions called within Latest Answer : 1) MyMy creates a new variable and gives a lexical scope for that variable.The variable is not visible outside the block in which it is defined.2) LocalLocal saves the value of a global variable.It never creates a new variable. Here also, the variable ... Read Answers (3) | Asked by : Murali Krishnan What is difference between "Use" and "require". In which case should "Use" be used and not "Require"? Read Answers (4) | Asked by : JP I have a variable named $objref which is defined in main package. I want to make it as a Object of Class XYZ. How could I do it? Read Answers (2) | Asked by : Zubind Latest Answer : - Technically, there's no difference between for and foreach other than some style issues.
One is an alias of another. You can do things like this
foreach (my $i = 0; $i < 3; ++$i)
{ # normally this is foreach print $i, "n";}
for my $i (0 ... Read Answers (1) | Asked by : suseel Latest Answer : I think the question should be diff bet'n perl CGI and jsp...both are diff things why should u comparing them.. hv u asked this question in some interview :) or u know both and thinkin which one to use.lemme rit some diffWith JSP, if the code inside ... Read Answers (1) | Asked by : Giri What is the difference between a perl program and a shell script? Which out of these is easier to understand and execute? And How? Read Answers (4) | Asked by : SAJIT KUMAR Latest Answer : 1) die is used to throw an exception (catchable using eval). exit is used to exit the process. 2) die will set the error code based on $! or $? if the exception is uncaught. exit will set the error code based on its argument. 3) die outputs a message ... Read Answers (3) | Asked by : Godhuly What is the difference between the function oriented and Object oriented approach in the modules (CPAN). Mention the merits as well demerits of these two types. View Question | Asked by : rajashekar Latest Answer : * Object Oriented means programme will be their in terms of Class and Object relationship will be their.* Structured Oriented Means programme will be their in terms of multiple Functions. ...
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||