#!/usr/bin/perl our $V = 'non-local'; sub print_v { print "$V\n"; } { local our $V = 'local'; print_v; } print_v __END__ # output: local non-local