Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Remove text after and before

by johngg (Abbot)
on May 22, 2012 at 10:13 UTC ( #971763=note: print w/ replies, xml ) Need Help??


in reply to Remove text after and before

Perhaps like this?

knoppix@Microknoppix:~$ perl -E ' > $input = <<EOI; > 2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast + state UP qlen 1000 link/ether 00:0c:29:4e:97:a1 brd ff:ff:ff:ff:ff:f +f > EOI > > $eth = ( split m{\s*:\s*}, $input )[ 1 ]; > say qq{->$eth<-};' ->eth1<- knoppix@Microknoppix:~$

Cheers,

JohnGG


Comment on Re: Remove text after and before
Download Code
Re^2: Remove text after and before
by muizelaar (Sexton) on May 22, 2012 at 10:51 UTC

    Thanks Guys

    You have been a great help looks like I have it sorted now

    Thanks again

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://971763]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2015-07-07 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls