C:\test>for /f "tokens=*" %a in ('prel -v 2^>nul ^| find "perl"') do @echo %a C:\test>for /f "tokens=*" %a in ('perl -v 2^>nul ^| find "perl"') do @echo %a This is perl, v5.10.1 built for MSWin32-x64-multi-thread (with 2 registered patches, see perl -V for more detail) this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.