in reply to Modifying Global Variable

I think you're a little confused on how to return data from subroutines. I think this is what you want:
my $date = dateconverter($date_begin); print $date, "\n"; sub dateconverter { my $dateFoo = shift; # do stuff here, # store your end result in $somevar return $somevar; # returns the value }
Your $date var will now contain the value of $somevar.

-- vek --