in reply to Sending Email to a list of people using Mail::Sender

Your "working code" doesn't. You:

  1. are missing a ; after use Mail::Sender
  2. are missing the ( following new Mail::Sender which is better written Mail::Sender->new in any case.
  3. variously use $Sender and $sender probably to mean the same variable
  4. use $File which is not initialised anywhere

In addition there is no need to interpolate variables into strings where only the contents of the variable is required (to      => "$To", for example). Better to simply use the variable (to      => $To,).

One thing that would give a heads up for most of those issues is to always use strictures (use strict; use warnings; - see The strictures, according to Seuss).

True laziness is hard work