in reply to Re^4: Side effect of using undefined variable in regex
in thread Side effect of using undefined variable in regex
Why doesn't ">>> In the regex" appear again when $last is undef, and how is the string 'Config' printed?
Sorry, I can't reproduce that on any of my Perl builds, 5.20.0 through 5.30.0 (Linux). The output I get in all cases is:
>>> In the regex >>> In the regex Start Basic Standard Services: Starting $name='ONC RPC PortMapper' $last='Config' ($name=~/$last/i) +=0 Starting $name='OP Time Server' $last='Config' ($name=~/$last/i)=0 Starting $name='OP Log Server' $last='Config' ($name=~/$last/i)=0 Starting $name='OP Configuration Server' $last='Config' ($name=~/$la +st/i)=1 Start Remaining Standard Services: >>> In the regex Starting $name='OP Data Server' $last=undef ($name=~/$last/i)=1 >>> In the regex Installation completed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Side effect of using undefined variable in regex
by Eily (Monsignor) on Jul 01, 2019 at 15:19 UTC | |
by haukex (Archbishop) on Jul 01, 2019 at 17:29 UTC |