#!/usr/bin/perl use strict; use warnings; package Foo; our $one; our $two; use vars qw($three $four); sub switch { $one = 1; $two = 2; $three = 3; $four = 4; } 1;