Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 examining the Monastery: (3)
As of 2014-09-02 00:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls