home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / perl / 7110 < prev    next >
Encoding:
Text File  |  1992-11-23  |  921 b   |  30 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!sdd.hp.com!sgiblab!sgigate!sgi!wdl1!wdl39!mab
  3. From: mab@wdl39.wdl.loral.com (Mark A Biggar)
  4. Subject: Re: Regex question
  5. Message-ID: <1992Nov23.171017.27215@wdl.loral.com>
  6. Sender: news@wdl.loral.com
  7. Organization: Loral Western Development Labs
  8. References: <1ejsonINNeal@fido.asd.sgi.com>
  9. Date: Mon, 23 Nov 1992 17:10:17 GMT
  10. Lines: 18
  11.  
  12. In article <1ejsonINNeal@fido.asd.sgi.com> cwilson@snarf.wpd.sgi.com (Chan Wilson) writes:
  13. >
  14. >I thought I knew how to do this... guess I don't.  I want to have
  15. >something like this:
  16. >
  17. >($suit, $pip) = /(\S+) of (Spade|Heart|Club|Diamond)/;
  18. >
  19. >but that doesn't work.  What will?
  20.  
  21. Works fine for me on a sun-3 version 4.035.  You did get $suit and $pip
  22. backwards, so when $_ = "ten of Heart"; I get $suit eq "ten" and 
  23. $pip eq "Heart", but it worked.
  24.  
  25. --
  26. Perl's Maternal Uncle
  27. Mark Biggar
  28. mab@wdl1.wdl.loral.com
  29.  
  30.