Path: utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!midway!oddjob!brian From: brian@oddjob.uchicago.edu (Brian Yanny) Newsgroups: comp.lang.perl Subject: Quoted Split for perl? Message-ID: <1990Jun27.182447.1243@midway.uchicago.edu> Date: 27 Jun 90 18:24:47 GMT Sender: news@midway.uchicago.edu (News Administrator) Reply-To: brian@oddjob.UChicago.EDU (brian yanny) Distribution: na Organization: U of Chicago - Astronomy & Astrophysics Lines: 27 Does anyone have a 'quoted split' subroutine? that is, it would do things like this: --------------- $a='this string has "embedded quote marks" dont ya know'; @out=do quoted_split(' ',$a); for ($i=0;$i<=$#out,$i++){ print "$i $out[$i]\n"; } -------------- When run would produce: 0 this 1 string 2 has 3 embedded quote marks 4 dont 5 ya 6 know --------------- It could get fancier and handle either '"' or "'" (nested) too.