|Do you know where your variables are?|
How regex works in array mode?by astronogun (Sexton)
|on Apr 26, 2012 at 07:01 UTC||Need Help??|
astronogun has asked for the
wisdom of the Perl Monks concerning the following question:
Hi, Once again I would like to seek for help..
It's simple I would like to know how regex works in perl in array mode.
I have this code wherein it will display the word ip: and the url x.x.x.x I have two inputed in my @lines and both are should be matched.. but the problem is I'm getting different result. Here's a simple code that I'm currently testing right now.
and the output is:
Suppose to be the "ip:192.168.243.1 ip:192.168.243.2" part is the one what I want it to be except for the next one "192 168 243 2"
I tried putting m and the regex code but it will just display "ip:192.168.243.1" even if the other value in the array is also matched (ip:192.168.243.2)
I tested the regex via http://regexpal.com/ and its working fine (I think hehe!) Hope you could help me learn how this regex works :) thank you so much