Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: solution wanted for break-on-spaces (w/specifics)

by vr (Curate)
on Oct 23, 2021 at 23:06 UTC ( [id://11137929] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    [\"isnt]
    [unnice.\"]
    
  2. or download this
    my $quoted = qr/
    (?:(?|
    ...
        )
    /x;
    
  3. or download this
    my $quoted = qr/
    (?:(?|
    ...
        (?:(?:[^\\\' ]*(?:\\[^ ][^\\\' ]*)*)\')(?:[^\\\']*(?:\\.[^\\\']*)*
    +)(?:\'|$)
    ))
    /x;
    
  4. or download this
    my $quoted = qr/
    (?:(?|
    ...
    # and later:
        my $got = [ split $re, $str ];