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