Bob McConnell wrote: > From: Rob Dixon >> Chas. Owens wrote: >>> >>> perl -MIPC::Open2 -le 'print ok' >> >> That will be >> >> perl -MIPC::Open2 -le 'print "ok"' >> > > Fascinating. I have been trying out Camelbox > <http://code.google.com/p/camelbox/> on a new system with WinXP Pro SP2. > When I paste that line into a console window, it gives me: > > -------8<------------------------------------- > > C:\Documents and Settings\rvm>perl -MIPC::Open2 -le 'print "ok"' > Can't find string terminator "'" anywhere before EOF at -e line 1. > > C:\Documents and Settings\rvm>perl -Version > Summary of my perl5 (revision 5 version 10 subversion 0) configuration: > Platform: > osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread > uname='' > config_args='undef' > hint=recommended, useposix=true, d_sigaction=undef > useithreads=define, usemultiplicity=define > useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef > use64bitint=undef, use64bitall=undef, uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='gcc', ccflags =' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT > -DPERL_IMPLICIT_CONTE > XT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX', > optimize='-s -O2', > cppflags='-DWIN32' > ccversion='', gccversion='3.4.5', gccosandvers='' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 > d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long > long', lseek > size=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='g++', ldflags ='-s -L"C:\camelbox\lib\CORE" -L"C:\camelbox\lib"' > libpth=C:\camelbox\lib > libs=-lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool > -lcomdlg32 - > ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr > -lwinmm > -lversion -lodbc32 -lodbccp32 > perllibs=-lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool > -lcomdlg > 32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 > -lmpr -lwi > nmm -lversion -lodbc32 -lodbccp32 > libc=-lmsvcrt, so=dll, useshrplib=true, libperl=libperl510.a > gnulibc_version='' > Dynamic Linking: > dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' > cccdlflags=' ', lddlflags='-mdll -s -L"C:\camelbox\lib\CORE" > -L"C:\camelbox\ > lib"' > > > Characteristics of this binary (from libperl): > Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV > PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS > PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS > USE_LARGE_FILES USE_PERLIO > Built under MSWin32 > Compiled at Jul 18 2008 23:24:59 > @INC: > C:/camelbox/lib > C:/camelbox/site/lib > . > > C:\Documents and Settings\rvm> > > -------8<------------------------------------- > > So now I wonder if Camelbox is broken.
This is one of the reasons why I deplore command-line Perl - because the format depends enormously on the command shell being used. The example was for a Unix shell, but with Windows command prompt only double-quotes will suffice to delimit a single parameter that contains space characters. So perl -MIPC::Open2 -le 'print "ok"' passes the string 'print to Perl, which then complains because the 'program' is malformed. With this restriction it is necessary to use the qq// form of double-quotes, so you would need to write perl -MIPC::Open2 -le "print qq/ok/" Camelbox is (probably) fine :) HTH, Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/