1

Is it possible to return a value from a perl script, such as an integer, into a batch or cmd file?

I was thinking like this:

set RESULT=0
set COUNT=0

ascript.pl > %RESULT%

%COUNT% += %RESULT%

otherscript.pl > %RESULT%

%COUNT% += %RESULT%
Jens
  • 67,715
  • 15
  • 98
  • 113
GrooverMD
  • 131
  • 3
  • 12
  • Just `print` something in the Perl script. – Biffen Feb 03 '15 at 08:03
  • To use this the way you want, you would need some ability like bash's command substitution. Here is a link to a similar question: http://stackoverflow.com/questions/2033338/get-stdout-into-a-variable – nlu Feb 03 '15 at 10:08
  • http://stackoverflow.com/questions/2323292/windows-batch-assign-output-of-a-program-to-a-variable – Sobrique Feb 06 '15 at 12:49

0 Answers0