Help for this page

Select Code to Download


  1. or download this
    $ perl -E 'say $]'
    5.032001
    
  2. or download this
    $ perl -Mstrict -wE 'my $str = "foobar"; say 1 if $str =~ /[o]{1,2}/'
    1
    
  3. or download this
    $ perl -Mstrict -wE 'my $str = "foobar"; say 1 if $str =~ /[o]{,2}/'
    Unescaped left brace in regex is illegal here in regex; marked by <-- 
    +HERE in m/[o]{ <-- HERE ,2}/ at -e line 1.