Hi,
I am new to perl. Thanks for the response.
Actually I have a windows batch script. I want to write the same script as perl script. I am pasting the batch script below....in that first i have to set environment variable in perl as in the batch script. so for that i have check if those variables is already set in perl hash table...so i was advise to query the database server to check for that....but i am not clear...
in the below batch script like set arpp=itsm70-ru...these are all environment variables in batch script which i have to set in perl..
I would be great, if u can help me out....thanks a lot...
batch script...is here...
:: ITSM 7.0. It was called wailea, but the final Russian stage had become 'x-volga'
:: and it was older so it's ccm\gandalf\system\... instead of the new ccm\gandalf\%arapp%\system\...
:: Also, itsm70 used ard instead of i18n. Only care about Russian at this point.
setlocal enableextensions enabledelayedexpansion
set arapp=itsm70-ru
set components=
set integrations=
set pathlets=
set locales=ru
set byp=c:\output\%arapp%\byproducts
:: use a component if there seems to be a trdb for the views in it
pushd Z:\l10n_test\system
for /D %%c in (*) do (if exist .\%%c\ar\common\ard\*forms.csv set components=!components! %%c)
popd
pushd Z:\l10n_test\integration
for /D %%c in (*) do (if exist .\%%c\ar\common\ard\*forms.csv set integrations=!integrations! %%c)
popd
: generate 'pathlets' which usually come in handy.
for %%c in (%components%) do (set pathlets=!pathlets! system\%%c)
for %%c in (%integrations%) do (set pathlets=!pathlets! integration\%%c)
mkdir %byp% 2>nul
:: pass in the desired output file, the English arlabel folder, the English defs folder
:: 14Jun07 change this for Greg to...
:: pass in the desired output file, the combined forms trdb , the English defs folder
:: (need echo. to echo a return. People sometimes forget the final return)
:: make TRDB
del /Q %byp%\*.combined.trdb.csv
for %%c in (%pathlets%) do (^
for %%f in (Z:\l10n_test\%%c\ar\common\ard\*end_forms.csv) do (type %%f >> %byp%\%%~nxc.combined.trdb.csv && echo.>> %byp%\%%~nxc.combined.trdb.csv))
:: make PATTERNS
for %%c in (%pathlets%) do (^
call "generate driver patterns.pl.bat" %byp%\%%~nxc.vui.pattern.export %byp%\%%~nxc.combined.trdb.csv Z:\l10n_test\%%c\ar\en\def)
:: make SCRIPTS from the patterns
call c:\localization\viewservers\%arapp%.bat
for %%v in (%locales%) do (^
for %%c in (%pathlets%) do (call "make scripts from pattern.bat" %byp%\%%~nxc.vui.pattern.export %%v %byp%\%%~nxc.vui.%%v.export))
:: take SNAPSHOTS
for %%c in (%pathlets%) do (^
for %%v in (%locales%) do (call "core extract.bat" %byp%\%%~nxc.vui.%%v.export %%v C:\output\%arapp%\%%c\ar\%%v\def))
:: use ARAXIS
for %%c in (system) do ("C:\Program Files\Araxis\Araxis Merge 2000 Professional\merge.exe" Z:\l10n_test\%%c c:\output\%arapp%\%%c /NoSplash /NoSplashDelay)