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

Re: check if string is valid with special cases

by kcott (Chancellor)
on May 16, 2018 at 09:46 UTC ( #1214622=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $string =~ y/,/,/ == -1 + grep length y/ //dr, split /,/, $string
    
  2. or download this
    $ alias perle
    alias perle='perl -Mstrict -Mwarnings -Mautodie=:all -E'
    ...
    N
    $ perle 'my $x = "a,,c"; say +($x =~ y/,/,/ == -1 + grep length y/ //d
    +r, split /,/, $x) ? "Y" : "N"'
    N
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (10)
As of 2019-03-21 16:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How do you Carpe diem?





    Results (110 votes). Check out past polls.

    Notices?