#!/usr/bin/perl -w use strict; use warnings 'all'; ...your code... ..and then... no warnings 'uninitialized'; my ($foo, $bar) = split /\s+/, $some_uninitialized_variable;