Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Check for Spaces in a String

by aaron_baugher (Curate)
on Jun 15, 2015 at 20:52 UTC ( [id://1130529]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $string =~ / \w/;  # a space followed by a word character
    $string =~ /\s\w/; # any whitespace character followed by a word chara
    +cter
    $string =~ /\s\S/; # any whitespace character followed by a non-whites
    +pace character
    
  2. or download this
    #!/usr/bin/env perl
    use 5.010; use strict; use warnings;
    ...
        say;                 # do stuff with the line or elements
      }
    }
    
  3. or download this
                     Rate split and check check and split
    split and check 145/s              --             -1%
    check and split 146/s              1%              --
    
  4. or download this
                     Rate check and split split and check
    check and split 112/s              --            -17%
    split and check 136/s             21%              --
    
  5. or download this
    #!/usr/bin/env perl
    use 5.010; use strict; use warnings;
    ...
            }
        }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1130529]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-26 03:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found