Adding =~ to Pathname.