Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^4: Split() first 3 elements of @array

by Kenosis (Priest)
on Aug 28, 2012 at 20:48 UTC ( #990333=note: print w/replies, xml ) Need Help??

in reply to Re^3: Split() first 3 elements of @array
in thread Split() first 3 elements of @array

use Modern::Perl; use Modern::Perl; say ' IP address:' =~ /IP\s+address:\s+([^\s]+)/; say 'IP address:' =~ /IP\s+address:\s+([^\s]+)/; say ' IP address:' =~ /^\s*IP\s+address:\s+([^\s]+)/; say 'IP address:' =~ /^\s*IP\s+address:\s+([^\s]+)/;


Update: Ah! hmb104 was referring to using split, not the regex (which isn't attempting to match at the beginning of a line and is fully anchored w/o mentioning the spaces before "IP address:").

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://990333]
[Corion]: choroba: I avoided the "fun" of emergency shopping for a new flat iron by trying the flat iron without the timer that sat between it and the mains power. Seems as if just the timer is broken.
[Corion]: marto: Heh, would be cool!
Corion munches on the traditional German winter fruit, strawberries. Imported from Spain at the price of EUR 0.77 per 150g - not really cheap but surprisingly good for a winter produce

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2017-01-20 10:21 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (174 votes). Check out past polls.