home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5574 < prev    next >
Encoding:
Text File  |  1992-08-27  |  855 b   |  24 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!koonda.acci.com.au!ggr
  3. From: ggr@koonda.acci.com.au (Greg Rose)
  4. Subject: Re: help with if ( ! $a =~ /##/ ) PLEASE!!!
  5. Message-ID: <9224112.13645@mulga.cs.mu.OZ.AU>
  6. Sender: news@cs.mu.OZ.AU
  7. Organization: Australian Computing and Communications Institute
  8. References: <ericw.714945775@bach>
  9. Date: Fri, 28 Aug 1992 02:44:06 GMT
  10. Lines: 12
  11.  
  12. In article <ericw.714945775@bach> ericw@bach.amd.com (Eric Wedaa) writes:
  13. >I am having a h!@# of a time getting this code fragment to 
  14. >work:
  15. >
  16. >if ( ! $a =~ /#/ ){
  17. Well, if $a has anything in it, !$a is false and won't match.
  18. Anyway, you can use the "doesn't match" version:
  19.  
  20. if ($a !~ /#/) {
  21. --
  22. Greg Rose                 Australian Computing and Communications Institute
  23. ggr@acci.com.au                                              +61 3 282 2532
  24.