cmic has asked for the wisdom of the Perl Monks concerning the following question:
Is it a deprecated usage of the "?" delimiter ?my ($DICT, $first, $last); open $DICT, "<", "/usr/share/dict/words"; while (<$DICT>) { #FIXME $first = $1 if ?(^neuro.*)?; # <- syntax error here $last = $1 if /(^neuro.*)/; } close $DICT; print "first : $first, last : $last \n"; print "-" x 10, "\n"; #
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regexp "?" delimiter
by choroba (Cardinal) on Jun 11, 2019 at 14:04 UTC | |
|
Re: regexp "?" delimiter
by Corion (Patriarch) on Jun 11, 2019 at 14:05 UTC | |
|
Re: regexp "?" delimiter
by Eily (Monsignor) on Jun 11, 2019 at 14:03 UTC | |
|
Re: regexp "?" delimiter
by cmic (Acolyte) on Jun 12, 2019 at 13:14 UTC |