Not a Perl question per se, but I am trying to deploy Strawberry Perl's PortableZIP, and for the life of me I cannot figure out what the If statement in line 4 below does: (from portableshell.bat)
@echo off
set drive=%~dp0
set drivep=%drive%
If $#\#$==$#%drive:~-1%#$ set drivep=%drive:~0,-1%
set PATH=%drivep%\perl\site\bin;%drivep%\perl\bin;%drivep%\c\bin;%PATH
+%
rem env variables
set TERM=dumb
set PERL_JSON_BACKEND=JSON::XS
set PERL_YAML_BACKEND=YAML
rem avoid collisions with other perl stuff on your system
set PERL5LIB=
set PERL5OPT=
set PERL_MM_OPT=
set PERL_MB_OPT=
echo ----------------------------------------------
echo Welcome to Strawberry Perl Portable Edition!
echo * URL - http://www.strawberryperl.com/
echo * see README.portable.TXT for more info
echo ----------------------------------------------
perl -e "printf("""Perl executable: %%s\nPerl version : %%vd\n""", $
+^X, $^V)" 2>nul
if ERRORLEVEL==1 echo.&echo FATAL ERROR: 'perl' does not work; check i
+f your strawberry pack is complete!
echo.
cmd /K
The rest of the script all makes sense to me. This is in regards to Rule of Life #23, "Never ask your users to use something which you yourself do not understand, because you know they will ask about it."
Thanks,
Kevin Zwack
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|