in reply to Why isn't the file being produced?

Are you sure you want to use:
my $filepath = "\\Inetpub\\wwwdev\\regfinser\\_private\\ybs1028a_test.csv";
And Not:
my $filepath = "c:/Inetpub/wwwdev/regfinser/_private/ybs1028a_test\.csv";

For Path information: Paths in Perl