#!/usr/bin/perl use warnings; use strict; use File::Glob ':glob'; print "Before first glob\n"; my @ary1 = glob('/*'); print "Before second glob\n"; my @ary2 = glob('/home/*'); print "Done\n";