home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / perl / 5947 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  2.1 KB

  1. Path: sparky!uunet!olivea!hal.com!quality.hal.COM!not-for-mail
  2. From: sankar@hal.COM (Sankar Bandy)
  3. Newsgroups: comp.lang.perl
  4. Subject: perl does not treat # inside `` properly
  5. Message-ID: <1957stINNibg@quality.hal.COM>
  6. Date: 15 Sep 92 17:52:29 GMT
  7. Organization: HaL Computer Systems, Inc.
  8. Lines: 39
  9. NNTP-Posting-Host: quality.hal.com
  10.  
  11.  
  12. The perl language is supposed to provide shell syntax equivalence
  13. within the `` characters. However I have seen that the # character
  14. even within `` is not treated equivalently. e.g.
  15.  
  16. [sankar@quality]/users/halserv3-2/sankar/bin{156}cat $CVSROOT/CVSROOT/modules |grep - | grep -v #  
  17. world           -a .
  18. CVSROOT         -i mkmodules CVSROOT
  19. modules         -i mkmodules CVSROOT modules
  20. loginfo         -i mkmodules CVSROOT loginfo
  21. commitinfo      -i mkmodules CVSROOT commitinfo
  22. rcsinfo         -i mkmodules CVSROOT rcsinfo
  23. editinfo        -i mkmodules CVSROOT editinfo
  24. testmod -a testdir/new
  25. bigmod -a testdir/new2
  26. [sankar@quality]/users/halserv3-2/sankar/bin{157}%
  27.  
  28. However within perl the same thing does not work :
  29.   DB<11> p `cat $cvsroot/CVSROOT/modules |grep - | grep -v #`
  30.  
  31.   DB<12> p `cat $cvsroot/CVSROOT/modules |grep -`
  32.     #       key     -a    aliases...
  33.     #       -i prog         Run "prog" on "cvs commit" from top-level of module.
  34.     #       -o prog         Run "prog" on "cvs checkout" of module.
  35.     #       -t prog         Run "prog" on "cvs rtag" of module.
  36.     #       -u prog         Run "prog" on "cvs update" of module.
  37.     #       -d dir          Place module in directory "dir" instead of module name.
  38.     #       -l              Top-level directory only -- do not recurse.
  39.     # The "-a" option specifies an alias.  An alias is interpreted as if
  40.     # everything on the right of the "-a" had been typed on the command line.
  41.     world           -a .
  42.     CVSROOT         -i mkmodules CVSROOT
  43.     modules         -i mkmodules CVSROOT modules
  44.     loginfo         -i mkmodules CVSROOT loginfo
  45.     commitinfo      -i mkmodules CVSROOT commitinfo
  46.     rcsinfo         -i mkmodules CVSROOT rcsinfo
  47.     editinfo        -i mkmodules CVSROOT editinfo
  48.     testmod -a testdir/new
  49.     bigmod -a testdir/new2
  50.