From tigerpeng2001 at yahoo.com Wed Jun 8 07:08:03 2011 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Wed, 8 Jun 2011 07:08:03 -0700 (PDT) Subject: [Chicago-talk] Fail to Install IO::Pty strawberry perl (32bit) window7 (64bit) Message-ID: <806465.2024.qm@web120504.mail.ne1.yahoo.com> Hello All, Does anyone have experience on installing IO::Pty? I failed to install it with CPAN shell for strawberry perl (32 bit version) on Windows 7 (64 bit). Screenshoot is pasted below. Thank you inadvance, Tiger ? CPAN.pm: Going to build T/TO/TODDR/IO-Tty-1.10.tar.gz Now let's see what we can find out about your system (logfiles of failing tests are available in the conf/ dir)... Looking for _getpty()...... not found. Looking for getpt()........ not found. Looking for grantpt()...... not found. Looking for openpty()...... not found. Looking for posix_openpt(). not found. Looking for ptsname()...... not found. Looking for ptsname_r().... not found. Looking for sigaction().... not found. Looking for strlcpy()...... not found. Looking for ttyname()...... not found. Looking for unlockpt()..... not found. Looking for libutil.h...... not found. Looking for pty.h.......... not found. Looking for sys/pty.h...... not found. Looking for sys/ptyio.h.... not found. Looking for sys/stropts.h.. not found. Looking for termio.h....... not found. Looking for termios.h...... not found. Looking for util.h......... not found. Checking which symbols compile OK... (sorry for the tedious check, but some systems have not too clean ?header files, to say the least;? '+' means OK, '-' means not defined ?and '*' has compile problems...) -B0 -B110 -B115200 -B1200 -B134 -B150 -B153600 -B1800 -B19200 -B200 -B230400 -B2400 -B300 -B307200 -B38400 -B460800 -B4800 -B50 -B57600 -B600 -B75 -B76800 -B9600 -BRKINT -BS0 -BS1 -BSDLY -CBAUD -CBAUDEXT -CBRK -CCTS_OFLOW -CDEL -CDSUSP -CEOF -CEOL -CEOL2 -CEOT -CERASE -CESC -CFLUSH -CIBAUD -CIBAUDEXT -CINTR -CKILL -CLNEXT -CLOCAL -CNSWTCH -CNUL -CQUIT -CR0 - CR1 -CR2 -CR3 -CRDLY -CREAD -CRPRNT -CRTSCTS -CRTSXOFF -CRTS_IFLOW -CS5 -CS6 -CS7 -CS8 -CSIZE -CSTART -CSTOP -CSTOPB -CSUSP -CSWTCH -CWERASE -DEFECHO -DIOC -DIOCGETP -DIOCSETP -DOS MODE -ECHO -ECHOCTL -ECHOE -ECHOK -ECHOKE -ECHONL -ECHOPRT -EXTA -EXTB -FF0 -FF1 -FFDLY -FIORDCHK -FLUSHO -HUPCL -ICANON -ICRNL -IEXTEN -IGNBRK -IGNCR -IGNPAR -IMAXBEL -INLCR -INPC K -ISIG -ISTRIP -IUCLC -IXANY -IXOFF -IXON -KBENABLED -LDCHG -LDCLOSE -LDDMAP -LDEMAP -LDGETT -LDGMAP -LDIOC -LDNMAP -LDOPEN -LDSETT -LDSMAP -LOBLK -NCCS -NL0 -NL1 -NLDLY -NOFLSH - OCRNL -OFDEL -OFILL -OLCUC -ONLCR -ONLRET -ONOCR -OPOST -PAGEOUT -PARENB -PAREXT -PARMRK -PARODD -PENDIN -RCV1EN -RTS_TOG -TAB0 -TAB1 -TAB2 -TAB3 -TABDLY -TCDSET -TCFLSH -TCGETA -T CGETS -TCIFLUSH -TCIOFF -TCIOFLUSH -TCION -TCOFLUSH -TCOOFF -TCOON -TCSADRAIN -TCSAFLUSH -TCSANOW -TCSBRK -TCSETA -TCSETAF -TCSETAW -TCSETCTTY -TCSETS -TCSETSF -TCSETSW -TCXONC -TE RM_D40 -TERM_D42 -TERM_H45 -TERM_NONE -TERM_TEC -TERM_TEX -TERM_V10 -TERM_V61 -TIOCCBRK -TIOCCDTR -TIOCCONS -TIOCEXCL -TIOCFLUSH -TIOCGETC -TIOCGETD -TIOCGETP -TIOCGLTC -TIOCGPGRP -TIOCGSID -TIOCGSOFTCAR -TIOCGWINSZ -TIOCHPCL -TIOCKBOF -TIOCKBON -TIOCLBIC -TIOCLBIS -TIOCLGET -TIOCLSET -TIOCMBIC -TIOCMBIS -TIOCMGET -TIOCMSET -TIOCM_CAR -TIOCM_CD -TIOCM_CTS -T IOCM_DSR -TIOCM_DTR -TIOCM_LE -TIOCM_RI -TIOCM_RNG -TIOCM_RTS -TIOCM_SR -TIOCM_ST -TIOCNOTTY -TIOCNXCL -TIOCOUTQ -TIOCREMOTE -TIOCSBRK -TIOCSCTTY -TIOCSDTR -TIOCSETC -TIOCSETD -TIO CSETN -TIOCSETP -TIOCSIGNAL -TIOCSLTC -TIOCSPGRP -TIOCSSID -TIOCSSOFTCAR -TIOCSTART -TIOCSTI -TIOCSTOP -TIOCSWINSZ -TM_ANL -TM_CECHO -TM_CINVIS -TM_LCF -TM_NONE -TM_SET -TM_SNL -TO STOP -VCEOF -VCEOL -VDISCARD -VDSUSP -VEOF -VEOL -VEOL2 -VERASE -VINTR -VKILL -VLNEXT -VMIN -VQUIT -VREPRINT -VSTART -VSTOP -VSUSP -VSWTCH -VT0 -VT1 -VTDLY -VTIME -VWERASE -WRAP -X CASE -XCLUDE -XMT1EN -XTABS WARNING!? Neither ptsname() nor ptsname_r() could be found, ?so we cannot use a high-level interface like openpty(). No high-level lib or clone device has been found, we will use BSD-style ptys. Writing IO::Tty::Constant.pm... DEFINE = Checking if your kit is complete... Looks good Writing Makefile for IO::Tty Could not read metadata file. Falling back to other methods to determine prerequisites cp Tty.pm blib\lib\IO\Tty.pm cp Tty/Constant.pm blib\lib\IO\Tty\Constant.pm cp Pty.pm blib\lib\IO\Pty.pm C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp? -typemap C:\strawberry\perl\lib\ExtUtils\typemap? Tty.xs > Tty.xsc && C:\strawberry\perl\bin\perl.exe -MExtU tils::Command -e "mv" -- Tty.xsc Tty.c C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp? -typemap C:\strawberry\perl\lib\ExtUtils\typemap? Tty.xs > Tty.xsc && C:\strawberry\perl\bin\perl.exe -MExtU tils::Command -e "mv" -- Tty.xsc Tty.c gcc -c????????? -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -DPERL_MSVCRT_READFIX -s -O2 ? -DVERSION=\"1.10\"??? -DXS_VERSION=\"1.10\"? "-IC:\strawberry\perl\lib\CORE"?? Tty.c In file included from Tty.xs:54: c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.4.3/../../../../i686-w64-mingw32/include/sys/ioctl.h:17: error: expected declaration specifiers or '...' before '(' token c:\strawberry\c\bin\../lib/gcc/i686-w64-mingw32/4.4.3/../../../../i686-w64-mingw32/include/sys/ioctl.h:17: error: expected ')' before '->' token Tty.xs: In function 'make_safe_fd': Tty.xs:225: error: 'F_DUPFD' undeclared (first use in this function) Tty.xs:225: error: (Each undeclared identifier is reported only once Tty.xs:225: error: for each function it appears in.) dmake.EXE:? Error code 129, while making 'Tty.o' ? TODDR/IO-Tty-1.10.tar.gz ? C:\strawberry\c\bin\dmake.EXE -- NOT OK Running make test ? Can't test without successful make Running make install ? Make had returned bad status, install seems impossible Failed during this command: ?TODDR/IO-Tty-1.10.tar.gz???????????????????? : make NO cpan> -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at cleverdomain.org Wed Jun 8 18:43:45 2011 From: andrew at cleverdomain.org (Andrew Rodland) Date: Wed, 8 Jun 2011 21:43:45 -0400 Subject: [Chicago-talk] Fail to Install IO::Pty strawberry perl (32bit) window7 (64bit) In-Reply-To: <806465.2024.qm@web120504.mail.ne1.yahoo.com> References: <806465.2024.qm@web120504.mail.ne1.yahoo.com> Message-ID: <201106082143.46108.andrew@cleverdomain.org> On Wednesday, June 08, 2011 10:08:03 AM tiger peng wrote: > Hello All, > > Does anyone have experience on installing IO::Pty? I failed to install it > with CPAN shell for strawberry perl (32 bit version) on Windows 7 (64 > bit). Screenshoot is pasted below. > Windows doesn't have ptys, and the docs say that Windows is unsupported (except under Cygwin). Andrew From tigerpeng2001 at yahoo.com Thu Jun 9 06:51:30 2011 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Thu, 9 Jun 2011 06:51:30 -0700 (PDT) Subject: [Chicago-talk] Fail to Install IO::Pty strawberry perl (32bit) window7 (64bit) In-Reply-To: <201106082143.46108.andrew@cleverdomain.org> References: <806465.2024.qm@web120504.mail.ne1.yahoo.com> <201106082143.46108.andrew@cleverdomain.org> Message-ID: <50540.59857.qm@web120505.mail.ne1.yahoo.com> Thanks Andrew. I'd better install Cygwin. ________________________________ From: Andrew Rodland <andrew at cleverdomain.org> To: Chicago.pm chatter <chicago-talk at pm.org> Sent: Wednesday, June 8, 2011 8:43 PM Subject: Re: [Chicago-talk] Fail to Install IO::Pty strawberry perl (32bit) window7 (64bit) On Wednesday, June 08, 2011 10:08:03 AM tiger peng wrote: > Hello All, > > Does anyone have experience on installing IO::Pty? I failed to install it > with CPAN shell for strawberry perl (32 bit version) on Windows 7 (64 > bit). Screenshoot is pasted below. > Windows doesn't have ptys, and the docs say that Windows is unsupported (except under Cygwin). Andrew _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From eviljoel at linux.com Wed Jun 15 06:00:28 2011 From: eviljoel at linux.com (eviljoel) Date: Wed, 15 Jun 2011 09:00:28 -0400 Subject: [Chicago-talk] BARcamp Chicago 2011 - July 9th & 10th - Chicago, Illinois Message-ID: BARcamp Chicago 2011 - July 9th & 10th - Chicago, Illinois What is a BARcamp? A BARcamp is a participation oriented event focusing on some of the best parts of conferences: between session discussions, knowledge sharing and socializing. All the talks are given by attendees and the schedule is decided the day of the event. The event is FREE and open to the public. What Can I Expect at BARcamp Chicago? You can expect great discussions, presentations, workshops and demos from some of Chicago?s brightest minds and technology companies. Attendees are encouraged to participate by giving talks, asking questions, having side discussions, sharing ideas and knowledge. Along with talks there are people working together on projects, ideas and companies. You can get a better idea about what BARcamp Chicago is about by viewing photos and videos from previous years: http://www.flickr.com/groups/barcampchicago2008/pool/ http://www.flickr.com/photos/53392972 at N08/ http://www.youtube.com/watch?v=Z-JFqkk2YOE When is BARcamp Chicago? BARcamp Chicago 2011 will be held from 10:00 AM on July 9th through 7:00 PM on July 10th. BARcamp Chicago is a continuous event. Feel free to bring a sleeping bag and spend the night if you wish. Where is BARcamp Chicago? This year BARcamp Chicago will be located at our friendly neighborhood hackerspace, Pumping Station: One. Pumping Station: One is located at 3354 North Elston, Chicago, IL 60618. Via public transportation, Pumping Station: One is just a 15 minute walk from the Belmont Blue Line station. Alternately you can take the 77 Belmont bus east from the Belmont Blue Line station to Sacramento and walk another 5 minutes north from there. By car, Pumping Station: One is just a five minute drive from the 90/94 Expressway. Free street parking is readily available. Better directions will be available on our website soon. How Much Does BARcamp Chicago Cost: Thanks to our sponsors, BARcamp Chicago is 100% FREE. Free food and drink will also be provided. Website For registration and updated information please visit our website at http://barcampchicago.org/. Registration is recommended but NOT required. Presenters Wanted! Do you think you know something that others might like to learn about? Of course you do! Consider giving a talk about it at BARcamp Chicago. All types of presentations are welcome as long as they are educational and interesting. While presentation slides are by no means required, we will have projectors available for those who which to use them. BARcompany Create a startup in a weekend! BARcamp Chicago is not only a great place to find business partners; it is also an excellent place to prototype your first product. Attendees are encouraged to work with others to form and create a business before the end of the weekend. At our closing event, your startup will demo your prototype to BARcamp attendees and our judges. Our judges will then vote on the best, most feasible new business. Our BARcompany winner from last year is actually a BARcamp Chicago sponsor this year! Sponsors BARcamp Chicago would like to thank to thank our sponsors: Pumping Station: One, RuggedScents, O'reilly, PSC Group, Peapod, Google, Todd Carothers and Technori. If you would like to become a BARcamp Chicago sponsor, please e-mail Kevin Harriss at kharriss at barcampchicago.org . From andy at petdance.com Wed Jun 15 06:53:52 2011 From: andy at petdance.com (Andy Lester) Date: Wed, 15 Jun 2011 08:53:52 -0500 Subject: [Chicago-talk] BARcamp Chicago 2011 - July 9th & 10th - Chicago, Illinois Message-ID: <7BE8B118-975B-47E3-AF2B-661B573FB9D2@petdance.com> BARcamp Chicago 2011 - July 9th & 10th - Chicago, Illinois What is a BARcamp? A BARcamp is a participation oriented event focusing on some of the best parts of conferences: between session discussions, knowledge sharing and socializing. All the talks are given by attendees and the schedule is decided the day of the event. The event is FREE and open to the public. What Can I Expect at BARcamp Chicago? You can expect great discussions, presentations, workshops and demos from some of Chicago?s brightest minds and technology companies. Attendees are encouraged to participate by giving talks, asking questions, having side discussions, sharing ideas and knowledge. Along with talks there are people working together on projects, ideas and companies. You can get a better idea about what BARcamp Chicago is about by viewing photos and videos from previous years: http://www.flickr.com/groups/barcampchicago2008/pool/ http://www.flickr.com/photos/53392972 at N08/ http://www.youtube.com/watch?v=Z-JFqkk2YOE When is BARcamp Chicago? BARcamp Chicago 2011 will be held from 10:00 AM on July 9th through 7:00 PM on July 10th. BARcamp Chicago is a continuous event. Feel free to bring a sleeping bag and spend the night if you wish. Where is BARcamp Chicago? This year BARcamp Chicago will be located at our friendly neighborhood hackerspace, Pumping Station: One. Pumping Station: One is located at 3354 North Elston, Chicago, IL 60618. Via public transportation, Pumping Station: One is just a 15 minute walk from the Belmont Blue Line station. Alternately you can take the 77 Belmont bus east from the Belmont Blue Line station to Sacramento and walk another 5 minutes north from there. By car, Pumping Station: One is just a five minute drive from the 90/94 Expressway. Free street parking is readily available. Better directions will be available on our website soon. How Much Does BARcamp Chicago Cost: Thanks to our sponsors, BARcamp Chicago is 100% FREE. Free food and drink will also be provided. Website For registration and updated information please visit our website at http://barcampchicago.org/. Registration is recommended but NOT required. Presenters Wanted! Do you think you know something that others might like to learn about? Of course you do! Consider giving a talk about it at BARcamp Chicago. All types of presentations are welcome as long as they are educational and interesting. While presentation slides are by no means required, we will have projectors available for those who which to use them. BARcompany Create a startup in a weekend! BARcamp Chicago is not only a great place to find business partners; it is also an excellent place to prototype your first product. Attendees are encouraged to work with others to form and create a business before the end of the weekend. At our closing event, your startup will demo your prototype to BARcamp attendees and our judges. Our judges will then vote on the best, most feasible new business. Our BARcompany winner from last year is actually a BARcamp Chicago sponsor this year! Sponsors BARcamp Chicago would like to thank to thank our sponsors: Pumping Station: One, RuggedScents, O'reilly, PSC Group, Peapod, Google, Todd Carothers and Technori. If you would like to become a BARcamp Chicago sponsor, please e-mail Kevin Harriss at kharriss at barcampchicago.org . -- You received this message because you are subscribed to the Google Groups "Polyglot Programmers" group. To post to this group, send email to polyglot-programmers at googlegroups.com. To unsubscribe from this group, send email to polyglot-programmers+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/polyglot-programmers?hl=en. From tigerpeng2001 at yahoo.com Thu Jun 16 13:47:39 2011 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Thu, 16 Jun 2011 13:47:39 -0700 (PDT) Subject: [Chicago-talk] Perl script cannot find itself? Message-ID: <202245.55529.qm@web120502.mail.ne1.yahoo.com> There are two Perl scripts only different by the first line. Why the one without -w in the #! line cannot find itself but the own with -w can? OS: Linux 2.4.5 #6 SMP Perl:? v5.8.0 /tmp>$ sdiff test.pl test1.pl #!/usr/local/bin/perl???????????????????????????????????????? | #!/usr/local/bin/perl -w system ('which perl');????????????????????????????????????????? system ('which perl'); print "hi\n";?????????????????????????????????????????????????? print "hi\n"; /tmp>$ test.pl ksh: test.pl: No such file or directory :/tmp>$ ./test.pl ksh: ./test.pl: No such file or directory /tmp>$ /tmp/test.pl ksh: /tmp/test.pl: No such file or directory /tmp>$ perl test.pl /usr/local/bin/perl hi /tmp>$? test1.pl /usr/local/bin/perl hi -------------- next part -------------- An HTML attachment was scrubbed... URL: From imranjj at gmail.com Thu Jun 16 13:54:48 2011 From: imranjj at gmail.com (imran javaid) Date: Thu, 16 Jun 2011 15:54:48 -0500 Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: <202245.55529.qm@web120502.mail.ne1.yahoo.com> References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> Message-ID: is test.pl executable? -imran On Thu, Jun 16, 2011 at 3:47 PM, tiger peng wrote: > > There are two Perl scripts only different by the first line. Why the one > without -w in the #! line cannot find itself but the own with -w can? > > OS: Linux 2.4.5 #6 SMP > Perl: v5.8.0 > > > /tmp>$ sdiff test.pl test1.pl > #!/usr/local/bin/perl | > #!/usr/local/bin/perl -w > system ('which perl'); system > ('which perl'); > print "hi\n"; print > "hi\n"; > > /tmp>$ test.pl > ksh: test.pl: No such file or directory > :/tmp>$ ./test.pl > ksh: ./test.pl: No such file or directory > /tmp>$ /tmp/test.pl > ksh: /tmp/test.pl: No such file or directory > /tmp>$ perl test.pl > /usr/local/bin/perl > hi > > /tmp>$ test1.pl > /usr/local/bin/perl > hi > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at cleverdomain.org Thu Jun 16 19:19:01 2011 From: andrew at cleverdomain.org (Andrew Rodland) Date: Thu, 16 Jun 2011 22:19:01 -0400 Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: <202245.55529.qm@web120502.mail.ne1.yahoo.com> References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> Message-ID: <201106162219.01517.andrew@cleverdomain.org> On Thursday, June 16, 2011 04:47:39 PM tiger peng wrote: > There are two Perl scripts only different by the first line. Why the one > without -w in the #! line cannot find itself but the own with -w can? Because you saved the file with windows line-endings, and there's a \cM at the end of every line. In the first case, the kernel is looking for "/usr/local/bin/perl\cM" and can't find it. In the second case the kernel is looking for "/usr/local/bin/perl" and running it with an argument of "-w\cM", which is harmless. From tigerpeng2001 at yahoo.com Fri Jun 17 05:53:30 2011 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Fri, 17 Jun 2011 05:53:30 -0700 (PDT) Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: <201106162219.01517.andrew@cleverdomain.org> References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> <201106162219.01517.andrew@cleverdomain.org> Message-ID: <827746.87255.qm@web120515.mail.ne1.yahoo.com> I checked them with vi's list command, there is no cartridge return character in the scripts. ________________________________ From: Andrew Rodland To: Chicago.pm chatter Sent: Thursday, June 16, 2011 9:19 PM Subject: Re: [Chicago-talk] Perl script cannot find itself? On Thursday, June 16, 2011 04:47:39 PM tiger peng wrote: > There are two Perl scripts only different by the first line. Why the one > without -w in the #! line cannot find itself but the own with -w can? Because you saved the file with windows line-endings, and there's a \cM at the end of every line. In the first case, the kernel is looking for "/usr/local/bin/perl\cM" and can't find it. In the second case the kernel is looking for "/usr/local/bin/perl" and running it with an argument of "-w\cM", which is harmless. _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From tigerpeng2001 at yahoo.com Fri Jun 17 05:58:01 2011 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Fri, 17 Jun 2011 05:58:01 -0700 (PDT) Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> Message-ID: <826520.24848.qm@web120510.mail.ne1.yahoo.com> Yes. If it is not, it should get different error message. I remember I did run into similar issue before. It was related to environment setting. ________________________________ From: imran javaid To: Chicago.pm chatter Sent: Thursday, June 16, 2011 3:54 PM Subject: Re: [Chicago-talk] Perl script cannot find itself? is test.pl executable? -imran On Thu, Jun 16, 2011 at 3:47 PM, tiger peng wrote: > >There are two Perl scripts only different by the first line. Why the one without -w in the #! line cannot find itself but the own with -w can? > > > >OS: Linux 2.4.5 #6 SMP >Perl:? v5.8.0 > > > > > >/tmp>$ sdiff test.pl test1.pl >#!/usr/local/bin/perl???????????????????????????????????????? | #!/usr/local/bin/perl -w >system ('which perl');????????????????????????????????????????? system ('which perl'); >print "hi\n";?????????????????????????????????????????????????? print "hi\n"; > > > >/tmp>$ test.pl >ksh: test.pl: No such file or directory >:/tmp>$ ./test.pl >ksh: ./test.pl: No such file or directory >/tmp>$ /tmp/test.pl >ksh: /tmp/test.pl: No such file or directory >/tmp>$ perl test.pl >/usr/local/bin/perl >hi > > >/tmp>$? test1.pl >/usr/local/bin/perl >hi > > > > > > >_______________________________________________ >Chicago-talk mailing list >Chicago-talk at pm.org >http://mail.pm.org/mailman/listinfo/chicago-talk > _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From clydeforrester at gmail.com Fri Jun 17 07:42:13 2011 From: clydeforrester at gmail.com (Clyde Forrester) Date: Fri, 17 Jun 2011 09:42:13 -0500 Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: <827746.87255.qm@web120515.mail.ne1.yahoo.com> References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> <201106162219.01517.andrew@cleverdomain.org> <827746.87255.qm@web120515.mail.ne1.yahoo.com> Message-ID: <4DFB67C5.1060201@gmail.com> I generally use the od -c command to check for stuff like that. If you see "0d 0a" combinations instead of just "0a", then you have carriage returns. od -c test.pl c4 tiger peng wrote: > I checked them with vi's list command, there is no cartridge return > character in the scripts. > > ------------------------------------------------------------------------ > *From:* Andrew Rodland > *To:* Chicago.pm chatter > *Sent:* Thursday, June 16, 2011 9:19 PM > *Subject:* Re: [Chicago-talk] Perl script cannot find itself? > > On Thursday, June 16, 2011 04:47:39 PM tiger peng wrote: > > There are two Perl scripts only different by the first line. Why the one > > without -w in the #! line cannot find itself but the own with -w can? > > Because you saved the file with windows line-endings, and there's a \cM > at the > end of every line. In the first case, the kernel is looking for > "/usr/local/bin/perl\cM" and can't find it. In the second case the > kernel is > looking for "/usr/local/bin/perl" and running it with an argument of > "-w\cM", > which is harmless. From tigerpeng2001 at yahoo.com Fri Jun 17 08:19:48 2011 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Fri, 17 Jun 2011 08:19:48 -0700 (PDT) Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: <4DFB67C5.1060201@gmail.com> References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> <201106162219.01517.andrew@cleverdomain.org> <827746.87255.qm@web120515.mail.ne1.yahoo.com> <4DFB67C5.1060201@gmail.com> Message-ID: <252127.27347.qm@web120512.mail.ne1.yahoo.com> Thanks, You are right. (I thought after using vi to edit it, the \r should be gone) /tmp>$ od -c test.pl 0000000?? #?? !?? /?? u?? s?? r?? /?? l?? o?? c?? a?? l?? /?? b?? i?? n 0000020?? /?? p?? e?? r?? l? \r? \n?? s?? y?? s?? t?? e?? m?????? (?? ' 0000040?? w?? h?? i?? c?? h?????? p?? e?? r?? l?? '?? )?? ;? \r? \n?? p 0000060?? r?? i?? n?? t?????? "?? h?? i?? \?? n?? "?? ;? \r? \n 0000076 /tmp>$ perl -i -pe 's/\r//' test.pl $ od -c test.pl 0000000?? #?? !?? /?? u?? s?? r?? /?? l?? o?? c?? a?? l?? /?? b?? i?? n 0000020?? /?? p?? e?? r?? l? \n?? s?? y?? s?? t?? e?? m?????? (?? '?? w 0000040?? h?? i?? c?? h?????? p?? e?? r?? l?? '?? )?? ;? \n?? p?? r?? i 0000060?? n?? t?????? "?? h?? i?? \?? n?? "?? ;? \n 0000073 /tmp>$? test.pl /usr/local/bin/perl hi ________________________________ From: Clyde Forrester To: Chicago.pm chatter Sent: Friday, June 17, 2011 9:42 AM Subject: Re: [Chicago-talk] Perl script cannot find itself? I generally use the od -c command to check for stuff like that. If you see "0d 0a" combinations instead of just "0a", then you have carriage returns. od -c test.pl c4 tiger peng wrote: > I checked them with vi's list command, there is no cartridge return character in the scripts. > > ------------------------------------------------------------------------ > *From:* Andrew Rodland > *To:* Chicago.pm chatter > *Sent:* Thursday, June 16, 2011 9:19 PM > *Subject:* Re: [Chicago-talk] Perl script cannot find itself? > > On Thursday, June 16, 2011 04:47:39 PM tiger peng wrote: >? > There are two Perl scripts only different by the first line. Why the one >? > without -w in the #! line cannot find itself but the own with -w can? > > Because you saved the file with windows line-endings, and there's a \cM at the > end of every line. In the first case, the kernel is looking for > "/usr/local/bin/perl\cM" and can't find it. In the second case the kernel is > looking for "/usr/local/bin/perl" and running it with an argument of "-w\cM", > which is harmless. _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From briank at kappacs.com Fri Jun 17 09:13:12 2011 From: briank at kappacs.com (Brian Katzung) Date: Fri, 17 Jun 2011 11:13:12 -0500 Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: <252127.27347.qm@web120512.mail.ne1.yahoo.com> References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> <201106162219.01517.andrew@cleverdomain.org> <827746.87255.qm@web120515.mail.ne1.yahoo.com> <4DFB67C5.1060201@gmail.com> <252127.27347.qm@web120512.mail.ne1.yahoo.com> Message-ID: <4DFB7D18.4050906@kappacs.com> When the line endings are \r\n instead of just \n, vim sets the fileformat to dos instead of unix. This is why list mode didn't reveal them. To fix them using vim: vim test.pl :se ff=unix (short form of ":set fileformat=unix") :wq - Brian On 2011-06-17 10:19, tiger peng wrote: > Thanks, You are right. (I thought after using vi to edit it, the \r > should be gone) > > /tmp>$ od -c test.pl > 0000000 # ! / u s r / l o c a l / b i n > 0000020 / p e r l \r \n s y s t e m ( ' > 0000040 w h i c h p e r l ' ) ; \r \n p > 0000060 r i n t " h i \ n " ; \r \n > 0000076 > /tmp>$ perl -i -pe 's/\r//' test.pl > $ od -c test.pl > 0000000 # ! / u s r / l o c a l / b i n > 0000020 / p e r l \n s y s t e m ( ' w > 0000040 h i c h p e r l ' ) ; \n p r i > 0000060 n t " h i \ n " ; \n > 0000073 > /tmp>$ test.pl > /usr/local/bin/perl > hi > > > ------------------------------------------------------------------------ > *From:* Clyde Forrester > *To:* Chicago.pm chatter > *Sent:* Friday, June 17, 2011 9:42 AM > *Subject:* Re: [Chicago-talk] Perl script cannot find itself? > > I generally use the od -c command to check for stuff like that. > If you see "0d 0a" combinations instead of just "0a", then you have > carriage returns. > > od -c test.pl > > c4 > > tiger peng wrote: > > I checked them with vi's list command, there is no cartridge return > character in the scripts. > > > > ------------------------------------------------------------------------ > > *From:* Andrew Rodland > > > *To:* Chicago.pm chatter > > > *Sent:* Thursday, June 16, 2011 9:19 PM > > *Subject:* Re: [Chicago-talk] Perl script cannot find itself? > > > > On Thursday, June 16, 2011 04:47:39 PM tiger peng wrote: > > > There are two Perl scripts only different by the first line. Why > the one > > > without -w in the #! line cannot find itself but the own with -w can? > > > > Because you saved the file with windows line-endings, and there's a > \cM at the > > end of every line. In the first case, the kernel is looking for > > "/usr/local/bin/perl\cM" and can't find it. In the second case the > kernel is > > looking for "/usr/local/bin/perl" and running it with an argument of > "-w\cM", > > which is harmless. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -- Brian Katzung, Kappa Computer Solutions, LLC Leveraging UNIX, GNU/Linux, open source, and custom software solutions for business and beyond Phone: 877.367.8837 x1 http://www.kappacs.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tigerpeng2001 at yahoo.com Fri Jun 17 10:05:39 2011 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Fri, 17 Jun 2011 10:05:39 -0700 (PDT) Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: <4DFB7D18.4050906@kappacs.com> References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> <201106162219.01517.andrew@cleverdomain.org> <827746.87255.qm@web120515.mail.ne1.yahoo.com> <4DFB67C5.1060201@gmail.com> <252127.27347.qm@web120512.mail.ne1.yahoo.com> <4DFB7D18.4050906@kappacs.com> Message-ID: <406214.22969.qm@web120515.mail.ne1.yahoo.com> I'd better to dig more about the vim, the tool I used every day. ________________________________ From: Brian Katzung To: chicago-talk at pm.org Sent: Friday, June 17, 2011 11:13 AM Subject: Re: [Chicago-talk] Perl script cannot find itself? When the line endings are \r\n instead of just \n, vim sets the fileformat to dos instead of unix. This is why list mode didn't reveal them. To fix them using vim: vim test.pl :se ff=unix??? ??? (short form of ":set fileformat=unix") :wq ? - Brian On 2011-06-17 10:19, tiger peng wrote: Thanks, You are right. (I thought after using vi to edit it, the \r should be gone) > > > >/tmp>$ od -c test.pl >0000000?? #?? !?? /?? u?? s?? r?? /?? l?? o?? c?? a?? l?? /?? b?? i?? n >0000020?? /?? p?? e?? r?? l? \r? \n?? s?? y?? s?? t?? e?? m?????? (?? ' >0000040?? w?? h?? i?? c?? h?????? p?? e?? r?? l?? '?? )?? ;? \r? \n?? p >0000060?? r?? i?? n?? t?????? "?? h?? i?? \?? n?? "?? ;? \r? \n >0000076 >/tmp>$ perl -i -pe 's/\r//' test.pl >$ od -c test.pl >0000000?? #?? !?? /?? u?? s?? r?? /?? l?? o?? c?? a?? l?? /?? b?? i?? n >0000020?? /?? p?? e?? r?? l? \n?? s?? y?? s?? t?? e?? m?????? (?? '?? w >0000040?? h?? i?? c?? h?????? p?? e?? r?? l?? '?? )?? ;? \n?? p?? r?? i >0000060?? n?? t?????? "?? h?? i?? \?? n?? "?? ;? \n >0000073 >/tmp>$? test.pl >/usr/local/bin/perl >hi > > > > > > >________________________________ >From: Clyde Forrester >To: Chicago.pm chatter >Sent: Friday, June 17, 2011 9:42 AM >Subject: Re: [Chicago-talk] Perl script cannot find itself? > >I generally use the od -c command to check for stuff like that. >If you see "0d 0a" combinations instead of just "0a", then you have carriage returns. > >od -c test.pl > >c4 > >tiger peng wrote: >> I checked them with vi's list command, there is no cartridge return character in the scripts. >> >> ------------------------------------------------------------------------ >> *From:* Andrew Rodland >> *To:* Chicago.pm chatter >> *Sent:* Thursday, June 16, 2011 9:19 PM >> *Subject:* Re: [Chicago-talk] Perl script cannot find itself? >> >> On Thursday, June 16, 2011 04:47:39 PM tiger peng wrote: >>? > There are two Perl scripts only different by the first line. Why the one >>? > without -w in the #! line cannot find itself but the own with -w can? >> >> Because you saved the file with windows line-endings, and there's a \cM at the >> end of every line. In the first case, the kernel is looking for >> "/usr/local/bin/perl\cM" and can't find it. In the second case the kernel is >> looking for "/usr/local/bin/perl" and running it with an argument of "-w\cM", >> which is harmless. >_______________________________________________ >Chicago-talk mailing list >Chicago-talk at pm.org >http://mail.pm.org/mailman/listinfo/chicago-talk > > > > _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -- Brian Katzung, Kappa Computer Solutions, LLC Leveraging UNIX, GNU/Linux, open source, and custom software solutions for business and beyond Phone: 877.367.8837 x1 http://www.kappacs.com _______________________________________________ Chicago-talk mailing list Chicago-talk at pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at petdance.com Fri Jun 17 10:12:02 2011 From: andy at petdance.com (Andy Lester) Date: Fri, 17 Jun 2011 12:12:02 -0500 Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: <406214.22969.qm@web120515.mail.ne1.yahoo.com> References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> <201106162219.01517.andrew@cleverdomain.org> <827746.87255.qm@web120515.mail.ne1.yahoo.com> <4DFB67C5.1060201@gmail.com> <252127.27347.qm@web120512.mail.ne1.yahoo.com> <4DFB7D18.4050906@kappacs.com> <406214.22969.qm@web120515.mail.ne1.yahoo.com> Message-ID: On Jun 17, 2011, at 12:05 PM, tiger peng wrote: > I'd better to dig more about the vim, the tool I used every day. > vim also includes xxd, an od-like tool. xoa -- Andy Lester => andy at petdance.com => www.techworklove.com => AIM:petdance -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at potter.name Mon Jun 20 17:22:06 2011 From: michael at potter.name (Michael Potter) Date: Mon, 20 Jun 2011 20:22:06 -0400 Subject: [Chicago-talk] Perl script cannot find itself? In-Reply-To: References: <202245.55529.qm@web120502.mail.ne1.yahoo.com> <201106162219.01517.andrew@cleverdomain.org> <827746.87255.qm@web120515.mail.ne1.yahoo.com> <4DFB67C5.1060201@gmail.com> <252127.27347.qm@web120512.mail.ne1.yahoo.com> <4DFB7D18.4050906@kappacs.com> <406214.22969.qm@web120515.mail.ne1.yahoo.com> Message-ID: Andy, Any other interesting utilities included in vim? google revealed this: http://www.vmunix.com/vim/util.html But it is 10 years old. -- Michael Potter On Fri, Jun 17, 2011 at 1:12 PM, Andy Lester wrote: > > On Jun 17, 2011, at 12:05 PM, tiger peng wrote: > > I'd better to dig more about the vim, the tool I used every day. > > > vim also includes xxd, an od-like tool. > xoa > > -- > Andy Lester =>?andy at petdance.com?=>?www.techworklove.com?=> AIM:petdance > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -- Michael Potter Replatform Technologies, LLC +1 770 815 6142 michael at potter.name From richard at rushlogistics.com Thu Jun 30 11:46:55 2011 From: richard at rushlogistics.com (Richard Reina) Date: Thu, 30 Jun 2011 14:46:55 -0400 (EDT) Subject: [Chicago-talk] OPEN() conditional Message-ID: <20110630184656.0DCEC60D@captain.xo.com> I am writing a script that among other things edits a file. The file can be in one of two places (directories) so if the first open does not work I want it to try the open of the file in the alternative directory. I know how to do open(F, " References: <20110630184656.0DCEC60D@captain.xo.com> Message-ID: Instead of a readdir or even attempting the open the file, just test for it's existance ala: my $file = -e $file1Path ? $file1Path: -e $file2Path ? $file2Path: die 'neither file avail'; open (my $FH, '<', $file) or die ' Cannot open $file: $!' ; shawn.c.carroll at gmail.com Perl Programmer Soccer Referee On Thu, Jun 30, 2011 at 13:46, Richard Reina wrote: > I am writing a script that among other things edits a file. ?The file can be in one of two places (directories) so if the first open does not work I want it to try the open of the file in the alternative directory. ?I know how to do open(F, " > Thanks, > > Richard > -- > Richard Reina > Rush Logistics, Inc. > Watch our 3 minute movie: > http://www.rushlogistics.com/movie > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From tigerpeng2001 at yahoo.com Thu Jun 30 12:05:42 2011 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Thu, 30 Jun 2011 12:05:42 -0700 (PDT) Subject: [Chicago-talk] OPEN() conditional In-Reply-To: <20110630184656.0DCEC60D@captain.xo.com> References: <20110630184656.0DCEC60D@captain.xo.com> Message-ID: <656828.93975.qm@web120513.mail.ne1.yahoo.com> if (-f '/blah/blah') {open F, " To: chicago-talk at pm.org Sent: Thursday, June 30, 2011 1:46 PM Subject: [Chicago-talk] OPEN() conditional I am writing a script that among other things edits a file.? The file can be in one of two places (directories) so if the first open does not work I want it to try the open of the file in the alternative directory.? I know how to do open(F, " From tigerpeng2001 at yahoo.com Thu Jun 30 12:12:41 2011 From: tigerpeng2001 at yahoo.com (tiger peng) Date: Thu, 30 Jun 2011 12:12:41 -0700 (PDT) Subject: [Chicago-talk] OPEN() conditional In-Reply-To: <656828.93975.qm@web120513.mail.ne1.yahoo.com> References: <20110630184656.0DCEC60D@captain.xo.com> <656828.93975.qm@web120513.mail.ne1.yahoo.com> Message-ID: <337386.34964.qm@web120504.mail.ne1.yahoo.com> yes ?: works > ls *.log sqlnet.log > perl -le ' open(F, (-f "asqlnet.log") ? " perl -le ' open(F, (-f "asqlnet.log") ? " To: Chicago.pm chatter Sent: Thursday, June 30, 2011 2:05 PM Subject: Re: [Chicago-talk] OPEN() conditional if (-f '/blah/blah') {open F, " To: chicago-talk at pm.org Sent: Thursday, June 30, 2011 1:46 PM Subject: [Chicago-talk] OPEN() conditional I am writing a script that among other things edits a file.? The file can be in one of two places (directories) so if the first open does not work I want it to try the open of the file in the alternative directory.? I know how to do open(F, " From shlomif at shlomifish.org Thu Jun 30 12:57:18 2011 From: shlomif at shlomifish.org (Shlomi Fish) Date: Thu, 30 Jun 2011 22:57:18 +0300 Subject: [Chicago-talk] OPEN() conditional In-Reply-To: <656828.93975.qm@web120513.mail.ne1.yahoo.com> References: <20110630184656.0DCEC60D@captain.xo.com> <656828.93975.qm@web120513.mail.ne1.yahoo.com> Message-ID: <20110630225718.3c7bfaa0@shlomifish.org> Hi tiger peng, On Thu, 30 Jun 2011 12:05:42 -0700 (PDT) tiger peng wrote: > if (-f '/blah/blah') {open F, " 1. Don't use globs for file-handles. Use lexical file handles instead open my $fh, ... 2. Use three-args opens: open my $fh, '<', '/blah/blab' For the record, the original poster also did that mistake. For more information see: * http://perl-begin.org/tutorials/bad-elements/ * https://www.socialtext.net/perl5/ancient_perl > > maybe ?: will work too. > No reason why it shouldn't. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ List of Portability Libraries - http://shlom.in/port-libs What do you mean by ?WDYM?? Please reply to list if it's a mailing list post - http://shlom.in/reply .