View Single Post
  #3 (permalink)  
Old 09-25-2007, 12:39 PM
KevinADC KevinADC is offline
Learning Programmer
 
Join Date: Jan 2007
Posts: 89
Credits: 0
Rep Power: 7
KevinADC is on a distinguished road
Default

local() is a builtin perl function that defines a global perl variable with a temporary value inside a block of code. For example, "$/" is a global perl variable, you would use local() to temporarily change it's value:

Code:
here $/ has its default value

sub do_this {
   local $/ = "\n\n";
   .....
}

here $/ has it's default value again
Reply With Quote