{
my $tempvar = somefunc();
# do something with $tempvar
}
# $tempvar no longer exists here.
####
{
local(*INPUT, $/);
open (INPUT, $file) || die "can't open $file: $!";
$var = ;
}
# $/ is set back to it's original value here.
####
while () {
next if /^#/; # Skip comments
# now do something with $_
}