in reply to Calling a script from a script with GetOpt::Long arguments

But why don't you make it like this:

for my $file (@files) { heavy_lifter($file); } sub heavy_lifter { my $file = shift; # heavy stuff }

Just two more ˘...

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^2: Calling a script from a script with GetOpt::Long arguments
by jjap (Monk) on Mar 03, 2015 at 14:31 UTC
    Thanks, I could have done that for sure, but for some gut reason, my intention was to let the original script intact. I have had a few scripts in the past who grew into a number of variants each tailored to a given context, but also with numerous small improvements not shared among all versions. I thought it was better to keep it modular.
      "I could have done that for sure, but for some gut reason...
      "Make it so." Jean-Luc Picard (13 July 2305–)

      But i wouldn't make it so ;-)

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»