Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
also i know that !$! = 1, so i tried this:$string = "hello world"; print $string =~ /^.{1}(.{5})/;
that would produce an empty line, why? I have tried many different ways but seems im restricted to using digits. just out of curiosity, why cant i do this?$string = "hello world"; print $string =~ /^.{!$!}(.{5})/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: weird regex question
by kennethk (Abbot) on Apr 25, 2012 at 16:17 UTC | |
|
Re: weird regex question
by JavaFan (Canon) on Apr 25, 2012 at 16:25 UTC | |
by Anonymous Monk on Apr 25, 2012 at 17:07 UTC | |
by JavaFan (Canon) on Apr 25, 2012 at 17:12 UTC | |
by Anonymous Monk on Apr 25, 2012 at 17:13 UTC | |
by trizen (Hermit) on Apr 25, 2012 at 20:47 UTC |