Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Question on Strawberry's Portable .bat file

by KevinZwack (Chaplain)
on Aug 03, 2012 at 17:28 UTC ( [id://985295]=perlquestion: print w/replies, xml ) Need Help??

KevinZwack has asked for the wisdom of the Perl Monks concerning the following question:

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

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://985295]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-19 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found