in reply to Modifying Global Variable
Your $date var will now contain the value of $somevar.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 }
|
|---|