#ex_12-2b
#Learning Perl, Appendix A, Exercise 12.2 alternate (using globbing)
print "Where to? ";
chop($newdir = <STDIN>);
chdir($newdir) || die "Cannot chdir to $newdir";
foreach (sort <* .*>) {
    print "$_\n";
}

